-
Notifications
You must be signed in to change notification settings - Fork 10
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
feature: Ability to add custom resources to executor #32
Comments
Looking at previous notices - I think I like this design slightly better: rule a:
input: ...
output: ...
resources:
kueue.container=ghcr.io/rse-ops/mamba:app-mamba
shell:
"..." It clearly distinguishes the separation between executor name ( |
Here is the bug again - no matter what I try:
|
And then when I get it (maybe closer?) it tells me my name is an unexpected keyword (this is the same for kueue.container or kueue_container)
# By convention, the first pseudorule should be called "all"
# We're using the expand() function to create multiple targets
rule all:
input:
expand(
"{greeting}/world.txt",
greeting = ['hello', 'hola'],
),
# First real rule, this is using a wildcard called "greeting"
rule hello_world:
# Note that this is the default, shown for example only
output:
"{greeting}/world.txt"
resources:
kueue.container="ghcr.io/rse-ops/mamba:app-mamba"
shell:
"""
mkdir -p "{wildcards.greeting}"
echo "{wildcards.greeting}, World!" > {output}
""" |
Ah! I finally got one working! it doesn't like the dot syntax, and the spacing / characters have to be consistent. # By convention, the first pseudorule should be called "all"
# We're using the expand() function to create multiple targets
rule all:
input:
expand(
"{greeting}/world.txt",
greeting = ['hello', 'hola'],
),
# First real rule, this is using a wildcard called "greeting"
rule hello_world:
output:
"{greeting}/world.txt",
resources:
kueue_container="ghcr.io/rse-ops/mamba:app-mamba"
shell:
"""
mkdir -p "{wildcards.greeting}"
echo "{wildcards.greeting}, World!" > {output}
""" |
It would be good for the executor interface to have, akin to the command line arguments, an easy way to add custom resources to a step. I had tried adding these for the Kueue executor I was working on https://github.com/snakemake/snakemake-executor-kueue#job-resources but ran into bugs / issues (I think I reported somewhere but don't remember off the top of my head now!)
Now that the interface is more established, I am going to go back to Kueue and give it another look, and I can possibly make suggestions about how to go about it. I'm actually starting on the skeleton for Google Batch this morning - I'm just about ready to record my talk (thank goodness) so time should be opening up shortly and I'm super excited to get this underway!
I'll report back here if I make some time to work on the executor interface. My thinking is that we want something that mirrors the command line arguments, eg..,
The above would be acceptable as:
I'll see if I can prototype something today after batch and the kueue refactor!
The text was updated successfully, but these errors were encountered: