pytorch_training_e2e_submit.py 667 B

12345678910111213141516171819
  1. from ray.job_submission import JobSubmissionClient
  2. client = JobSubmissionClient("http://127.0.0.1:8265")
  3. kick_off_pytorch_benchmark = (
  4. # Clone ray. If ray is already present, don't clone again.
  5. "git clone -b ray-2.2.0 https://github.com/ray-project/ray || true;"
  6. # Run the benchmark.
  7. "python ray/release/air_tests/air_benchmarks/workloads/pytorch_training_e2e.py"
  8. " --data-size-gb=1 --num-epochs=2 --num-workers=1"
  9. )
  10. submission_id = client.submit_job(
  11. entrypoint=kick_off_pytorch_benchmark,
  12. )
  13. print("Use the following command to follow this Job's logs:")
  14. print(f"ray job logs '{submission_id}' --address http://127.0.0.1:8265 --follow")