anyscale 0.26.3__py3-none-any.whl → 0.26.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. anyscale/_private/anyscale_client/anyscale_client.py +1 -5
  2. anyscale/_private/docgen/__main__.py +0 -3
  3. anyscale/_private/docgen/api.md +0 -40
  4. anyscale/_private/docgen/models.md +2 -50
  5. anyscale/_private/workload/workload_config.py +11 -0
  6. anyscale/_private/workload/workload_sdk.py +4 -0
  7. anyscale/anyscale-cloud-setup-gcp-oa.yaml +2 -1
  8. anyscale/anyscale-cloud-setup-gcp.yaml +4 -2
  9. anyscale/client/README.md +11 -18
  10. anyscale/client/openapi_client/__init__.py +7 -11
  11. anyscale/client/openapi_client/api/default_api.py +537 -951
  12. anyscale/client/openapi_client/models/__init__.py +7 -11
  13. anyscale/client/openapi_client/models/{anyscale_version_response.py → backend_server_api_product_models_dataset_runs_dataset_response.py} +22 -22
  14. anyscale/client/openapi_client/models/{dataset_response.py → backend_server_api_product_routers_datasets_router_dataset_response.py} +8 -8
  15. anyscale/client/openapi_client/models/{logdetails_response.py → dataset_jobs.py} +22 -22
  16. anyscale/client/openapi_client/models/dataset_metrics.py +390 -0
  17. anyscale/{sdk/anyscale_client/models/session_command_types.py → client/openapi_client/models/dataset_state.py} +11 -9
  18. anyscale/client/openapi_client/models/{log_details.py → metric.py} +64 -42
  19. anyscale/client/openapi_client/models/node_type.py +2 -1
  20. anyscale/client/openapi_client/models/operator_metrics.py +256 -0
  21. anyscale/client/openapi_client/models/ray_runtime_env_config.py +29 -1
  22. anyscale/client/openapi_client/models/train_run.py +56 -3
  23. anyscale/client/openapi_client/models/train_worker.py +29 -3
  24. anyscale/cluster.py +5 -2
  25. anyscale/commands/anyscale_api/api_commands.py +0 -2
  26. anyscale/connect_utils/start_interactive_session.py +4 -1
  27. anyscale/controllers/cluster_controller.py +15 -26
  28. anyscale/controllers/project_controller.py +1 -6
  29. anyscale/job/_private/job_sdk.py +10 -1
  30. anyscale/job/models.py +8 -0
  31. anyscale/project_utils.py +9 -20
  32. anyscale/sdk/anyscale_client/__init__.py +0 -5
  33. anyscale/sdk/anyscale_client/api/default_api.py +0 -474
  34. anyscale/sdk/anyscale_client/models/__init__.py +0 -5
  35. anyscale/sdk/anyscale_client/models/node_type.py +2 -1
  36. anyscale/sdk/anyscale_client/models/ray_runtime_env_config.py +29 -1
  37. anyscale/version.py +1 -1
  38. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/METADATA +1 -1
  39. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/RECORD +44 -54
  40. anyscale/client/openapi_client/models/anyscaleversionresponse_response.py +0 -121
  41. anyscale/client/openapi_client/models/create_cloud_with_cloud_resource.py +0 -546
  42. anyscale/client/openapi_client/models/decoratedjob_list_response.py +0 -147
  43. anyscale/client/openapi_client/models/log_detail.py +0 -187
  44. anyscale/client/openapi_client/models/provider_metadata.py +0 -205
  45. anyscale/client/openapi_client/models/providermetadata_response.py +0 -121
  46. anyscale/client/openapi_client/models/setup_initialize_session_options.py +0 -225
  47. anyscale/commands/anyscale_api/session_commands_commands.py +0 -80
  48. anyscale/sdk/anyscale_client/models/create_session_command.py +0 -152
  49. anyscale/sdk/anyscale_client/models/session_command.py +0 -350
  50. anyscale/sdk/anyscale_client/models/sessioncommand_list_response.py +0 -147
  51. anyscale/sdk/anyscale_client/models/sessioncommand_response.py +0 -121
  52. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/LICENSE +0 -0
  53. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/NOTICE +0 -0
  54. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/WHEEL +0 -0
  55. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/entry_points.txt +0 -0
  56. {anyscale-0.26.3.dist-info → anyscale-0.26.5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,256 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Managed Ray API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
+
8
+ The version of the OpenAPI document: 0.1.0
9
+ Generated by: https://openapi-generator.tech
10
+ """
11
+
12
+
13
+ import pprint
14
+ import re # noqa: F401
15
+
16
+ import six
17
+
18
+ from openapi_client.configuration import Configuration
19
+
20
+
21
+ class OperatorMetrics(object):
22
+ """NOTE: This class is auto generated by OpenAPI Generator.
23
+ Ref: https://openapi-generator.tech
24
+
25
+ Do not edit the class manually.
26
+ """
27
+
28
+ """
29
+ Attributes:
30
+ openapi_types (dict): The key is attribute name
31
+ and the value is attribute type.
32
+ attribute_map (dict): The key is attribute name
33
+ and the value is json key in definition.
34
+ """
35
+ openapi_types = {
36
+ 'id': 'str',
37
+ 'name': 'str',
38
+ 'state': 'DatasetState',
39
+ 'progress': 'int',
40
+ 'total': 'int',
41
+ 'metrics': 'dict(str, Metric)'
42
+ }
43
+
44
+ attribute_map = {
45
+ 'id': 'id',
46
+ 'name': 'name',
47
+ 'state': 'state',
48
+ 'progress': 'progress',
49
+ 'total': 'total',
50
+ 'metrics': 'metrics'
51
+ }
52
+
53
+ def __init__(self, id=None, name=None, state=None, progress=None, total=None, metrics=None, local_vars_configuration=None): # noqa: E501
54
+ """OperatorMetrics - a model defined in OpenAPI""" # noqa: E501
55
+ if local_vars_configuration is None:
56
+ local_vars_configuration = Configuration()
57
+ self.local_vars_configuration = local_vars_configuration
58
+
59
+ self._id = None
60
+ self._name = None
61
+ self._state = None
62
+ self._progress = None
63
+ self._total = None
64
+ self._metrics = None
65
+ self.discriminator = None
66
+
67
+ self.id = id
68
+ self.name = name
69
+ self.state = state
70
+ self.progress = progress
71
+ self.total = total
72
+ self.metrics = metrics
73
+
74
+ @property
75
+ def id(self):
76
+ """Gets the id of this OperatorMetrics. # noqa: E501
77
+
78
+
79
+ :return: The id of this OperatorMetrics. # noqa: E501
80
+ :rtype: str
81
+ """
82
+ return self._id
83
+
84
+ @id.setter
85
+ def id(self, id):
86
+ """Sets the id of this OperatorMetrics.
87
+
88
+
89
+ :param id: The id of this OperatorMetrics. # noqa: E501
90
+ :type: str
91
+ """
92
+ if self.local_vars_configuration.client_side_validation and id is None: # noqa: E501
93
+ raise ValueError("Invalid value for `id`, must not be `None`") # noqa: E501
94
+
95
+ self._id = id
96
+
97
+ @property
98
+ def name(self):
99
+ """Gets the name of this OperatorMetrics. # noqa: E501
100
+
101
+
102
+ :return: The name of this OperatorMetrics. # noqa: E501
103
+ :rtype: str
104
+ """
105
+ return self._name
106
+
107
+ @name.setter
108
+ def name(self, name):
109
+ """Sets the name of this OperatorMetrics.
110
+
111
+
112
+ :param name: The name of this OperatorMetrics. # noqa: E501
113
+ :type: str
114
+ """
115
+ if self.local_vars_configuration.client_side_validation and name is None: # noqa: E501
116
+ raise ValueError("Invalid value for `name`, must not be `None`") # noqa: E501
117
+
118
+ self._name = name
119
+
120
+ @property
121
+ def state(self):
122
+ """Gets the state of this OperatorMetrics. # noqa: E501
123
+
124
+
125
+ :return: The state of this OperatorMetrics. # noqa: E501
126
+ :rtype: DatasetState
127
+ """
128
+ return self._state
129
+
130
+ @state.setter
131
+ def state(self, state):
132
+ """Sets the state of this OperatorMetrics.
133
+
134
+
135
+ :param state: The state of this OperatorMetrics. # noqa: E501
136
+ :type: DatasetState
137
+ """
138
+ if self.local_vars_configuration.client_side_validation and state is None: # noqa: E501
139
+ raise ValueError("Invalid value for `state`, must not be `None`") # noqa: E501
140
+
141
+ self._state = state
142
+
143
+ @property
144
+ def progress(self):
145
+ """Gets the progress of this OperatorMetrics. # noqa: E501
146
+
147
+
148
+ :return: The progress of this OperatorMetrics. # noqa: E501
149
+ :rtype: int
150
+ """
151
+ return self._progress
152
+
153
+ @progress.setter
154
+ def progress(self, progress):
155
+ """Sets the progress of this OperatorMetrics.
156
+
157
+
158
+ :param progress: The progress of this OperatorMetrics. # noqa: E501
159
+ :type: int
160
+ """
161
+ if self.local_vars_configuration.client_side_validation and progress is None: # noqa: E501
162
+ raise ValueError("Invalid value for `progress`, must not be `None`") # noqa: E501
163
+
164
+ self._progress = progress
165
+
166
+ @property
167
+ def total(self):
168
+ """Gets the total of this OperatorMetrics. # noqa: E501
169
+
170
+
171
+ :return: The total of this OperatorMetrics. # noqa: E501
172
+ :rtype: int
173
+ """
174
+ return self._total
175
+
176
+ @total.setter
177
+ def total(self, total):
178
+ """Sets the total of this OperatorMetrics.
179
+
180
+
181
+ :param total: The total of this OperatorMetrics. # noqa: E501
182
+ :type: int
183
+ """
184
+ if self.local_vars_configuration.client_side_validation and total is None: # noqa: E501
185
+ raise ValueError("Invalid value for `total`, must not be `None`") # noqa: E501
186
+
187
+ self._total = total
188
+
189
+ @property
190
+ def metrics(self):
191
+ """Gets the metrics of this OperatorMetrics. # noqa: E501
192
+
193
+
194
+ :return: The metrics of this OperatorMetrics. # noqa: E501
195
+ :rtype: dict(str, Metric)
196
+ """
197
+ return self._metrics
198
+
199
+ @metrics.setter
200
+ def metrics(self, metrics):
201
+ """Sets the metrics of this OperatorMetrics.
202
+
203
+
204
+ :param metrics: The metrics of this OperatorMetrics. # noqa: E501
205
+ :type: dict(str, Metric)
206
+ """
207
+ if self.local_vars_configuration.client_side_validation and metrics is None: # noqa: E501
208
+ raise ValueError("Invalid value for `metrics`, must not be `None`") # noqa: E501
209
+
210
+ self._metrics = metrics
211
+
212
+ def to_dict(self):
213
+ """Returns the model properties as a dict"""
214
+ result = {}
215
+
216
+ for attr, _ in six.iteritems(self.openapi_types):
217
+ value = getattr(self, attr)
218
+ if isinstance(value, list):
219
+ result[attr] = list(map(
220
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
221
+ value
222
+ ))
223
+ elif hasattr(value, "to_dict"):
224
+ result[attr] = value.to_dict()
225
+ elif isinstance(value, dict):
226
+ result[attr] = dict(map(
227
+ lambda item: (item[0], item[1].to_dict())
228
+ if hasattr(item[1], "to_dict") else item,
229
+ value.items()
230
+ ))
231
+ else:
232
+ result[attr] = value
233
+
234
+ return result
235
+
236
+ def to_str(self):
237
+ """Returns the string representation of the model"""
238
+ return pprint.pformat(self.to_dict())
239
+
240
+ def __repr__(self):
241
+ """For `print` and `pprint`"""
242
+ return self.to_str()
243
+
244
+ def __eq__(self, other):
245
+ """Returns true if both objects are equal"""
246
+ if not isinstance(other, OperatorMetrics):
247
+ return False
248
+
249
+ return self.to_dict() == other.to_dict()
250
+
251
+ def __ne__(self, other):
252
+ """Returns true if both objects are not equal"""
253
+ if not isinstance(other, OperatorMetrics):
254
+ return True
255
+
256
+ return self.to_dict() != other.to_dict()
@@ -35,6 +35,7 @@ class RayRuntimeEnvConfig(object):
35
35
  openapi_types = {
36
36
  'working_dir': 'str',
37
37
  'py_modules': 'list[str]',
38
+ 'py_executable': 'str',
38
39
  'pip': 'list[str]',
39
40
  'conda': 'object',
40
41
  'env_vars': 'dict(str, str)',
@@ -44,13 +45,14 @@ class RayRuntimeEnvConfig(object):
44
45
  attribute_map = {
45
46
  'working_dir': 'working_dir',
46
47
  'py_modules': 'py_modules',
48
+ 'py_executable': 'py_executable',
47
49
  'pip': 'pip',
48
50
  'conda': 'conda',
49
51
  'env_vars': 'env_vars',
50
52
  'config': 'config'
51
53
  }
52
54
 
53
- def __init__(self, working_dir=None, py_modules=None, pip=None, conda=None, env_vars=None, config=None, local_vars_configuration=None): # noqa: E501
55
+ def __init__(self, working_dir=None, py_modules=None, py_executable=None, pip=None, conda=None, env_vars=None, config=None, local_vars_configuration=None): # noqa: E501
54
56
  """RayRuntimeEnvConfig - a model defined in OpenAPI""" # noqa: E501
55
57
  if local_vars_configuration is None:
56
58
  local_vars_configuration = Configuration()
@@ -58,6 +60,7 @@ class RayRuntimeEnvConfig(object):
58
60
 
59
61
  self._working_dir = None
60
62
  self._py_modules = None
63
+ self._py_executable = None
61
64
  self._pip = None
62
65
  self._conda = None
63
66
  self._env_vars = None
@@ -68,6 +71,8 @@ class RayRuntimeEnvConfig(object):
68
71
  self.working_dir = working_dir
69
72
  if py_modules is not None:
70
73
  self.py_modules = py_modules
74
+ if py_executable is not None:
75
+ self.py_executable = py_executable
71
76
  if pip is not None:
72
77
  self.pip = pip
73
78
  if conda is not None:
@@ -123,6 +128,29 @@ class RayRuntimeEnvConfig(object):
123
128
 
124
129
  self._py_modules = py_modules
125
130
 
131
+ @property
132
+ def py_executable(self):
133
+ """Gets the py_executable of this RayRuntimeEnvConfig. # noqa: E501
134
+
135
+ Specifies the executable used for running the Ray workers. It can include arguments as well. # noqa: E501
136
+
137
+ :return: The py_executable of this RayRuntimeEnvConfig. # noqa: E501
138
+ :rtype: str
139
+ """
140
+ return self._py_executable
141
+
142
+ @py_executable.setter
143
+ def py_executable(self, py_executable):
144
+ """Sets the py_executable of this RayRuntimeEnvConfig.
145
+
146
+ Specifies the executable used for running the Ray workers. It can include arguments as well. # noqa: E501
147
+
148
+ :param py_executable: The py_executable of this RayRuntimeEnvConfig. # noqa: E501
149
+ :type: str
150
+ """
151
+
152
+ self._py_executable = py_executable
153
+
126
154
  @property
127
155
  def pip(self):
128
156
  """Gets the pip of this RayRuntimeEnvConfig. # noqa: E501
@@ -42,8 +42,10 @@ class TrainRun(object):
42
42
  'start_time_ms': 'int',
43
43
  'end_time_ms': 'int',
44
44
  'attempts': 'list[TrainRunAttempt]',
45
+ 'total_attempts': 'int',
45
46
  'job_details': 'JobDetails',
46
- 'session_name': 'str'
47
+ 'session_name': 'str',
48
+ 'controller_log_id': 'str'
47
49
  }
