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
347830e0
Commit
347830e0
authored
Sep 13, 2024
by
Hejing Li
Browse files
fix some more errors
parent
32271a5b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
6 deletions
+7
-6
experiments/run_new.py
experiments/run_new.py
+3
-2
experiments/simbricks/orchestration/instantiation/base.py
experiments/simbricks/orchestration/instantiation/base.py
+1
-1
experiments/simbricks/orchestration/runtime_new/runs/local.py
...riments/simbricks/orchestration/runtime_new/runs/local.py
+2
-2
experiments/simbricks/orchestration/simulation/output.py
experiments/simbricks/orchestration/simulation/output.py
+1
-1
No files found.
experiments/run_new.py
View file @
347830e0
...
@@ -267,7 +267,7 @@ def add_exp(
...
@@ -267,7 +267,7 @@ def add_exp(
create_cp
:
bool
,
create_cp
:
bool
,
restore_cp
:
bool
,
restore_cp
:
bool
,
args
:
argparse
.
Namespace
,
args
:
argparse
.
Namespace
,
)
->
inst_base
.
InstantiationEnvironment
:
):
outpath
=
f
"
{
args
.
outdir
}
/
{
simulation
.
name
}
-
{
run_number
}
.json"
outpath
=
f
"
{
args
.
outdir
}
/
{
simulation
.
name
}
-
{
run_number
}
.json"
if
os
.
path
.
exists
(
outpath
)
and
not
args
.
force
:
if
os
.
path
.
exists
(
outpath
)
and
not
args
.
force
:
...
@@ -299,9 +299,10 @@ def add_exp(
...
@@ -299,9 +299,10 @@ def add_exp(
tmp_simulation_files
=
tmp_sim_files
,
tmp_simulation_files
=
tmp_sim_files
,
)
)
inst_
=
inst_base
.
Instantiation
(
inst_env
)
run
=
runs
.
base
.
Run
(
run
=
runs
.
base
.
Run
(
simulation
=
simulation
,
simulation
=
simulation
,
instantiation
=
inst_
env
,
instantiation
=
inst_
,
prereq
=
prereq
,
prereq
=
prereq
,
)
)
...
...
experiments/simbricks/orchestration/instantiation/base.py
View file @
347830e0
...
@@ -240,7 +240,7 @@ class Instantiation(util_base.IdObj):
...
@@ -240,7 +240,7 @@ class Instantiation(util_base.IdObj):
# some sort of runtime on each machine that executes thus making pasing
# some sort of runtime on each machine that executes thus making pasing
# an executor in here obsolete...
# an executor in here obsolete...
wrkdir
=
self
.
_instantiation
.
wrkdir
()
wrkdir
=
self
.
wrkdir
()
shutil
.
rmtree
(
wrkdir
,
ignore_errors
=
True
)
shutil
.
rmtree
(
wrkdir
,
ignore_errors
=
True
)
await
executor
.
rmtree
(
wrkdir
)
await
executor
.
rmtree
(
wrkdir
)
...
...
experiments/simbricks/orchestration/runtime_new/runs/local.py
View file @
347830e0
...
@@ -51,11 +51,11 @@ class LocalSimpleRuntime(run_base.Runtime):
...
@@ -51,11 +51,11 @@ class LocalSimpleRuntime(run_base.Runtime):
"""Actually executes `run`."""
"""Actually executes `run`."""
try
:
try
:
runner
=
simulation_executor
.
ExperimentSimpleRunner
(
runner
=
simulation_executor
.
ExperimentSimpleRunner
(
self
.
_executor
,
run
.
_simulation
,
run
.
_inst
_env
,
self
.
verbose
self
.
_executor
,
run
.
_simulation
,
run
.
_inst
antiation
,
self
.
_
verbose
)
)
if
self
.
_profile_int
:
if
self
.
_profile_int
:
runner
.
profile_int
=
self
.
profile_int
runner
.
profile_int
=
self
.
profile_int
await
run
.
prep_dirs
(
self
.
executor
)
await
run
.
prep_dirs
(
self
.
_
executor
)
await
runner
.
prepare
()
await
runner
.
prepare
()
except
asyncio
.
CancelledError
:
except
asyncio
.
CancelledError
:
# it is safe to just exit here because we are not running any
# it is safe to just exit here because we are not running any
...
...
experiments/simbricks/orchestration/simulation/output.py
View file @
347830e0
...
@@ -32,7 +32,7 @@ class SimulationOutput:
...
@@ -32,7 +32,7 @@ class SimulationOutput:
self
.
_end_time
:
float
=
None
self
.
_end_time
:
float
=
None
self
.
_success
:
bool
=
True
self
.
_success
:
bool
=
True
self
.
_interrupted
:
bool
=
False
self
.
_interrupted
:
bool
=
False
self
.
_metadata
=
exp
.
metadata
self
.
_metadata
=
sim
.
metadata
self
.
_sims
:
dict
[
str
,
dict
[
str
,
str
|
list
[
str
]]]
=
{}
self
.
_sims
:
dict
[
str
,
dict
[
str
,
str
|
list
[
str
]]]
=
{}
def
set_start
(
self
)
->
None
:
def
set_start
(
self
)
->
None
:
...
...
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