-
Notifications
You must be signed in to change notification settings - Fork 31
Add parameters apply_model_func and convert_model_func to assign_population_pcs so it has the ability to work with other models types
#558
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,5 +3,8 @@ hail | |
| hdbscan | ||
| ipywidgets | ||
| networkx | ||
| onnx | ||
| onnxruntime | ||
| scikit-learn | ||
| skl2onnx | ||
| slackclient==2.5.0 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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 testing your notebook on converting v2, because I noticed you didn't test the converting on v2, but when I loaded the RF:
Does it have anything to do with not import the module from outside on your line 214?
Uh oh!
There was an error while loading. Please reload this page.
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.
No, it's because the model is too old, so you need to use old versions of sklearn and other packages in order to loaded it. That is why we are updating to ONNX and why I didn't test the v2.1 RF model. Even though the v3.1 RF model loads, it still loads with
Like mentioned in the users reported issue in #533
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.
Okay, so you converted them to ONNX version separately with older sklearn? Are you going to share the two *.onnx in the public bucket? The test in your notebook shows your functions are working to me.
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.
Could you also add a note about the #533 issue? So when someone tries to load the sklearn RF model, they are aware of this issue, they may use the *.onnx model directly if their python is more recent.
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.
Yeah, I finally got the configurations needed for the v2.1 and v3.1 sklearn models to each load and converted them to ONNX models.
That's the plan, but the first step was to make these functions and get them merged. Then I also have tickets to:
Add an example of gnomAD ancestry RF model use to
gnomad_qcModify blog post on use of ancestry RF model to link to
gnomad_qcexampleThe idea is that the ONNX models will replace the sklearn models, and the blog post will be updated with no code, but instead a link to an example in
gnomad_qcso if we need to make changes to it, we can do that ingnomad_qcand not need to modify the blog post again.I'm not sure what you mean? I can add this note to the
gnomad_qcexample (when I have made it), and mention it in the change to the blog post, but I don't think there is a good place for this note in thegnomad_methodscodeThere 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.
You answered my last question in your plan. I understand gnomad_methods is more general.
I think it is good to go!