lightning-sdk 0.1.58__py3-none-any.whl → 0.2.1__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.
- lightning_sdk/__init__.py +5 -3
- lightning_sdk/api/deployment_api.py +23 -11
- lightning_sdk/api/job_api.py +42 -7
- lightning_sdk/api/lit_container_api.py +23 -3
- lightning_sdk/api/mmt_api.py +46 -8
- lightning_sdk/api/pipeline_api.py +50 -0
- lightning_sdk/api/teamspace_api.py +2 -2
- lightning_sdk/api/utils.py +15 -5
- lightning_sdk/cli/ai_hub.py +30 -65
- lightning_sdk/cli/coloring.py +60 -0
- lightning_sdk/cli/configure.py +25 -40
- lightning_sdk/cli/connect.py +7 -20
- lightning_sdk/cli/create.py +83 -0
- lightning_sdk/cli/delete.py +72 -75
- lightning_sdk/cli/docker.py +22 -0
- lightning_sdk/cli/download.py +78 -113
- lightning_sdk/cli/entrypoint.py +44 -65
- lightning_sdk/cli/generate.py +28 -43
- lightning_sdk/cli/inspect.py +22 -50
- lightning_sdk/cli/list.py +281 -222
- lightning_sdk/cli/mmts_menu.py +1 -1
- lightning_sdk/cli/open.py +62 -0
- lightning_sdk/cli/run.py +430 -263
- lightning_sdk/cli/serve.py +128 -191
- lightning_sdk/cli/start.py +55 -36
- lightning_sdk/cli/stop.py +97 -55
- lightning_sdk/cli/switch.py +53 -36
- lightning_sdk/cli/upload.py +318 -255
- lightning_sdk/deployment/__init__.py +2 -0
- lightning_sdk/deployment/deployment.py +33 -8
- lightning_sdk/lightning_cloud/openapi/__init__.py +23 -0
- lightning_sdk/lightning_cloud/openapi/api/__init__.py +1 -0
- lightning_sdk/lightning_cloud/openapi/api/assistants_service_api.py +10 -6
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +355 -4
- lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +4 -4
- lightning_sdk/lightning_cloud/openapi/api/lit_registry_service_api.py +14 -2
- lightning_sdk/lightning_cloud/openapi/api/pipelines_service_api.py +674 -0
- lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py +303 -4
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +22 -0
- lightning_sdk/lightning_cloud/openapi/models/agents_id_body.py +17 -69
- lightning_sdk/lightning_cloud/openapi/models/cluster_id_capacityreservations_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/create.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/create_deployment_request_defines_a_spec_for_the_job_that_allows_for_autoscaling_jobs.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/deployments_id_body.py +105 -1
- lightning_sdk/lightning_cloud/openapi/models/id_visibility_body1.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/id_visibility_body2.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/org_id_memberships_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/orgs_id_body.py +157 -1
- lightning_sdk/lightning_cloud/openapi/models/pipelines_id_body.py +461 -0
- lightning_sdk/lightning_cloud/openapi/models/project_id_pipelines_body.py +227 -0
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +157 -1
- lightning_sdk/lightning_cloud/openapi/models/slurm_jobs_body.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/uploads_upload_id_body.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/uploads_upload_id_body1.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_agent_job.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_assistant.py +17 -69
- lightning_sdk/lightning_cloud/openapi/models/v1_capacity_block_offering.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cloud_space_artifact_event_type.py +1 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_accelerator.py +131 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_capacity_reservation.py +79 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_cluster_security_options.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_complete_upload_temporary_artifact_request.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_request.py +461 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_deployment_template_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_create_job_request.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_managed_endpoint_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_create_multi_machine_job_request.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_data_connection.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_delete_pipeline_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment.py +105 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_details.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_template.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filestore_data_connection.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_job.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_filesystem_mmt.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_find_capacity_block_offering_response.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_job.py +133 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_job_artifacts_type.py +103 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_job_spec.py +53 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_job_timing.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_list_pipelines_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_registry_artifact.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_lit_repository.py +29 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_managed_model.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_state.py +2 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_organization.py +209 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline.py +513 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_schedule.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step.py +253 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step_status.py +331 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_pipeline_step_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py +157 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_restart_timing.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_shared_filesystem.py +201 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_slurm_job.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_update_job_visibility_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_upload_temporary_artifact_request.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +95 -355
- lightning_sdk/lightning_cloud/openapi/models/validate.py +27 -1
- lightning_sdk/lightning_cloud/rest_client.py +4 -2
- lightning_sdk/machine.py +25 -1
- lightning_sdk/models.py +18 -12
- lightning_sdk/pipeline/__init__.py +4 -0
- lightning_sdk/pipeline/pipeline.py +109 -0
- lightning_sdk/pipeline/types.py +268 -0
- lightning_sdk/pipeline/utils.py +69 -0
- lightning_sdk/plugin.py +9 -10
- lightning_sdk/serve.py +134 -0
- lightning_sdk/services/utilities.py +2 -2
- lightning_sdk/studio.py +5 -1
- lightning_sdk/teamspace.py +1 -1
- lightning_sdk/utils/resolve.py +12 -1
- {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/METADATA +6 -8
- {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/RECORD +120 -88
- lightning_sdk/cli/legacy.py +0 -135
- {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.58.dist-info → lightning_sdk-0.2.1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1CreateJobRequest(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'endpoint': 'V1Endpoint',
|
|
45
|
+
'name': 'str',
|
|
46
|
+
'project_id': 'str',
|
|
47
|
+
'spec': 'V1JobSpec'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
attribute_map = {
|
|
51
|
+
'endpoint': 'endpoint',
|
|
52
|
+
'name': 'name',
|
|
53
|
+
'project_id': 'projectId',
|
|
54
|
+
'spec': 'spec'
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
def __init__(self, endpoint: 'V1Endpoint' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None): # noqa: E501
|
|
58
|
+
"""V1CreateJobRequest - a model defined in Swagger""" # noqa: E501
|
|
59
|
+
self._endpoint = None
|
|
60
|
+
self._name = None
|
|
61
|
+
self._project_id = None
|
|
62
|
+
self._spec = None
|
|
63
|
+
self.discriminator = None
|
|
64
|
+
if endpoint is not None:
|
|
65
|
+
self.endpoint = endpoint
|
|
66
|
+
if name is not None:
|
|
67
|
+
self.name = name
|
|
68
|
+
if project_id is not None:
|
|
69
|
+
self.project_id = project_id
|
|
70
|
+
if spec is not None:
|
|
71
|
+
self.spec = spec
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def endpoint(self) -> 'V1Endpoint':
|
|
75
|
+
"""Gets the endpoint of this V1CreateJobRequest. # noqa: E501
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:return: The endpoint of this V1CreateJobRequest. # noqa: E501
|
|
79
|
+
:rtype: V1Endpoint
|
|
80
|
+
"""
|
|
81
|
+
return self._endpoint
|
|
82
|
+
|
|
83
|
+
@endpoint.setter
|
|
84
|
+
def endpoint(self, endpoint: 'V1Endpoint'):
|
|
85
|
+
"""Sets the endpoint of this V1CreateJobRequest.
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:param endpoint: The endpoint of this V1CreateJobRequest. # noqa: E501
|
|
89
|
+
:type: V1Endpoint
|
|
90
|
+
"""
|
|
91
|
+
|
|
92
|
+
self._endpoint = endpoint
|
|
93
|
+
|
|
94
|
+
@property
|
|
95
|
+
def name(self) -> 'str':
|
|
96
|
+
"""Gets the name of this V1CreateJobRequest. # noqa: E501
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:return: The name of this V1CreateJobRequest. # noqa: E501
|
|
100
|
+
:rtype: str
|
|
101
|
+
"""
|
|
102
|
+
return self._name
|
|
103
|
+
|
|
104
|
+
@name.setter
|
|
105
|
+
def name(self, name: 'str'):
|
|
106
|
+
"""Sets the name of this V1CreateJobRequest.
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
:param name: The name of this V1CreateJobRequest. # noqa: E501
|
|
110
|
+
:type: str
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
self._name = name
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def project_id(self) -> 'str':
|
|
117
|
+
"""Gets the project_id of this V1CreateJobRequest. # noqa: E501
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
:return: The project_id of this V1CreateJobRequest. # noqa: E501
|
|
121
|
+
:rtype: str
|
|
122
|
+
"""
|
|
123
|
+
return self._project_id
|
|
124
|
+
|
|
125
|
+
@project_id.setter
|
|
126
|
+
def project_id(self, project_id: 'str'):
|
|
127
|
+
"""Sets the project_id of this V1CreateJobRequest.
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
:param project_id: The project_id of this V1CreateJobRequest. # noqa: E501
|
|
131
|
+
:type: str
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
self._project_id = project_id
|
|
135
|
+
|
|
136
|
+
@property
|
|
137
|
+
def spec(self) -> 'V1JobSpec':
|
|
138
|
+
"""Gets the spec of this V1CreateJobRequest. # noqa: E501
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
:return: The spec of this V1CreateJobRequest. # noqa: E501
|
|
142
|
+
:rtype: V1JobSpec
|
|
143
|
+
"""
|
|
144
|
+
return self._spec
|
|
145
|
+
|
|
146
|
+
@spec.setter
|
|
147
|
+
def spec(self, spec: 'V1JobSpec'):
|
|
148
|
+
"""Sets the spec of this V1CreateJobRequest.
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
:param spec: The spec of this V1CreateJobRequest. # noqa: E501
|
|
152
|
+
:type: V1JobSpec
|
|
153
|
+
"""
|
|
154
|
+
|
|
155
|
+
self._spec = spec
|
|
156
|
+
|
|
157
|
+
def to_dict(self) -> dict:
|
|
158
|
+
"""Returns the model properties as a dict"""
|
|
159
|
+
result = {}
|
|
160
|
+
|
|
161
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
162
|
+
value = getattr(self, attr)
|
|
163
|
+
if isinstance(value, list):
|
|
164
|
+
result[attr] = list(map(
|
|
165
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
166
|
+
value
|
|
167
|
+
))
|
|
168
|
+
elif hasattr(value, "to_dict"):
|
|
169
|
+
result[attr] = value.to_dict()
|
|
170
|
+
elif isinstance(value, dict):
|
|
171
|
+
result[attr] = dict(map(
|
|
172
|
+
lambda item: (item[0], item[1].to_dict())
|
|
173
|
+
if hasattr(item[1], "to_dict") else item,
|
|
174
|
+
value.items()
|
|
175
|
+
))
|
|
176
|
+
else:
|
|
177
|
+
result[attr] = value
|
|
178
|
+
if issubclass(V1CreateJobRequest, dict):
|
|
179
|
+
for key, value in self.items():
|
|
180
|
+
result[key] = value
|
|
181
|
+
|
|
182
|
+
return result
|
|
183
|
+
|
|
184
|
+
def to_str(self) -> str:
|
|
185
|
+
"""Returns the string representation of the model"""
|
|
186
|
+
return pprint.pformat(self.to_dict())
|
|
187
|
+
|
|
188
|
+
def __repr__(self) -> str:
|
|
189
|
+
"""For `print` and `pprint`"""
|
|
190
|
+
return self.to_str()
|
|
191
|
+
|
|
192
|
+
def __eq__(self, other: 'V1CreateJobRequest') -> bool:
|
|
193
|
+
"""Returns true if both objects are equal"""
|
|
194
|
+
if not isinstance(other, V1CreateJobRequest):
|
|
195
|
+
return False
|
|
196
|
+
|
|
197
|
+
return self.__dict__ == other.__dict__
|
|
198
|
+
|
|
199
|
+
def __ne__(self, other: 'V1CreateJobRequest') -> bool:
|
|
200
|
+
"""Returns true if both objects are not equal"""
|
|
201
|
+
return not self == other
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1CreateManagedEndpointResponse(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'assistants': 'list[V1Assistant]',
|
|
45
|
+
'endpoint': 'V1ManagedEndpoint'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'assistants': 'assistants',
|
|
50
|
+
'endpoint': 'endpoint'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, assistants: 'list[V1Assistant]' =None, endpoint: 'V1ManagedEndpoint' =None): # noqa: E501
|
|
54
|
+
"""V1CreateManagedEndpointResponse - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._assistants = None
|
|
56
|
+
self._endpoint = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if assistants is not None:
|
|
59
|
+
self.assistants = assistants
|
|
60
|
+
if endpoint is not None:
|
|
61
|
+
self.endpoint = endpoint
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def assistants(self) -> 'list[V1Assistant]':
|
|
65
|
+
"""Gets the assistants of this V1CreateManagedEndpointResponse. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The assistants of this V1CreateManagedEndpointResponse. # noqa: E501
|
|
69
|
+
:rtype: list[V1Assistant]
|
|
70
|
+
"""
|
|
71
|
+
return self._assistants
|
|
72
|
+
|
|
73
|
+
@assistants.setter
|
|
74
|
+
def assistants(self, assistants: 'list[V1Assistant]'):
|
|
75
|
+
"""Sets the assistants of this V1CreateManagedEndpointResponse.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param assistants: The assistants of this V1CreateManagedEndpointResponse. # noqa: E501
|
|
79
|
+
:type: list[V1Assistant]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._assistants = assistants
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def endpoint(self) -> 'V1ManagedEndpoint':
|
|
86
|
+
"""Gets the endpoint of this V1CreateManagedEndpointResponse. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The endpoint of this V1CreateManagedEndpointResponse. # noqa: E501
|
|
90
|
+
:rtype: V1ManagedEndpoint
|
|
91
|
+
"""
|
|
92
|
+
return self._endpoint
|
|
93
|
+
|
|
94
|
+
@endpoint.setter
|
|
95
|
+
def endpoint(self, endpoint: 'V1ManagedEndpoint'):
|
|
96
|
+
"""Sets the endpoint of this V1CreateManagedEndpointResponse.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param endpoint: The endpoint of this V1CreateManagedEndpointResponse. # noqa: E501
|
|
100
|
+
:type: V1ManagedEndpoint
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._endpoint = endpoint
|
|
104
|
+
|
|
105
|
+
def to_dict(self) -> dict:
|
|
106
|
+
"""Returns the model properties as a dict"""
|
|
107
|
+
result = {}
|
|
108
|
+
|
|
109
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
110
|
+
value = getattr(self, attr)
|
|
111
|
+
if isinstance(value, list):
|
|
112
|
+
result[attr] = list(map(
|
|
113
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
114
|
+
value
|
|
115
|
+
))
|
|
116
|
+
elif hasattr(value, "to_dict"):
|
|
117
|
+
result[attr] = value.to_dict()
|
|
118
|
+
elif isinstance(value, dict):
|
|
119
|
+
result[attr] = dict(map(
|
|
120
|
+
lambda item: (item[0], item[1].to_dict())
|
|
121
|
+
if hasattr(item[1], "to_dict") else item,
|
|
122
|
+
value.items()
|
|
123
|
+
))
|
|
124
|
+
else:
|
|
125
|
+
result[attr] = value
|
|
126
|
+
if issubclass(V1CreateManagedEndpointResponse, dict):
|
|
127
|
+
for key, value in self.items():
|
|
128
|
+
result[key] = value
|
|
129
|
+
|
|
130
|
+
return result
|
|
131
|
+
|
|
132
|
+
def to_str(self) -> str:
|
|
133
|
+
"""Returns the string representation of the model"""
|
|
134
|
+
return pprint.pformat(self.to_dict())
|
|
135
|
+
|
|
136
|
+
def __repr__(self) -> str:
|
|
137
|
+
"""For `print` and `pprint`"""
|
|
138
|
+
return self.to_str()
|
|
139
|
+
|
|
140
|
+
def __eq__(self, other: 'V1CreateManagedEndpointResponse') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1CreateManagedEndpointResponse):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1CreateManagedEndpointResponse') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
external/v1/auth_service.proto
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: version not set
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
|
|
12
|
+
NOTE
|
|
13
|
+
----
|
|
14
|
+
standard swagger-codegen-cli for this python client has been modified
|
|
15
|
+
by custom templates. The purpose of these templates is to include
|
|
16
|
+
typing information in the API and Model code. Please refer to the
|
|
17
|
+
main grid repository for more info
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import pprint
|
|
21
|
+
import re # noqa: F401
|
|
22
|
+
|
|
23
|
+
from typing import TYPE_CHECKING
|
|
24
|
+
|
|
25
|
+
import six
|
|
26
|
+
|
|
27
|
+
if TYPE_CHECKING:
|
|
28
|
+
from datetime import datetime
|
|
29
|
+
from lightning_sdk.lightning_cloud.openapi.models import *
|
|
30
|
+
|
|
31
|
+
class V1CreateMultiMachineJobRequest(object):
|
|
32
|
+
"""NOTE: This class is auto generated by the swagger code generator program.
|
|
33
|
+
|
|
34
|
+
Do not edit the class manually.
|
|
35
|
+
"""
|
|
36
|
+
"""
|
|
37
|
+
Attributes:
|
|
38
|
+
swagger_types (dict): The key is attribute name
|
|
39
|
+
and the value is attribute type.
|
|
40
|
+
attribute_map (dict): The key is attribute name
|
|
41
|
+
and the value is json key in definition.
|
|
42
|
+
"""
|
|
43
|
+
swagger_types = {
|
|
44
|
+
'cluster_id': 'str',
|
|
45
|
+
'fault_tolerance': 'V1MultiMachineJobFaultTolerance',
|
|
46
|
+
'machines': 'int',
|
|
47
|
+
'name': 'str',
|
|
48
|
+
'project_id': 'str',
|
|
49
|
+
'spec': 'V1JobSpec'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
attribute_map = {
|
|
53
|
+
'cluster_id': 'clusterId',
|
|
54
|
+
'fault_tolerance': 'faultTolerance',
|
|
55
|
+
'machines': 'machines',
|
|
56
|
+
'name': 'name',
|
|
57
|
+
'project_id': 'projectId',
|
|
58
|
+
'spec': 'spec'
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
def __init__(self, cluster_id: 'str' =None, fault_tolerance: 'V1MultiMachineJobFaultTolerance' =None, machines: 'int' =None, name: 'str' =None, project_id: 'str' =None, spec: 'V1JobSpec' =None): # noqa: E501
|
|
62
|
+
"""V1CreateMultiMachineJobRequest - a model defined in Swagger""" # noqa: E501
|
|
63
|
+
self._cluster_id = None
|
|
64
|
+
self._fault_tolerance = None
|
|
65
|
+
self._machines = None
|
|
66
|
+
self._name = None
|
|
67
|
+
self._project_id = None
|
|
68
|
+
self._spec = None
|
|
69
|
+
self.discriminator = None
|
|
70
|
+
if cluster_id is not None:
|
|
71
|
+
self.cluster_id = cluster_id
|
|
72
|
+
if fault_tolerance is not None:
|
|
73
|
+
self.fault_tolerance = fault_tolerance
|
|
74
|
+
if machines is not None:
|
|
75
|
+
self.machines = machines
|
|
76
|
+
if name is not None:
|
|
77
|
+
self.name = name
|
|
78
|
+
if project_id is not None:
|
|
79
|
+
self.project_id = project_id
|
|
80
|
+
if spec is not None:
|
|
81
|
+
self.spec = spec
|
|
82
|
+
|
|
83
|
+
@property
|
|
84
|
+
def cluster_id(self) -> 'str':
|
|
85
|
+
"""Gets the cluster_id of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
:return: The cluster_id of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
89
|
+
:rtype: str
|
|
90
|
+
"""
|
|
91
|
+
return self._cluster_id
|
|
92
|
+
|
|
93
|
+
@cluster_id.setter
|
|
94
|
+
def cluster_id(self, cluster_id: 'str'):
|
|
95
|
+
"""Sets the cluster_id of this V1CreateMultiMachineJobRequest.
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
:param cluster_id: The cluster_id of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
99
|
+
:type: str
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
self._cluster_id = cluster_id
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def fault_tolerance(self) -> 'V1MultiMachineJobFaultTolerance':
|
|
106
|
+
"""Gets the fault_tolerance of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
:return: The fault_tolerance of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
110
|
+
:rtype: V1MultiMachineJobFaultTolerance
|
|
111
|
+
"""
|
|
112
|
+
return self._fault_tolerance
|
|
113
|
+
|
|
114
|
+
@fault_tolerance.setter
|
|
115
|
+
def fault_tolerance(self, fault_tolerance: 'V1MultiMachineJobFaultTolerance'):
|
|
116
|
+
"""Sets the fault_tolerance of this V1CreateMultiMachineJobRequest.
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
:param fault_tolerance: The fault_tolerance of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
120
|
+
:type: V1MultiMachineJobFaultTolerance
|
|
121
|
+
"""
|
|
122
|
+
|
|
123
|
+
self._fault_tolerance = fault_tolerance
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def machines(self) -> 'int':
|
|
127
|
+
"""Gets the machines of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
:return: The machines of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
131
|
+
:rtype: int
|
|
132
|
+
"""
|
|
133
|
+
return self._machines
|
|
134
|
+
|
|
135
|
+
@machines.setter
|
|
136
|
+
def machines(self, machines: 'int'):
|
|
137
|
+
"""Sets the machines of this V1CreateMultiMachineJobRequest.
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
:param machines: The machines of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
141
|
+
:type: int
|
|
142
|
+
"""
|
|
143
|
+
|
|
144
|
+
self._machines = machines
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def name(self) -> 'str':
|
|
148
|
+
"""Gets the name of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
:return: The name of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
152
|
+
:rtype: str
|
|
153
|
+
"""
|
|
154
|
+
return self._name
|
|
155
|
+
|
|
156
|
+
@name.setter
|
|
157
|
+
def name(self, name: 'str'):
|
|
158
|
+
"""Sets the name of this V1CreateMultiMachineJobRequest.
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
:param name: The name of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
162
|
+
:type: str
|
|
163
|
+
"""
|
|
164
|
+
|
|
165
|
+
self._name = name
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def project_id(self) -> 'str':
|
|
169
|
+
"""Gets the project_id of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
:return: The project_id of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
173
|
+
:rtype: str
|
|
174
|
+
"""
|
|
175
|
+
return self._project_id
|
|
176
|
+
|
|
177
|
+
@project_id.setter
|
|
178
|
+
def project_id(self, project_id: 'str'):
|
|
179
|
+
"""Sets the project_id of this V1CreateMultiMachineJobRequest.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
:param project_id: The project_id of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
183
|
+
:type: str
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
self._project_id = project_id
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def spec(self) -> 'V1JobSpec':
|
|
190
|
+
"""Gets the spec of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
:return: The spec of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
194
|
+
:rtype: V1JobSpec
|
|
195
|
+
"""
|
|
196
|
+
return self._spec
|
|
197
|
+
|
|
198
|
+
@spec.setter
|
|
199
|
+
def spec(self, spec: 'V1JobSpec'):
|
|
200
|
+
"""Sets the spec of this V1CreateMultiMachineJobRequest.
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
:param spec: The spec of this V1CreateMultiMachineJobRequest. # noqa: E501
|
|
204
|
+
:type: V1JobSpec
|
|
205
|
+
"""
|
|
206
|
+
|
|
207
|
+
self._spec = spec
|
|
208
|
+
|
|
209
|
+
def to_dict(self) -> dict:
|
|
210
|
+
"""Returns the model properties as a dict"""
|
|
211
|
+
result = {}
|
|
212
|
+
|
|
213
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
214
|
+
value = getattr(self, attr)
|
|
215
|
+
if isinstance(value, list):
|
|
216
|
+
result[attr] = list(map(
|
|
217
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
218
|
+
value
|
|
219
|
+
))
|
|
220
|
+
elif hasattr(value, "to_dict"):
|
|
221
|
+
result[attr] = value.to_dict()
|
|
222
|
+
elif isinstance(value, dict):
|
|
223
|
+
result[attr] = dict(map(
|
|
224
|
+
lambda item: (item[0], item[1].to_dict())
|
|
225
|
+
if hasattr(item[1], "to_dict") else item,
|
|
226
|
+
value.items()
|
|
227
|
+
))
|
|
228
|
+
else:
|
|
229
|
+
result[attr] = value
|
|
230
|
+
if issubclass(V1CreateMultiMachineJobRequest, dict):
|
|
231
|
+
for key, value in self.items():
|
|
232
|
+
result[key] = value
|
|
233
|
+
|
|
234
|
+
return result
|
|
235
|
+
|
|
236
|
+
def to_str(self) -> str:
|
|
237
|
+
"""Returns the string representation of the model"""
|
|
238
|
+
return pprint.pformat(self.to_dict())
|
|
239
|
+
|
|
240
|
+
def __repr__(self) -> str:
|
|
241
|
+
"""For `print` and `pprint`"""
|
|
242
|
+
return self.to_str()
|
|
243
|
+
|
|
244
|
+
def __eq__(self, other: 'V1CreateMultiMachineJobRequest') -> bool:
|
|
245
|
+
"""Returns true if both objects are equal"""
|
|
246
|
+
if not isinstance(other, V1CreateMultiMachineJobRequest):
|
|
247
|
+
return False
|
|
248
|
+
|
|
249
|
+
return self.__dict__ == other.__dict__
|
|
250
|
+
|
|
251
|
+
def __ne__(self, other: 'V1CreateMultiMachineJobRequest') -> bool:
|
|
252
|
+
"""Returns true if both objects are not equal"""
|
|
253
|
+
return not self == other
|
|
@@ -47,6 +47,7 @@ class V1DataConnection(object):
|
|
|
47
47
|
'cluster_id': 'str',
|
|
48
48
|
'created_at': 'datetime',
|
|
49
49
|
'efs': 'V1EfsConfig',
|
|
50
|
+
'filestore': 'V1FilestoreDataConnection',
|
|
50
51
|
'gcp': 'V1GcpDataConnection',
|
|
51
52
|
'gcs_folder': 'V1GCSFolderDataConnection',
|
|
52
53
|
'id': 'str',
|
|
@@ -73,6 +74,7 @@ class V1DataConnection(object):
|
|
|
73
74
|
'cluster_id': 'clusterId',
|
|
74
75
|
'created_at': 'createdAt',
|
|
75
76
|
'efs': 'efs',
|
|
77
|
+
'filestore': 'filestore',
|
|
76
78
|
'gcp': 'gcp',
|
|
77
79
|
'gcs_folder': 'gcsFolder',
|
|
78
80
|
'id': 'id',
|
|
@@ -92,7 +94,7 @@ class V1DataConnection(object):
|
|
|
92
94
|
'writable': 'writable'
|
|
93
95
|
}
|
|
94
96
|
|
|
95
|
-
def __init__(self, access_cluster_ids: 'list[str]' =None, accessible: 'bool' =None, aws: 'V1AwsDataConnection' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, efs: 'V1EfsConfig' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, id: 'str' =None, index: 'V1Index' =None, is_managed: 'bool' =None, lock_out: 'bool' =None, name: 'str' =None, number_of_files: 'str' =None, project_id: 'str' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, state: 'V1DataConnectionState' =None, total_size_bytes: 'str' =None, type: 'str' =None, updated_at: 'datetime' =None, writable: 'bool' =None): # noqa: E501
|
|
97
|
+
def __init__(self, access_cluster_ids: 'list[str]' =None, accessible: 'bool' =None, aws: 'V1AwsDataConnection' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, efs: 'V1EfsConfig' =None, filestore: 'V1FilestoreDataConnection' =None, gcp: 'V1GcpDataConnection' =None, gcs_folder: 'V1GCSFolderDataConnection' =None, id: 'str' =None, index: 'V1Index' =None, is_managed: 'bool' =None, lock_out: 'bool' =None, name: 'str' =None, number_of_files: 'str' =None, project_id: 'str' =None, run_cmds: 'list[str]' =None, s3_folder: 'V1S3FolderDataConnection' =None, snowflake: 'V1SnowflakeDataConnection' =None, state: 'V1DataConnectionState' =None, total_size_bytes: 'str' =None, type: 'str' =None, updated_at: 'datetime' =None, writable: 'bool' =None): # noqa: E501
|
|
96
98
|
"""V1DataConnection - a model defined in Swagger""" # noqa: E501
|
|
97
99
|
self._access_cluster_ids = None
|
|
98
100
|
self._accessible = None
|
|
@@ -100,6 +102,7 @@ class V1DataConnection(object):
|
|
|
100
102
|
self._cluster_id = None
|
|
101
103
|
self._created_at = None
|
|
102
104
|
self._efs = None
|
|
105
|
+
self._filestore = None
|
|
103
106
|
self._gcp = None
|
|
104
107
|
self._gcs_folder = None
|
|
105
108
|
self._id = None
|
|
@@ -130,6 +133,8 @@ class V1DataConnection(object):
|
|
|
130
133
|
self.created_at = created_at
|
|
131
134
|
if efs is not None:
|
|
132
135
|
self.efs = efs
|
|
136
|
+
if filestore is not None:
|
|
137
|
+
self.filestore = filestore
|
|
133
138
|
if gcp is not None:
|
|
134
139
|
self.gcp = gcp
|
|
135
140
|
if gcs_folder is not None:
|
|
@@ -291,6 +296,27 @@ class V1DataConnection(object):
|
|
|
291
296
|
|
|
292
297
|
self._efs = efs
|
|
293
298
|
|
|
299
|
+
@property
|
|
300
|
+
def filestore(self) -> 'V1FilestoreDataConnection':
|
|
301
|
+
"""Gets the filestore of this V1DataConnection. # noqa: E501
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
:return: The filestore of this V1DataConnection. # noqa: E501
|
|
305
|
+
:rtype: V1FilestoreDataConnection
|
|
306
|
+
"""
|
|
307
|
+
return self._filestore
|
|
308
|
+
|
|
309
|
+
@filestore.setter
|
|
310
|
+
def filestore(self, filestore: 'V1FilestoreDataConnection'):
|
|
311
|
+
"""Sets the filestore of this V1DataConnection.
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
:param filestore: The filestore of this V1DataConnection. # noqa: E501
|
|
315
|
+
:type: V1FilestoreDataConnection
|
|
316
|
+
"""
|
|
317
|
+
|
|
318
|
+
self._filestore = filestore
|
|
319
|
+
|
|
294
320
|
@property
|
|
295
321
|
def gcp(self) -> 'V1GcpDataConnection':
|
|
296
322
|
"""Gets the gcp of this V1DataConnection. # noqa: E501
|