Skip to content
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

Simplest version of dumping train config #558

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

orazve
Copy link
Contributor

@orazve orazve commented Dec 19, 2023

Thank you for your contribution to the Graph Data Science Client project.

Before submitting this PR, please read Contributing to the Neo4j Ecosystem.

Make sure:

  • You signed the Neo4j CLA (Contributor License Agreement) so that we are allowed to ship your code in our library
  • Your contribution is covered by tests

Copy link

netlify bot commented Dec 19, 2023

Deploy Preview for neo4j-graph-data-science-client ready!

Name Link
🔨 Latest commit bdf5369
🔍 Latest deploy log https://app.netlify.com/sites/neo4j-graph-data-science-client/deploys/6581cb527387df00084d388d
😎 Deploy Preview https://deploy-preview-558--neo4j-graph-data-science-client.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@adamnsch adamnsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool :)

@@ -45,6 +46,34 @@ def create(
relationship_type_embeddings,
)

@compatible_with("train", min_inclusive=ServerVersion(2, 5, 0))
@client_only_endpoint("gds.model.transe")
def train(self,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little bit confused about how the predict-only TransE we've had previously fits into this. They kind of seem like different things. Also I wonder if it's better if we have a gds.kge.train call instead of one dedicated to each particular scoring function

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that we are adding training step in addition to existing prediction one. Maybe it's worth to have a fully separate API like gds.kge.train or gds.kge.transe.train.

Personally I prefer to mention scoring method in a function name, like gds.kge.transe.train, not gds.kge.train. Because KGE algorithms are different and supposed to catch different relationship properties.

Our API proposal has gds.model.transe.train call, that's why I wrote it that way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok! Fair enough :) I do still prefer gds.kge.train: I think it makes sense since the embeddings are what are trained, not TransE which is a scoring function. And since all KGE algos are the same (in terms of eg. hyperparameters) except for the scoring function, I think it would make sense to group them in the API for simplicity, sharing the same docs, etc. In that sense scoring function is just another hyperparam I think, and one may even want to use an ensemble of them. I like how pyKEEN designed their API

# loss: str
) -> int:
config = {'scoring_function': 'TransE',
'proportions': proportions,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I call this split_ratios in the python runtime. I think "ratio" is a more common term to refer to this (also what pyKEEN use for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants