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
5fc19e63
Commit
5fc19e63
authored
Sep 23, 2024
by
Hejing Li
Browse files
instantiation/base.py: fix bug in _join_path
parent
3b64ebfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
experiments/simbricks/orchestration/instantiation/base.py
experiments/simbricks/orchestration/instantiation/base.py
+4
-4
No files found.
experiments/simbricks/orchestration/instantiation/base.py
View file @
5fc19e63
...
...
@@ -272,10 +272,10 @@ class Instantiation(util_base.IdObj):
self
,
base
:
str
=
""
,
relative_path
:
str
=
""
,
enforce_existence
=
True
)
->
str
:
path
=
pathlib
.
Path
(
base
)
path
.
joinpath
(
relative_path
)
if
not
path
.
exists
()
and
enforce_existence
:
joined
=
path
.
joinpath
(
relative_path
)
if
not
joined
.
exists
()
and
enforce_existence
:
raise
Exception
(
f
"couldn't join
{
base
}
and
{
relative_path
}
"
)
return
path
.
absolute
()
return
joined
.
absolute
()
def
join_repo_base
(
self
,
relative_path
:
str
)
->
str
:
return
self
.
_join_paths
(
...
...
@@ -317,6 +317,6 @@ class Instantiation(util_base.IdObj):
def
get_simulation_output_path
(
self
,
run_number
:
int
)
->
str
:
return
self
.
_join_paths
(
base
=
self
.
_env
.
_output_base
,
relative_path
=
f
"
/
{
self
.
_env
.
_output_base
}
-
{
run_number
}
.json"
,
relative_path
=
f
"
out
-
{
run_number
}
.json"
,
enforce_existence
=
False
,
)
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