-
Notifications
You must be signed in to change notification settings - Fork 61
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
Reuploading fix #401
Reuploading fix #401
Conversation
Codecov Report
@@ Coverage Diff @@
## master #401 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 80 80
Lines 12745 12745
=========================================
Hits 12745 12745
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
@jubaglio let me talk to you in this PR. IN response to #397 (comment) I am sorry, if does not work because of my fault, I did not check it properly. I have added the following:
The problem is that it is not possible to create a dict inside something that does not exist. For this reason we must add a previous step. You were completely right. However, I did it in such a way that it is not necessary to create all the list of dataset, and then we do not have to change it if we add more examples. |
try: | ||
data[dataset][layers] = parameters | ||
except: | ||
data[dataset] = {} |
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 you can avoid this by making sure e.g. in line 30 that data[dataset]
is not empty / not defined.
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.
Indeed
Co-authored-by: Stefano Carrazza <[email protected]>
I have solve the issue with the
saved_parameters.pl
file from the reuploading example.What I did is essentially add some code such that:
data
data = {}
.Then the code looks into
data
for parameters. If it is found, the figures are painted. If it is not, and we do not mind whether it was because the file did not exist or because this calculation was never done, then the optimization is performed. Afterwards it dumps data into the file in any case.Let me know if this solves your problem