-
Notifications
You must be signed in to change notification settings - Fork 5
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
refactor model class and runners to be more independent #494
Merged
+183
−272
Merged
Changes from 35 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
8df6acb
get model class from config
deigen 622461c
download checkpoints command
deigen 1fc5c22
pass model to server class, change grpc flag name
deigen cb9f59c
download_checkpoints option in server
deigen 9fe3cf5
rename ModelUploader to ModelBuilder
deigen 134e026
create_model_instance function
deigen a29661e
include main for now to reduce diff
deigen c612812
refactor upload model main to reduce diff
deigen 24c2595
fix arg
deigen f2db76f
fixes
deigen ddc384a
fix formatting
deigen 2312951
make class_info section optional
deigen 921ad10
edit unittest
deigen a05a8b3
edit tests to use model class
deigen e851890
init model directly for unittest
deigen 86a07f5
update cmdline
deigen 991ede3
Merge branch 'master' into model-class-refactor
deigen b1337d7
fix runner inheritence and simplify test
deigen 7a4a8a9
update calls in grpc server
deigen ee5987e
update names in test
deigen 8fd2217
fix test
deigen 556ab26
fix test
deigen 1123b63
formatting
deigen 1e20682
fix name in test
deigen e317b91
fix use of modelclass in tests
deigen 829a55a
move load_model into default construction
deigen a3738a4
Merge branch 'master' into model-class-refactor
deigen ed00d68
remove download_checkpoints arg
deigen ab52d07
set uuid in test setup
deigen 12daf0e
write configs to tempfiles to keep tests independent
deigen 7f34602
set compute cluster id in nodepool test
deigen 27fb1ec
revert unrelated changes to test_compute_orchestration
deigen 7cb44d5
add error message for updaing runner class
deigen 5fe1e7a
put back load_model as abstract method
deigen 2d9af83
remove init args for this pr
deigen cd45884
fix tests
deigen 9974c4d
copy all of 1/ dir
deigen c0716ba
Merge branch 'master' into model-class-refactor
deigen 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 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 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 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 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 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 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
where does model.load_model() get called now?
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.
That happens here, when the model is constructed. I'm actually not sure if we need to separate
__init__
fromload_model
now, we could also have it load in its init. To me it looks like reason we didn't do that in the old class structure, was because the init function was for the Runner, not the Model, and so had all the params for runner ids etc. as its init args, which we didn't want the user to have to deal with in their implementation. Now that the model is not inheriting from runner, we can use init instead and remove load_model. The only advantage to keeping it would be if we wanted to allow for construction before checkpoint loading, e.g. for examining config without loading the checkpoint; there isn't a place we do that yet, though.https://github.com/Clarifai/clarifai-python/pull/494/files#diff-265e698c90224658ed2a2213722fc5ddac5cec98e352802afcbf75760789e383R105
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 think we should keep load_model to make it more clear what you have to implement as a user.