Something like
{% if job_type == 'topaz_train' %}
{% set mem_size = ram_gb*2 %}
{% endif %}
[...]
#SBATCH --mem={{ mem_size }}GB
or to conditionally choose different slurm partition etc.
Users often don’t know (and don’t want to know and remember) which job will need more memory, on which lane and partition it’s the best to run etc. With this I can make simple jinja-based logic in default cluster-wide lane covering 90% of most common cases and hide all this from users, save their and my time.