Unverified Commit dbba6af3 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

symphony/orchestration: don't create default inst env

Should be explicitly created by the runtime later and set.
parent 775b5042
...@@ -81,11 +81,10 @@ class Instantiation(): ...@@ -81,11 +81,10 @@ class Instantiation():
def __init__( def __init__(
self, self,
sim: sim_base.Simulation, sim: sim_base.Simulation,
env: InstantiationEnvironment = InstantiationEnvironment(),
): ):
self._id = next(self.__id_iter) self._id = next(self.__id_iter)
self.simulation: sim_base.Simulation = sim self.simulation: sim_base.Simulation = sim
self.env: InstantiationEnvironment = env self.env: InstantiationEnvironment | None = None
self._executor: command_executor.Executor | None = None self._executor: command_executor.Executor | None = None
self._create_checkpoint: bool = False self._create_checkpoint: bool = False
self._restore_checkpoint: bool = False self._restore_checkpoint: bool = False
...@@ -332,7 +331,7 @@ class Instantiation(): ...@@ -332,7 +331,7 @@ class Instantiation():
self._restore_checkpoint = restore_checkpoint self._restore_checkpoint = restore_checkpoint
def copy(self) -> Instantiation: def copy(self) -> Instantiation:
cop = Instantiation(sim=self.simulation, env=self.env) cop = Instantiation(sim=self.simulation)
cop.simulation = copy.deepcopy(self.simulation) # maybe there is a smarter way of achieving this... cop.simulation = copy.deepcopy(self.simulation) # maybe there is a smarter way of achieving this...
cop._create_checkpoint = self._create_checkpoint cop._create_checkpoint = self._create_checkpoint
cop._restore_checkpoint = self._restore_checkpoint cop._restore_checkpoint = self._restore_checkpoint
......
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