48
50
 
49
51
  attribute_map = {
@@ -56,11 +58,13 @@ class TrainRun(object):
56
58
  'start_time_ms': 'start_time_ms',
57
59
  'end_time_ms': 'end_time_ms',
58
60
  'attempts': 'attempts',
61
+ 'total_attempts': 'total_attempts',
59
62
  'job_details': 'job_details',
60
- 'session_name': 'session_name'
63
+ 'session_name': 'session_name',
64
+ 'controller_log_id': 'controller_log_id'
61
65
  }
62
66
 
63
- def __init__(self, id=None, name=None, job_id=None, controller_actor_id=None, status=None, status_detail=None, start_time_ms=None, end_time_ms=None, attempts=None, job_details=None, session_name=None, local_vars_configuration=None): # noqa: E501
67
+ def __init__(self, id=None, name=None, job_id=None, controller_actor_id=None, status=None, status_detail=None, start_time_ms=None, end_time_ms=None, attempts=None, total_attempts=None, job_details=None, session_name=None, controller_log_id=None, local_vars_configuration=None): # noqa: E501
64
68
  """TrainRun - a model defined in OpenAPI""" # noqa: E501
65
69
  if local_vars_configuration is None:
66
70
  local_vars_configuration = Configuration()
@@ -75,8 +79,10 @@ class TrainRun(object):
75
79
  self._start_time_ms = None
