projects submissions without data/rel_component get_instances modification #8760
MatthiasMurray
started this conversation in
Help: Best practices
Replies: 1 comment 1 reply
-
Sorry for the late response to this. I think this is a great example of one way to handle a particular constraint. Since it's not directly relevant to our sample data though it might seem a little out of place in the sample projects. Since the amount of code involved is rather small, posting it in a Discussion here as a demonstration is probably enough to help people find it if they need it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to know if a change I made is relevant enough to be submitted as a pull request on the projects repo, or whether it's best practice to just submit the request and let it be sorted by that process. I'm unsure whether it makes sense since the assets there only refer to one entity type and multiple possible relations between them, and I am not able to open source my own data set that makes the change relevant.
The reason I implemented this is that I have multiple entities, let's call them ENT1, ENT2, ENT3, and I have one relation rel1 that can only be between (ENT1,ENT2) and another relation rel2 that can only be between (ENT3,ENT1) and (ENT3,ENT2). By separating them during training I believe I got a significant boost in performance, but perhaps more importantly I wanted to put the results of the two relation models back together ({**rel1,**rel2}) in a final inference and when I hardcoded the pair types to be considered directly into rel_model.py, it meant they required entirely separate sets of scripts.custom_functions to avoid overlapping/ambiguous methods (very messy). Rather than renaming everything, I found adding the below code to rel_model.py worked better:
Then, for the model that could only consider [(ENT3,ENT1),(ENT3,ENT2)], I modified the config like so:
Beta Was this translation helpful? Give feedback.
All reactions