[Experimental] Background Mode Jobs
# Set the RAY_ADDRESS environment variable to select an anyscale cluster
export RAY_ADDRESS="anyscale://cluster"
# Note: myscript.py is a python script that called ray.init()
# Interactive: this will run with the driver on the laptop
python myscript.py
# This will run with the driver on the head node
anyscale run -- python myscript.py
anyscale run -- rllib train -f train.yml
# You can also specify the runtime environment of your driver
# See https://docs.ray.io/en/latest/advanced.html#runtime-environments
# To see the format of supported runtime environments
anyscale run --env env.yaml -- python myscript.py
# When you disconnect from your laptop, you should see a message printed:
...
This job will continue to run in background mode on Anyscale.
Job URL: https://anyscale.dev/jobs/job_VbYvaeTQ31gvm1ftyB8VR49Y
To kill this job, run the following in your terminal.
`anyscale kill job_VbYvaeTQ31gvm1ftyB8VR49Y`
# Kill the job
anyscale kill job_VbYvaeTQ31gvm1ftyB8VR49YLast updated
Was this helpful?
