Skip to content

Commit

Permalink
Add DocStrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Jun 25, 2024
1 parent 5026cc6 commit 0d8c3ba
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
19 changes: 18 additions & 1 deletion pympipool/interactive/flux.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,28 @@ def __init__(
self._pmi = pmi
self._future = None

def bootup(self, command_lst: list[str]):
def bootup(
self,
command_lst: list[str],
prefix_name: Optional[str] = None,
prefix_path: Optional[str] = None,
):
"""
Boot up the client process to connect to the SocketInterface.
Args:
command_lst (list): list of strings to start the client process
prefix_name (str): name of the conda environment to initialize
prefix_path (str): path of the conda environment to initialize
"""
if self._oversubscribe:
raise ValueError(
"Oversubscribing is currently not supported for the Flux adapter."
)
if prefix_name is not None or prefix_path is not None:
raise ValueError(
"Conda environments are currently not supported for the Flux adapter."
)
if self._executor is None:
self._executor = flux.job.FluxExecutor()
jobspec = flux.job.JobspecV1.from_command(
Expand Down
2 changes: 2 additions & 0 deletions pympipool/shared/communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def bootup(
Args:
command_lst (list): list of strings to start the client process
prefix_name (str): name of the conda environment to initialize
prefix_path (str): path of the conda environment to initialize
"""
self._interface.bootup(
command_lst=command_lst, prefix_name=prefix_name, prefix_path=prefix_path
Expand Down
7 changes: 6 additions & 1 deletion pympipool/shared/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ def __init__(self, cwd: str, cores: int = 1, oversubscribe: bool = False):
self._cores = cores
self._oversubscribe = oversubscribe

def bootup(self, command_lst: list[str]):
def bootup(
self,
command_lst: list[str],
prefix_name: Optional[str] = None,
prefix_path: Optional[str] = None,
):
raise NotImplementedError

def shutdown(self, wait: bool = True):
Expand Down

0 comments on commit 0d8c3ba

Please sign in to comment.