76
80
  self._end_time_ms = None
77
81
  self._attempts = None
82
+ self._total_attempts = None
78
83
  self._job_details = None
79
84
  self._session_name = None
85
+ self._controller_log_id = None
80
86
  self.discriminator = None
81
87
 
82
88
  self.id = id
@@ -91,9 +97,12 @@ class TrainRun(object):
91
97
  if end_time_ms is not None:
92
98
  self.end_time_ms = end_time_ms
93
99
  self.attempts = attempts
100
+ self.total_attempts = total_attempts
94
101
  self.job_details = job_details
95
102
  if session_name is not None:
96
103
  self.session_name = session_name
104
+ if controller_log_id is not None:
105
+ self.controller_log_id = controller_log_id
97
106
 
98
107
  @property
99
108
  def id(self):
@@ -296,6 +305,29 @@ class TrainRun(object):
296
305
 
297
306
  self._attempts = attempts
298
307
 
308
+ @property
309
+ def total_attempts(self):
310
+ """Gets the total_attempts of this TrainRun. # noqa: E501
311
+
312
+
313
+ :return: The total_attempts of this TrainRun. # noqa: E501
314
+ :rtype: int
315
+ """
316
+ return self._total_attempts
317
+
318
+ @total_attempts.setter
319
+ def total_attempts(self, total_attempts):
320
+ """Sets the total_attempts of this TrainRun.
321
+
322
+
323
+ :param total_attempts: The total_attempts of this TrainRun. # noqa: E501
324
+ :type: int
325
+ """
326
+ if self.local_vars_configuration.client_side_validation and total_attempts is None: # noqa: E501
327
+ raise ValueError("Invalid value for `total_attempts`, must not be `None`") # noqa: E501
328
+
329
+ self._total_attempts = total_attempts
330
+
299
331
  @property
