print selene_sdk version, add config and model file to output, add ra…#191
print selene_sdk version, add config and model file to output, add ra…#191ygliu2016 wants to merge 2 commits intoFunctionLab:masterfrom
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? |
kathyxchen
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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
| 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.
why are these commented out?
There was a problem hiding this comment.
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.
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.
Same with the commented out line in 365, if that is my code.
There was a problem hiding this comment.
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. |
kathyxchen
left a comment
There was a problem hiding this comment.
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.
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.
| 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.
Thanks for the clarification. Please un-comment this as we need it for ensuring all aspects are deterministic.
| 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.
Same with the commented out line in 365, if that is my code.
|
I think |
|
Oh thanks - that’s good to know! @jzthree
|
kathyxchen
left a comment
There was a problem hiding this comment.
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!
| random_seed: 1447 | ||
| output_dir: ./training_outputs | ||
| create_subdirectory: False | ||
| create_subdirectory: True |
There was a problem hiding this comment.
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.
spacing here has not been fixed still. Please adjust so it adheres to the current style in the codebase, thank you!
| configs = load_path(configs_file, instantiate=False) | ||
| operations = configs["ops"] | ||
|
|
||
| #print selene_sdk version |
There was a problem hiding this comment.
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.
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
| 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.
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?