Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate command and job script interpolation. #16

Open
bschroeter opened this issue Jul 18, 2024 · 0 comments
Open

Separate command and job script interpolation. #16

bschroeter opened this issue Jul 18, 2024 · 0 comments
Labels
enhancement New feature or request v1.0.0 Required for v1.0.0 release.

Comments

@bschroeter
Copy link
Collaborator

Interpolation into the command and job script is (mostly) handled through additional kwargs into the submit function, however, with the addition of advanced directives I can see this quickly getting out of hand, particularly when a keyword argument that influences directives also conflicts with something that should be interpolated into the job script proper (i.e. storage).

Suggest having explicit dictionaries for command / job script arguments, OR leaving the directives as a dictionary that can also be accessed via jinja (inside the job script).

For example:

job_id = client.submit("job.sh", cargs=dict(), jargs=dict())

# ....OR something like

# assumed storage=["gdata/rp24", "scratch/rp23"]

# Maintain both a rendered and unrendered version
directives["storage"] = storage
directives_str = self._render_directives(directives)

# Add both to the interpolation context
context["directives"] = directives
context["directives_str"] = directives_str

I'll just leave this issue here for something to think about.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v1.0.0 Required for v1.0.0 release.
Projects
None yet
Development

No branches or pull requests

1 participant