Commit 347830e0 authored by Hejing Li's avatar Hejing Li
Browse files

fix some more errors

parent 32271a5b
......@@ -267,7 +267,7 @@ def add_exp(
create_cp: bool,
restore_cp: bool,
args: argparse.Namespace,
) -> inst_base.InstantiationEnvironment:
):
outpath = f"{args.outdir}/{simulation.name}-{run_number}.json"
if os.path.exists(outpath) and not args.force:
......@@ -299,9 +299,10 @@ def add_exp(
tmp_simulation_files=tmp_sim_files,
)
inst_ = inst_base.Instantiation(inst_env)
run = runs.base.Run(
simulation=simulation,
instantiation=inst_env,
instantiation=inst_,
prereq=prereq,
)
......
......@@ -240,7 +240,7 @@ class Instantiation(util_base.IdObj):
# some sort of runtime on each machine that executes thus making pasing
# an executor in here obsolete...
wrkdir = self._instantiation.wrkdir()
wrkdir = self.wrkdir()
shutil.rmtree(wrkdir, ignore_errors=True)
await executor.rmtree(wrkdir)
......
......@@ -51,11 +51,11 @@ class LocalSimpleRuntime(run_base.Runtime):
"""Actually executes `run`."""
try:
runner = simulation_executor.ExperimentSimpleRunner(
self._executor, run._simulation, run._inst_env, self.verbose
self._executor, run._simulation, run._instantiation, self._verbose
)
if self._profile_int:
runner.profile_int = self.profile_int
await run.prep_dirs(self.executor)
await run.prep_dirs(self._executor)
await runner.prepare()
except asyncio.CancelledError:
# it is safe to just exit here because we are not running any
......
......@@ -32,7 +32,7 @@ class SimulationOutput:
self._end_time: float = None
self._success: bool = True
self._interrupted: bool = False
self._metadata = exp.metadata
self._metadata = sim.metadata
self._sims: dict[str, dict[str, str | list[str]]] = {}
def set_start(self) -> None:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment