From a5e53d09c472b7feab9f22ddbfea7176a623c9fa Mon Sep 17 00:00:00 2001 From: Andrew Shao Date: Wed, 18 Jun 2025 10:03:35 +0200 Subject: [PATCH] Bypass executable check when creating RunSettings In some instances, the strong check that the executable can be found by the driver script when creating RunSettings is too restrictive. This can occur in cases where the binary does not exist on the node where the driver script is being launched (e.g. remote execution) or for binaries which need to be found after setting environment variables. --- smartsim/settings/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smartsim/settings/base.py b/smartsim/settings/base.py index 48e9ae4a2..82e0aee99 100644 --- a/smartsim/settings/base.py +++ b/smartsim/settings/base.py @@ -53,6 +53,7 @@ def __init__( run_args: t.Optional[t.Dict[str, t.Union[int, str, float, None]]] = None, env_vars: t.Optional[t.Dict[str, t.Optional[str]]] = None, container: t.Optional[Container] = None, + skip_exe_check: bool = False, **_kwargs: t.Any, ) -> None: """Run parameters for a ``Model`` @@ -82,7 +83,7 @@ def __init__( :param container: container type for workload (e.g. "singularity") """ # Do not expand executable if running within a container - self.exe = [exe] if container else [expand_exe_path(exe)] + self.exe = [exe] if container or skip_exe_check else [expand_exe_path(exe)] self.exe_args = exe_args or [] self.run_args = run_args or {} self.env_vars = env_vars or {}