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
789df39b
Unverified
Commit
789df39b
authored
Oct 09, 2024
by
Jakob Görgen
Browse files
more explicit instantiation copy
parent
4b276d42
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
experiments/run_new.py
experiments/run_new.py
+0
-2
experiments/simbricks/orchestration/instantiation/base.py
experiments/simbricks/orchestration/instantiation/base.py
+6
-0
No files found.
experiments/run_new.py
View file @
789df39b
...
...
@@ -350,8 +350,6 @@ def main():
for
index
in
range
(
args
.
firstrun
,
args
.
firstrun
+
args
.
runs
):
inst_copy
=
inst
.
copy
()
inst_copy
.
preserve_tmp_folder
=
False
inst_copy
.
create_checkpoint
=
inst
.
create_checkpoint
inst_copy
.
restore_checkpoint
=
inst
.
restore_checkpoint
if
index
==
args
.
firstrun
+
args
.
runs
-
1
:
inst_copy
.
_preserve_checkpoints
=
False
add_exp
(
instantiation
=
inst_copy
,
rt
=
rt
,
prereq
=
prereq
)
...
...
experiments/simbricks/orchestration/instantiation/base.py
View file @
789df39b
...
...
@@ -337,6 +337,12 @@ class Instantiation():
def
copy
(
self
)
->
Instantiation
:
cop
=
Instantiation
(
sim
=
self
.
simulation
,
env
=
self
.
env
)
cop
.
simulation
=
copy
.
deepcopy
(
self
.
simulation
)
# maybe there is a smarter way of achieving this...
cop
.
_create_checkpoint
=
self
.
_create_checkpoint
cop
.
_restore_checkpoint
=
self
.
_restore_checkpoint
cop
.
_preserve_checkpoints
=
self
.
_preserve_checkpoints
cop
.
preserve_tmp_folder
=
self
.
preserve_tmp_folder
cop
.
_socket_per_interface
=
{}
cop
.
_sim_dependency
=
{}
return
cop
def
out_base_dir
(
self
)
->
str
:
...
...
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