300
332
  def job_details(self):
301
333
  """Gets the job_details of this TrainRun. # noqa: E501
@@ -340,6 +372,27 @@ class TrainRun(object):
340
372
 
341
373
  self._session_name = session_name
342
374
 
375
+ @property
376
+ def controller_log_id(self):
377
+ """Gets the controller_log_id of this TrainRun. # noqa: E501
378
+
379
+
380
+ :return: The controller_log_id of this TrainRun. # noqa: E501
381
+ :rtype: str
382
+ """
383
+ return self._controller_log_id
384
+
385
+ @controller_log_id.setter
386
+ def controller_log_id(self, controller_log_id):
387
+ """Sets the controller_log_id of this TrainRun.
388
+
389
+
390
+ :param controller_log_id: The controller_log_id of this TrainRun. # noqa: E501
391
+ :type: str
392
+ """
393
+
394
+ self._controller_log_id = controller_log_id
395
+
343
396
  def to_dict(self):
344
397
  """Returns the model properties as a dict"""
345
398
  result = {}
@@ -42,7 +42,8 @@ class TrainWorker(object):
42
42
  'pid': 'int',
43
43
  'gpu_ids': 'list[int]',
44
44
  'status': 'ActorStatus',
45
- 'resources': 'TrainResources'
45
+ 'resources': 'TrainResources',
46
+ 'log_id': 'str'
46
47
  }
47
48
 
48
49
  attribute_map = {
@@ -55,10 +56,11 @@ class TrainWorker(object):
55
56
  'pid': 'pid',
56
57
  'gpu_ids': 'gpu_ids',
57
58
  'status': 'status',
58
- 'resources': 'resources'
59
+ 'resources': 'resources',
60
+ 'log_id': 'log_id'
59
61
  }
60
62
 
61
- def __init__(self, actor_id=None, world_rank=None, local_rank=None, node_rank=None, node_id=None, node_ip=None, pid=None, gpu_ids=None, status=None, resources=None, local_vars_configuration=None): # noqa: E501
63
+ def __init__(self, actor_id=None, world_rank=None, local_rank=None, node_rank=None, node_id=None, node_ip=None, pid=None, gpu_ids=None, status=None, resources=None, log_id=None, local_vars_configuration=None): # noqa: E501
62
64
  """TrainWorker - a model defined in OpenAPI""" # noqa: E501
63
65
  if local_vars_configuration is None:
64
66
  local_vars_configuration = Configuration()
@@ -74,6 +76,7 @@ class TrainWorker(object):
74
76
  self._gpu_ids = None
75
77
  self._status = None
76
78
  self._resources = None
79
+ self._log_id = None
77
80
  self.discriminator = None
78
81
 
79
82
  self.actor_id = actor_id
@@ -87,6 +90,8 @@ class TrainWorker(object):
87
90
  self.status = status
88
91
  if resources is not None:
89
92
  self.resources = resources
93
+ if log_id is not None:
94
+ self.log_id = log_id
90
95
 
91
96
  @property
92
97
  def actor_id(self):
@@ -316,6 +321,27 @@ class TrainWorker(object):
316
321
 
317
322
  self._resources = resources
318
323
 
324
+ @property
325
+ def log_id(self):
326
+ """Gets the log_id of this TrainWorker. # noqa: E501
327
+
328
+
329
+ :return: The log_id of this TrainWorker. # noqa: E501
330
+ :rtype: str
331
+ """
332
+ return self._log_id
333
+
334
+ @log_id.setter
335
+ def log_id(self, log_id):
336
+ """Sets the log_id of this TrainWorker.
337
+
338
+
339
+ :param log_id: The log_id of this TrainWorker. # noqa: E501
340
+ :type: str
341
+ """
342
+
343
+ self._log_id = log_id
344
+
319
345
  def to_dict(self):
320
346
  """Returns the model properties as a dict"""
321
347
  result = {}
anyscale/cluster.py CHANGED
@@ -121,10 +121,13 @@ def get_job_submission_client_cluster_info(
121
121
 
122
122
  if len(cluster_list) > 0:
123
123
  cluster = cluster_list[0]
124
- if cluster.host_name and cluster.access_token:
124
+ access_token = api_client.get_cluster_access_token_api_v2_authentication_cluster_id_cluster_access_token_get(
125
+ cluster_id=cluster.id
126
+ )
127
+ if cluster.host_name and access_token:
125
128
  return ClusterInfo(
126
129
  address=cluster.host_name,
127
- cookies={"anyscale-token": cluster.access_token},
130
+ cookies={"anyscale-token": access_token},
128
131
  metadata=metadata,
129
132
  )
130
133
  else:
@@ -4,7 +4,6 @@ Commands to interact with the Anyscale API
4
4
 
5
5
  import click
6
6
 
7
- from anyscale.commands.anyscale_api.session_commands_commands import session_commands
8
7
  from anyscale.commands.anyscale_api.session_operations_commands import (
9
8
  session_operations_commands,
10
9
  )
@@ -18,6 +17,5 @@ def anyscale_api() -> None:
18
17
  pass
19
18
 
20
19
 
21
- anyscale_api.add_command(session_commands)
22
20
  anyscale_api.add_command(sessions)
23
21
  anyscale_api.add_command(session_operations_commands)
@@ -329,7 +329,10 @@ class StartInteractiveSessionBlock:
329
329
  ) -> Tuple[str, bool, Any]:
330
330
  """Get the params from the cluster needed to use Ray client."""
331
331
  connect_url = None
332
- metadata = [("cookie", "anyscale-token=" + session_meta.access_token)]
332
+ access_token = self.api_client.get_cluster_access_token_api_v2_authentication_cluster_id_cluster_access_token_get(
333
+ cluster_id=session_meta.id
334
+ )
335
+ metadata = [("cookie", "anyscale-token=" + access_token)]
333
336
  if session_meta.connect_url:
334
337
  url_components = session_meta.connect_url.split("?port=")
335
338
  metadata += [("port", url_components[1])] if len(url_components) > 1 else []
@@ -358,22 +358,18 @@ class ClusterController(BaseController):
358
358
  project_id = get_project_id(project_definition.root)
359
359
  except click.ClickException:
360
360
  parent_cloud_id = None
361
- feature_flag_on = self.api_client.check_is_feature_flag_on_api_v2_userinfo_check_is_feature_flag_on_get(
362
- "cloud-isolation-phase-1"
363
- ).result.is_on
364
361
  log_msg = "No project context detected or `--project-id` provided. Continuing without a project."
365
- if feature_flag_on:
366
- if not (cloud_id or cloud_name):
367
- cloud_name = get_last_used_cloud(
368
- project_id=None,
369
- anyscale_api_client=self.anyscale_api_client,
370
- )
371
- parent_cloud_id, _ = get_cloud_id_and_name(
372
- api_client=self.api_client,
373
- cloud_id=cloud_id,
374
- cloud_name=cloud_name,
362
+ if not (cloud_id or cloud_name):
363
+ cloud_name = get_last_used_cloud(
364
+ project_id=None,
365
+ anyscale_api_client=self.anyscale_api_client,
375
366
  )
376
- log_msg = f"No project context detected or `--project-id` provided. Continuing without a project assuming cloud {parent_cloud_id}."
367
+ parent_cloud_id, _ = get_cloud_id_and_name(
368
+ api_client=self.api_client,
369
+ cloud_id=cloud_id,
370
+ cloud_name=cloud_name,
371
+ )
372
+ log_msg = f"No project context detected or `--project-id` provided. Continuing without a project assuming cloud {parent_cloud_id}."
377
373
  default_project = self.anyscale_api_client.get_default_project(
378
374
  parent_cloud_id=parent_cloud_id
379
375
  ).result
@@ -480,18 +476,11 @@ class ClusterController(BaseController):
480
476
  "`--cloud-name` and `--cloud-id` cannot both be specified. Please only provide one "
481
477
  "of these two arguments."
482
478
  )
483
- feature_flag_on = self.api_client.check_is_feature_flag_on_api_v2_userinfo_check_is_feature_flag_on_get(
484
- "cloud-isolation-phase-1"
485
- ).result.is_on
486
- if (
487
- feature_flag_on
488
- and cluster_name is not None
489
- and (
490
- project_id is None
491
- and project_name is None
492
- and cloud_id is None
493
- and cloud_name is None
494
- )
479
+ if cluster_name is not None and (
480
+ project_id is None
481
+ and project_name is None
482
+ and cloud_id is None
483
+ and cloud_name is None
495
484
  ):
496
485
  raise click.ClickException(
497
486
  "Please specify the project of the cluster through `--project-id` or `--project-name`. If the cluster "
@@ -66,12 +66,7 @@ class ProjectController(BaseController):
66
66
  """
