@@ -34,18 +34,71 @@ Quick Start
3434
3535.. code-block :: python
3636
37- from ray_utilities.setup import PPOSetup
37+ from ray_utilities.config import DefaultArgumentParser
3838 from ray_utilities.runfiles import run_tune
39+ from ray_utilities.setup import PPOSetup
3940
40- with PPOSetup() as setup:
41+ with (
42+ DefaultArgumentParser.patch_args(
43+ # Override default CLI arguments. Passed CLI arguments still have a higher priority.
44+ " --batch-size" , 1024 ,
45+ ),
46+ PPOSetup() as setup
47+ ):
4148 # Inside the with block modify your configuration
42- setup.config.env = " CartPole-v1"
49+ # setup.config can be any AlgorithmConfig
50+ setup.config.environment(env = " CartPole-v1" )
4351 setup.config.lr = 0.001
44- # Now the config is frozen and the setup.trainable is build
52+ # After the with block the config is frozen and the setup.trainable is ready to use with Ray Tune
4553
4654 # Run hyperparameter optimization
4755 results = run_tune(setup)
4856
57+
58+ Ray Job Submission CLI
59+ ----------------------
60+
61+ The script ``ray_submit.py `` provides a command-line interface for submitting and monitoring Ray jobs in bulk using a YAML configuration file.
62+ It leverages the Ray Job Submission API to automate experiment runs and track their status.
63+ See one of the submission scripts in ``experiments/ `` for example usage how to define an entrypoint template and replacement variables.
64+
65+ **Basic Usage: **
66+
67+ .. code-block :: bash
68+
69+ # Basic use
70+ python ray_submit.py < group| " all" | " monitor" | " restore" > < submissions_file.yaml> [--address < RAY_DASHBOARD_URL> ] [--max-jobs < N> ] [--test]
71+
72+ # View the help message for detailed options
73+ python ray_submit.py --help
74+
75+ **Arguments: **
76+
77+ - ``group ``: The group key in the YAML file to run, ``all `` for all groups, or ``monitor `` to only monitor jobs.
78+ ``restore `` can be used to restore failed jobs. These must be labled with ``status: RESTORE `` in the YAML file.
79+ - ``submissions_file ``: Path to the YAML file containing job definitions.
80+ - ``monitor_group ``: (Optional) Additional group(s) to monitor.
81+
82+ **Options: **
83+
84+ - ``--address ``: Address of the Ray cluster (default: uses ``DASHBOARD_ADDRESS `` env or ``localhost:8265 ``).
85+ - ``--test ``: Run in test mode without submitting jobs.
86+ - ``--failed-only ``: Only submit jobs that have previously failed.
87+ - ``--max-jobs ``: Maximum number of jobs to submit concurrently.
88+ - ``--excludes ... ``: Space-separated key words in the job name to exclude from submission.
89+ - ``--includes ... ``: Space-separated key words in the job name to include for submission, excludes all non-matching jobs.
90+
91+ **Example: **
92+
93+ .. code-block :: bash
94+
95+ python ray_submit.py all submissions.yaml --failed-only
96+
97+ This will submit all jobs defined in ``submissions.yaml `` that have previously failed, using the specified Ray cluster address.
98+
99+ For more details, see the script's docstring or run ``python ray_submit.py --help ``.
100+
101+
49102Installation
50103------------
51104
0 commit comments