|
6 | 6 | import anyscale
|
7 | 7 | from anyscale.sdk.anyscale_client.models import (
|
8 | 8 | CreateProductionJob,
|
| 9 | + CreateProductionJobConfig, |
9 | 10 | HaJobStates,
|
10 | 11 | )
|
11 | 12 | from ray_release.anyscale_util import get_cluster_name
|
@@ -71,20 +72,19 @@ def _run_job(
|
71 | 72 | runtime_env["upload_path"] = upload_path
|
72 | 73 |
|
73 | 74 | try:
|
74 |
| - job_response = anyscale_client.create_job( |
75 |
| - CreateProductionJob( |
76 |
| - name=self.cluster_manager.cluster_name, |
77 |
| - description=f"Smoke test: {self.cluster_manager.smoke_test}", |
78 |
| - project_id=self.cluster_manager.project_id, |
79 |
| - config=dict( |
80 |
| - entrypoint=cmd_to_run, |
81 |
| - runtime_env=runtime_env, |
82 |
| - build_id=self.cluster_manager.cluster_env_build_id, |
83 |
| - compute_config_id=self.cluster_manager.cluster_compute_id, |
84 |
| - max_retries=0, |
85 |
| - ), |
| 75 | + job_request = CreateProductionJob( |
| 76 | + name=self.cluster_manager.cluster_name, |
| 77 | + description=f"Smoke test: {self.cluster_manager.smoke_test}", |
| 78 | + project_id=self.cluster_manager.project_id, |
| 79 | + config=CreateProductionJobConfig( |
| 80 | + entrypoint=cmd_to_run, |
| 81 | + runtime_env=runtime_env, |
| 82 | + build_id=self.cluster_manager.cluster_env_build_id, |
| 83 | + compute_config_id=self.cluster_manager.cluster_compute_id, |
| 84 | + max_retries=0, |
86 | 85 | ),
|
87 | 86 | )
|
| 87 | + job_response = anyscale_client.create_job(job_request) |
88 | 88 | except Exception as e:
|
89 | 89 | raise JobStartupFailed(
|
90 | 90 | "Error starting job with name "
|
|
0 commit comments