67
67
  Call API to create a new project given a project name.
68
68
  """
69
- if not parent_cloud_id and (
70
- self.api_client.check_is_feature_flag_on_api_v2_userinfo_check_is_feature_flag_on_get(
71
- "cloud-isolation-phase-1"
72
- ).result.is_on
73
- is True
74
- ):
69
+ if not parent_cloud_id:
75
70
  raise click.ClickException(
76
71
  "Parent cloud id should be specified when creating a new project because "
77
72
  "cloud isolation has been enabled."
@@ -67,6 +67,7 @@ class PrivateJobSDK(WorkloadSDK):
67
67
  cloud_id=cloud_id,
68
68
  autopopulate_in_workspace=autopopulate_in_workspace,
69
69
  additional_py_modules=config.py_modules,
70
+ py_executable_override=config.py_executable,
70
71
  )
71
72
  [runtime_env] = self.override_and_load_requirements_files(
72
73
  [runtime_env],
@@ -265,6 +266,9 @@ class PrivateJobSDK(WorkloadSDK):
265
266
  requirements=runtime_env_config.pip if runtime_env_config else None,
266
267
  working_dir=runtime_env_config.working_dir if runtime_env_config else None,
267
268
  env_vars=runtime_env_config.env_vars if runtime_env_config else None,
269
+ py_executable=runtime_env_config.py_executable
270
+ if runtime_env_config
271
+ else None,
268
272
  entrypoint=prod_job_config.entrypoint,
269
273
  cloud=compute_config.cloud
270
274
  if compute_config and isinstance(compute_config, ComputeConfig)
@@ -291,7 +295,12 @@ class PrivateJobSDK(WorkloadSDK):
291
295
  runs = [self._job_run_model_to_job_run_status(run) for run in runs]
292
296
 
293
297
  return JobStatus(
294
- name=model.name, id=model.id, state=state, runs=runs, config=config
298
+ name=model.name,
299
+ id=model.id,
300
+ state=state,
301
+ runs=runs,
302
+ config=config,
303
+ creator_id=model.creator_id,
295
304
  )
296
305
 
297
306
  def _resolve_to_job_model(
anyscale/job/models.py CHANGED
@@ -487,6 +487,14 @@ state: STARTING
487
487
  if not isinstance(run, JobRunStatus):
488
488
  raise TypeError("Each run in 'runs' must be a JobRunStatus.")
489
489
 
490
+ creator_id: str = field(
491
+ metadata={"docstring": "ID of the user who created the job.",},
492
+ )
493
+
494
+ def _validate_creator_id(self, creator_id: str):
495
+ if creator_id is not None and not isinstance(creator_id, str):
496
+ raise TypeError("'creator_id' must be a string.")
497
+
490
498
 
491
499
  class JobLogMode(ModelEnum):
492
500
  """Mode to use for getting job logs."""