Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Gregory Ashton
PyFstat
Commits
9f8d0be1
Commit
9f8d0be1
authored
Dec 18, 2017
by
David Keitel
Browse files
gridsearch: fix old-data check in transient case, add filenames to logging
parent
0c41b602
Changes
1
Hide whitespace changes
Inline
Side-by-side
pyfstat/grid_based_searches.py
View file @
9f8d0be1
...
...
@@ -128,7 +128,7 @@ class GridSearch(BaseSearchClass):
if
args
.
clean
:
return
False
if
os
.
path
.
isfile
(
self
.
out_file
)
is
False
:
logging
.
info
(
'No old data found, continuing with grid search'
)
logging
.
info
(
'No old data found
in "{:s}"
, continuing with grid search'
.
format
(
self
.
out_file
)
)
return
False
if
self
.
sftfilepattern
is
not
None
:
oldest_sft
=
min
([
os
.
path
.
getmtime
(
f
)
for
f
in
...
...
@@ -139,13 +139,13 @@ class GridSearch(BaseSearchClass):
return
False
data
=
np
.
atleast_2d
(
np
.
genfromtxt
(
self
.
out_file
,
delimiter
=
' '
))
if
np
.
all
(
data
[:,
0
:
-
1
]
==
self
.
input_data
):
if
np
.
all
(
data
[:,
0
:
len
(
self
.
coord_arrays
)]
==
self
.
input_data
[:,
0
:
len
(
self
.
coord_arrays
)]
):
logging
.
info
(
'Old data found with matching input, no search performed'
)
'Old data found
in "{:s}"
with matching input, no search performed'
.
format
(
self
.
out_file
)
)
return
data
else
:
logging
.
info
(
'Old data found, input differs, continuing with grid search'
)
'Old data found
in "{:s}"
, input differs, continuing with grid search'
.
format
(
self
.
out_file
)
)
return
False
return
False
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment