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
ycai
simbricks
Commits
ad89039a
"vscode:/vscode.git/clone" did not exist on "a3515c8b0f14a896924c567576ffe69962965d66"
Commit
ad89039a
authored
Jun 12, 2022
by
Antoine Kaufmann
Browse files
experiments: make sure logparser.py works on non 'out/' directories
parent
667403ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
experiments/pyexps/log_parser.py
experiments/pyexps/log_parser.py
+4
-4
No files found.
experiments/pyexps/log_parser.py
View file @
ad89039a
...
@@ -34,14 +34,14 @@ import re
...
@@ -34,14 +34,14 @@ import re
log_file
=
sys
.
argv
[
1
]
log_file
=
sys
.
argv
[
1
]
log
=
open
(
log_file
,
'r'
)
log
=
open
(
log_file
,
'r'
)
curdir
=
pathlib
.
Path
().
absolute
()
exp_log
=
json
.
load
(
log
)
exp_log
=
json
.
load
(
log
)
run_num
=
re
.
split
(
'-|\.'
,
log_file
)[
-
2
]
run_num
=
re
.
split
(
'-|\.'
,
log_file
)[
-
2
]
#Name, starting & ending time
#Name, starting & ending time
exp_name
=
exp_log
[
'exp_name'
]
exp_name
=
exp_log
[
'exp_name'
]
tooutdir
=
f
'out/
{
exp_name
}
/
{
run_num
}
'
outdir
=
os
.
path
.
join
(
curdir
,
tooutdir
)
p
=
pathlib
.
Path
(
log_file
)
tooutdir
=
f
'/
{
exp_name
}
/
{
run_num
}
'
outdir
=
'/'
.
join
(
list
(
p
.
parts
)[
0
:
-
1
])
+
tooutdir
if
not
os
.
path
.
exists
(
outdir
):
if
not
os
.
path
.
exists
(
outdir
):
raise
Exception
(
"no such directory"
)
raise
Exception
(
"no such directory"
)
...
...
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