Skip to content

Conversation

@JBlaschke
Copy link
Contributor

@JBlaschke JBlaschke commented Apr 11, 2023

This is a relatively simple addition to the rlaunch CLI tool: When --json is provided, then the inputs to -l and -w are JSON-formatted strings. This is mainly to allow for LaunchPad and FWorker to be specified in a python script, without having to generate these files first.

An example workflow can be found here: https://github.com/JBlaschke/alcc-recipes/blob/jpb/fireworks/fireworks/test_3_python/fw.py#L26 where a python script manages a 2-node and a 4-node slurm job. In this case fworker_1, and fworker_2 need to be passed to the slurm script in addition to launchpad. With the addition of a --json flag, this can be handled from the command line without needing to manage additional files.

Tagging @lastephey and @computron

@computron
Copy link
Member

Thanks! But I see a typo:

launchpad_generator = lambda x: LaunchPad.form_file(x)

Can you fix and also run through the confirm the previous options are working correctly after the changes?

@JBlaschke
Copy link
Contributor Author

@computron thanks for catching that! Fixed.

@janosh
Copy link
Member

janosh commented May 15, 2023

@JBlaschke Could you add a test for this?

@janosh janosh added the needs testing Test all the things label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs testing Test all the things

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants