-
Notifications
You must be signed in to change notification settings - Fork 46
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for neo4j-graph-data-science-client ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
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, |
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.
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
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.
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.
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.
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, |
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.
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)
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: