-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improvements in the context of knowledge graph resources #207
Conversation
primekg
moduleprimekg
module
primekg
module
Hi @abearab thanks for the PR! I think this looks like a lightweight approach to accommodate all the future KGs that could be added to the TDC. I have two comments:
Otherwise, looks great - happy to discuss more about these two comments if you have any question! |
Thanks @kexinhuang12345
done – 5eee5a6
Yeah, I agree. I used a method option for the current PrimeKG class for converting it to |
hi. can you run the new conda-test GH Action tests? They should be run if you create a new pull request. Also looks like your branch has conflicts. You should resolve those. Closing this for now. |
hey @amva13 – thanks for your response. I got this error, any thoughts?
|
Yes this is an error from the linter. It's from your code's formatting. In theory, you should be able to fix by simply replacing the contents of your file with the output from |
your |
reopening |
Cool, I fixed it. |
running tests |
looks good @abearab will complete review this week. |
Hey @abearab . From the looks of it you should be able to separate your edits to PrimeKG into a different class. Can you go ahead and do that? It can inherit from existing PrimeKG if useful. As there are no dependencies on PrimeKG in the rest of the repo, you and anyone wishing to leverage the code you implemented in KnowledgeGraph should be able to use your class directly. As there is not yet extensive testing on PrimeKG, I'd prefer we proceed in this manner. I can approve when this is done. |
Hi @amva13 – we have a discussion with @kexinhuang12345 here #207 (comment) which motivated me to modify PrimeKG class. This is what Kexin suggested:
I'm not sure if I understand your concern, can you clarify please? I'll be more than happy to add a few more commits if needed. |
Yes, i think it would be great to create a separate KG class and PrimeKG can inherit from it. The reason is that in the future if there is other KG, then we can inherit from that class and reuse it instead of reimplementing the KG loading/processing/analysis shared functions. Let me know if that makes sense! |
@abearab your implementation does not currently have PrimeKG inheriting from KnowledgeGraph/KG (i.e. would look like PrimeKG(KG) for example) Regardless - please do not change the code in PrimeKG. Please create a separate class, say, PrimeKGDev. There is no need for you to inherit from KG. You can use the exact same code you are using for PrimeKG and copy that over to PrimeKGDev. PrimeKGDev should offer exactly the same interface as PrimeKG (this should not be difficult if you just copy over the code). For conflict resolution, I am currently the authority on TDC, but you may ask @marinkaz for clarification if needed. @kexinhuang12345 please feel free to implement testing on PrimeKG and we can consolidate the two classes, say by changing PrimeKG to inherit directly from PrimeKGDev, accordingly. Thanks! |
That's true, now I fixed it. Thanks for the suggestion.
I'm not sure if I understood your points for having both PrimeKGDev and PrimeKG. Can you clarify, please? Or if it's easier for you, maybe you can add that yourself? Let me know what you think.
Sounds great, I don't think any clarification is needed in this regard. I just referred to our prior conversations with @kexinhuang12345 to make sure we are all on the same page. Looking forward to seeing all upcoming features in TDC! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved dev class. TODO switchover and tests
@abearab feel free to merge this at your convenience. lgtm |
missed in mims-harvard#207
Suggesting a new data function: Knowledge Graph Mastery, #23 (comment)
Changes:
knowledge_graph
moduleKnowledgeGraph
python classbuild_KG
function to enable creating graph from scratchto_KG
method to currentprimekg
in resource module to getPrimeKG
asKnowledgeGraph
objectFeatures:
KnowledgeGraph
datasets (mimiking the PrimeKG data frame)