[Documentation] Call shell scripts with extra resources inside the submitted Python function
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- documentation, hpc
Research direction
Start with the linked nested-executors documentation and the repository’s existing HPC job documentation; no specific file is named in the issue. Document how SLURM shell scripts and Flux nested executors receive extra resources at submission time, using the shown Python example as the reference for what done looks like.
Written by the indexing model from the issue text.
Description
For SLURM each call of srun creates a new job step, so there is no need to assign any resources to the specific Python function, just assign the resources to the external shell script directly.
For flux there is the option to use nested executors:
https://executorlib.readthedocs.io/en/latest/3-hpc-job.html#nested-executors
Still this option can also be assigned during the submission - just like all the other options:
from executorlib import FluxJobExecutor
def get_available_gpus(lst):
import socket
from tensorflow.python.client import device_lib
local_device_protos = device_lib.list_local_devices()
return [
(x.name, x.physical_device_desc, socket.gethostname())
for x in local_device_protos if x.device_type == "GPU"
] + lst
with FluxJobExecutor() as exe:
fs = []
for i in range(1, 4):
fs = exe.submit(
get_available_gpus,
lst=fs,
resource_dict={"cores": 1, "gpus_per_core": 1, "flux_executor_nesting": True},
)
print(fs.result())
- Dominant language
- Python
- Stars
- 77
- Forks
- 7
- Avg merge
- 10h 32m
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from pyiron/executorlib
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pyiron/executorlib#1054 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pyiron/executorlib#1032 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pyiron/executorlib#1005 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
pyiron/executorlib#1049 · 1 comment ·
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 35/100
pyiron/executorlib#999 · 1 comment ·
All issues in pyiron/executorlib
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/skills#1811 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
datalayer/mcp-compose#42 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
UKGovernmentBEIS/inspect_evals#2523 ·