-
Notifications
You must be signed in to change notification settings - Fork 90
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
print selene_sdk version, add config and model file to output, add ra… #191
base: master
Are you sure you want to change the base?
Conversation
…ndom suffix to output directory name
Thanks Aaron for adding me to this PR, and thank you @ygliu2016 for your work on this! I've left some comments--feel free to tag me in a comment once you've updated / tested the changes based on the review, and let me know if you have any questions in the meantime. Overall it looks good! Thanks again :) |
H, Kathy, thanks for coming back. Would you please tell me where are your comments? In which repository? Thanks. |
The comments are directly in the changes you made - so if you scroll up above my comment or click 'files changed' tab you should be able to see what I wrote at the corresponding lines of code! |
I am so sorry. But I can not see you comments at repository ygliu2016/selene, branch info. |
Hi @ygliu2016 , were you able to find the comments after you made the test comment? It's at https://github.com/FunctionLab/selene/pull/191/files "Files Changed" tab |
No, I cannot. Unfortunately, I can only see my test comment. Can you comment directly in the code? |
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.
Hi @ygliu2016, I've resubmitted the comments, hopefully this time it works!! Thanks for your patience :)
operations = configs["ops"] | ||
|
||
#print selene_sdk version | ||
if "selene_sdk_version" not in configs: |
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.
maybe simplify this to version
. I think it's also OK to assume that version
is never specified in the config and to add it automatically, e.g. moving from selene_sdk import version
to the top of the page. I think you can also directly do import selene_sdk
and use selene_sdk.__version__
-- not sure which is better practice.
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.
Not sure about name "selene_sdk_version" vs "version". May want to keep the longer version at this time.
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 I thought about it more, and I think it's better to have this be automatically populated? Let's just remove lines 322 and 323 outright.
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.
Please adjust based on comments above, I think it makes sense to just auto-populate since almost no one will try to specify it manually in their config
@@ -343,9 +357,29 @@ def parse_configs_and_run(configs, | |||
np.random.seed(seed) | |||
torch.manual_seed(seed) | |||
torch.cuda.manual_seed_all(seed) | |||
#torch.backends.cudnn.deterministic = True |
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.
why are these commented out?
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.
It is your code, which is not included in the main repository of selene. I am not sure if the code is necessary and thus copied here but commented them. It seems to me that with a seed, there is already deterministic in it.
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.
Thanks for the clarification. Please un-comment this as we need it for ensuring all aspects are deterministic.
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.
Same with the commented out line in 365, if that is my code.
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.
can you remove the commented out lines in 364 and 365?
Thank you very much for the comments and in fact, for your patience as well. |
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.
Added last few comments! Let me know when these final changes have been incorporated and tested. :) Thank you
operations = configs["ops"] | ||
|
||
#print selene_sdk version | ||
if "selene_sdk_version" not in configs: |
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 I thought about it more, and I think it's better to have this be automatically populated? Let's just remove lines 322 and 323 outright.
@@ -343,9 +357,29 @@ def parse_configs_and_run(configs, | |||
np.random.seed(seed) | |||
torch.manual_seed(seed) | |||
torch.cuda.manual_seed_all(seed) | |||
#torch.backends.cudnn.deterministic = True |
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.
Thanks for the clarification. Please un-comment this as we need it for ensuring all aspects are deterministic.
@@ -343,9 +357,29 @@ def parse_configs_and_run(configs, | |||
np.random.seed(seed) | |||
torch.manual_seed(seed) | |||
torch.cuda.manual_seed_all(seed) | |||
#torch.backends.cudnn.deterministic = True |
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.
Same with the commented out line in 365, if that is my code.
I think |
Oh thanks - that’s good to know! @jzthree
|
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.
hi @ygliu2016, I made another pass - some of the conversations you marked resolved I had some minor comments to fully resolve them. Can you tag me when you've finished the changes so I know to review this PR again? thanks!
@@ -47,6 +47,6 @@ train_model: !obj:selene_sdk.TrainModel { | |||
} | |||
random_seed: 1447 | |||
output_dir: ./training_outputs | |||
create_subdirectory: False | |||
create_subdirectory: True |
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 assume this was changed because of testing - can this be changed back since it's not relevant to the PR?
# copy model file or directory to output | ||
model_input = configs['model']['path'] | ||
if os.path.isdir(model_input): # copy the directory | ||
shutil.copytree (model_input, |
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.
spacing here has not been fixed still. Please adjust so it adheres to the current style in the codebase, thank you!
operations = configs["ops"] | ||
|
||
#print selene_sdk version |
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.
remove commented out print statement
operations = configs["ops"] | ||
|
||
#print selene_sdk version | ||
if "selene_sdk_version" not in configs: |
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.
Please adjust based on comments above, I think it makes sense to just auto-populate since almost no one will try to specify it manually in their config
@@ -343,9 +357,29 @@ def parse_configs_and_run(configs, | |||
np.random.seed(seed) | |||
torch.manual_seed(seed) | |||
torch.cuda.manual_seed_all(seed) | |||
#torch.backends.cudnn.deterministic = True |
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.
can you remove the commented out lines in 364 and 365?
…ndom suffix to output directory name
Reference Issues/PRs
What does this implement/fix? Explain your changes.
What testing did you do to verify the changes in this PR?