Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
OpenFold
Commits
450f5236
Commit
450f5236
authored
Aug 12, 2022
by
Brian Loyal
Browse files
Added more error handling
parent
95c83ae1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
run_pretrained_openfold.py
run_pretrained_openfold.py
+4
-1
No files found.
run_pretrained_openfold.py
View file @
450f5236
...
@@ -509,8 +509,11 @@ def update_timings(dict, output_file=os.path.join(os.getcwd(), "timings.json")):
...
@@ -509,8 +509,11 @@ def update_timings(dict, output_file=os.path.join(os.getcwd(), "timings.json")):
import
json
import
json
if
os
.
path
.
exists
(
output_file
):
if
os
.
path
.
exists
(
output_file
):
with
open
(
output_file
,
"r"
)
as
f
:
with
open
(
output_file
,
"r"
)
as
f
:
if
f
:
try
:
timings
=
json
.
load
(
f
)
timings
=
json
.
load
(
f
)
except
json
.
JSONDecodeError
:
logger
.
info
(
f
"Overwriting non-standard JSON in
{
output_file
}
."
)
timings
=
{}
else
:
else
:
timings
=
{}
timings
=
{}
timings
.
update
(
dict
)
timings
.
update
(
dict
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment