Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions optimas/evaluators/template_evaluator.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,14 @@ def _register_app(self) -> None:
# Determine executable path.
if self.sim_template.endswith(".py"):
executable_path = os.path.basename(self.sim_template)
elif self.precedent is not None:
# Could be a container call in precedent. In that case,
# the executable is not available on the host system and
# we just forward what the user provided.
assert (
self.executable is not None
), "An executable must be provided for non-Python simulations"
executable_path = self.executable
else:
# By default, if the template is not a `.py` file, we run
# it with an executable.
Expand Down
Loading