Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frtrglib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Valentin Bruch
frtrglib
Commits
fc1f8ba1
Commit
fc1f8ba1
authored
Jul 19, 2022
by
Valentin Bruch
Browse files
Options
Downloads
Patches
Plain Diff
workaround for bug in data management; improved coding style
parent
c0fb4819
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
data_management.py
+2
-3
2 additions, 3 deletions
data_management.py
plot.py
+247
-42
247 additions, 42 deletions
plot.py
test/benchmark.py
+2
-1
2 additions, 1 deletion
test/benchmark.py
with
251 additions
and
46 deletions
data_management.py
+
2
−
3
View file @
fc1f8ba1
...
...
@@ -301,7 +301,6 @@ class KondoExport:
If overwrite is False and a file would be overwritten, append a random
string to the end of the filename.
"""
os
.
sync
()
while
True
:
try
:
pathlib
.
Path
(
filename
+
'
.lock
'
).
touch
(
exist_ok
=
False
)
...
...
@@ -316,13 +315,13 @@ class KondoExport:
break
answer
=
input
(
'
Save with filename extended by random string? (Yn):
'
)
if
answer
.
lower
()[
0
]
!=
"
n
"
:
return
self
.
save_h5
(
filename
+
random_string
(
8
)
+
"
.h5
"
,
include
,
overwrite
)
return
self
.
save_h5
(
filename
.
removesuffix
(
"
.h5
"
)
+
random_string
(
8
)
+
"
.h5
"
,
include
,
overwrite
)
try
:
file_exists
=
os
.
path
.
exists
(
filename
)
h5file
=
None
while
h5file
is
None
:
try
:
h5file
=
tb
.
open_file
(
filename
,
"
a
"
)
h5file
=
tb
.
open_file
(
filename
,
"
a
"
,
MAX_NUMEXPR_THREADS
=
1
,
MAX_BLOSC_THREADS
=
1
)
except
tb
.
exceptions
.
HDF5ExtError
:
settings
.
logger
.
warning
(
'
Error opening file %s, waiting 0.5s
'
%
filename
)
sleep
(
0.5
)
...
...
This diff is collapsed.
Click to expand it.
plot.py
+
247
−
42
View file @
fc1f8ba1
This diff is collapsed.
Click to expand it.
test/benchmark.py
+
2
−
1
View file @
fc1f8ba1
...
...
@@ -3,7 +3,8 @@
Benchmarks for Kondo FRTRG solver
"""
import
numpy
as
np
import
cProfile
,
pstats
import
cProfile
import
pstats
from
pstats
import
SortKey
import
settings
from
kondo
import
Kondo
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment