lightning-sdk 0.1.41__py3-none-any.whl → 0.1.42__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 +1 -1
- lightning_sdk/ai_hub.py +8 -3
- lightning_sdk/api/ai_hub_api.py +3 -3
- lightning_sdk/api/deployment_api.py +6 -6
- lightning_sdk/api/job_api.py +32 -6
- lightning_sdk/api/mmt_api.py +59 -19
- lightning_sdk/api/studio_api.py +37 -19
- lightning_sdk/api/teamspace_api.py +34 -29
- lightning_sdk/api/utils.py +46 -34
- lightning_sdk/cli/ai_hub.py +3 -3
- lightning_sdk/cli/entrypoint.py +3 -1
- lightning_sdk/cli/mmt.py +11 -10
- lightning_sdk/cli/run.py +9 -8
- lightning_sdk/cli/serve.py +130 -0
- lightning_sdk/deployment/deployment.py +18 -12
- lightning_sdk/job/base.py +118 -24
- lightning_sdk/job/job.py +87 -9
- lightning_sdk/job/v1.py +75 -18
- lightning_sdk/job/v2.py +51 -15
- lightning_sdk/job/work.py +36 -7
- lightning_sdk/lightning_cloud/openapi/__init__.py +12 -0
- lightning_sdk/lightning_cloud/openapi/api/jobs_service_api.py +215 -5
- lightning_sdk/lightning_cloud/openapi/api/lit_logger_service_api.py +218 -0
- lightning_sdk/lightning_cloud/openapi/api/models_store_api.py +226 -0
- lightning_sdk/lightning_cloud/openapi/api/snowflake_service_api.py +21 -1
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +12 -0
- lightning_sdk/lightning_cloud/openapi/models/deploymenttemplates_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/id_visibility_body.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/model_id_versions_body.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/project_id_multimachinejobs_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/project_id_snowflake_body.py +15 -67
- lightning_sdk/lightning_cloud/openapi/models/query_query_id_body.py +17 -69
- lightning_sdk/lightning_cloud/openapi/models/snowflake_export_body.py +29 -81
- lightning_sdk/lightning_cloud/openapi/models/snowflake_query_body.py +17 -69
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_file_url_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_response.py +17 -17
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_url_response.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_get_project_balance_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_list_multi_machine_job_events_response.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics_stream.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_model_file.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event.py +331 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_event_type.py +104 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_fault_tolerance_strategy.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_multi_machine_job_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_rule_resource.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_snowflake_data_connection.py +29 -81
- lightning_sdk/lightning_cloud/openapi/models/v1_system_metrics.py +29 -3
- lightning_sdk/lightning_cloud/openapi/models/v1_trainium_system_metrics.py +175 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_metrics_stream_visibility_response.py +97 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -53
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_request.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_validate_deployment_image_response.py +97 -0
- lightning_sdk/lightning_cloud/rest_client.py +2 -0
- lightning_sdk/mmt/__init__.py +3 -0
- lightning_sdk/{_mmt → mmt}/base.py +20 -14
- lightning_sdk/{_mmt → mmt}/mmt.py +46 -17
- lightning_sdk/mmt/v1.py +129 -0
- lightning_sdk/{_mmt → mmt}/v2.py +16 -21
- lightning_sdk/plugin.py +43 -16
- lightning_sdk/services/file_endpoint.py +11 -5
- lightning_sdk/studio.py +16 -9
- lightning_sdk/teamspace.py +21 -8
- lightning_sdk/utils/resolve.py +18 -0
- {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.42.dist-info}/METADATA +3 -1
- {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.42.dist-info}/RECORD +72 -59
- lightning_sdk/_mmt/__init__.py +0 -3
- lightning_sdk/_mmt/v1.py +0 -69
- {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.42.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.42.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.42.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.41.dist-info → lightning_sdk-0.1.42.dist-info}/top_level.txt +0 -0
|
@@ -41,60 +41,29 @@ class SnowflakeQueryBody(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
-
'account': 'str',
|
|
45
44
|
'connection_id': 'str',
|
|
46
|
-
'
|
|
47
|
-
'query': 'str'
|
|
48
|
-
'username': 'str'
|
|
45
|
+
'credential_id': 'str',
|
|
46
|
+
'query': 'str'
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
attribute_map = {
|
|
52
|
-
'account': 'account',
|
|
53
50
|
'connection_id': 'connectionId',
|
|
54
|
-
'
|
|
55
|
-
'query': 'query'
|
|
56
|
-
'username': 'username'
|
|
51
|
+
'credential_id': 'credentialId',
|
|
52
|
+
'query': 'query'
|
|
57
53
|
}
|
|
58
54
|
|
|
59
|
-
def __init__(self,
|
|
55
|
+
def __init__(self, connection_id: 'str' =None, credential_id: 'str' =None, query: 'str' =None): # noqa: E501
|
|
60
56
|
"""SnowflakeQueryBody - a model defined in Swagger""" # noqa: E501
|
|
61
|
-
self._account = None
|
|
62
57
|
self._connection_id = None
|
|
63
|
-
self.
|
|
58
|
+
self._credential_id = None
|
|
64
59
|
self._query = None
|
|
65
|
-
self._username = None
|
|
66
60
|
self.discriminator = None
|
|
67
|
-
if account is not None:
|
|
68
|
-
self.account = account
|
|
69
61
|
if connection_id is not None:
|
|
70
62
|
self.connection_id = connection_id
|
|
71
|
-
if
|
|
72
|
-
self.
|
|
63
|
+
if credential_id is not None:
|
|
64
|
+
self.credential_id = credential_id
|
|
73
65
|
if query is not None:
|
|
74
66
|
self.query = query
|
|
75
|
-
if username is not None:
|
|
76
|
-
self.username = username
|
|
77
|
-
|
|
78
|
-
@property
|
|
79
|
-
def account(self) -> 'str':
|
|
80
|
-
"""Gets the account of this SnowflakeQueryBody. # noqa: E501
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:return: The account of this SnowflakeQueryBody. # noqa: E501
|
|
84
|
-
:rtype: str
|
|
85
|
-
"""
|
|
86
|
-
return self._account
|
|
87
|
-
|
|
88
|
-
@account.setter
|
|
89
|
-
def account(self, account: 'str'):
|
|
90
|
-
"""Sets the account of this SnowflakeQueryBody.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
:param account: The account of this SnowflakeQueryBody. # noqa: E501
|
|
94
|
-
:type: str
|
|
95
|
-
"""
|
|
96
|
-
|
|
97
|
-
self._account = account
|
|
98
67
|
|
|
99
68
|
@property
|
|
100
69
|
def connection_id(self) -> 'str':
|
|
@@ -118,25 +87,25 @@ class SnowflakeQueryBody(object):
|
|
|
118
87
|
self._connection_id = connection_id
|
|
119
88
|
|
|
120
89
|
@property
|
|
121
|
-
def
|
|
122
|
-
"""Gets the
|
|
90
|
+
def credential_id(self) -> 'str':
|
|
91
|
+
"""Gets the credential_id of this SnowflakeQueryBody. # noqa: E501
|
|
123
92
|
|
|
124
93
|
|
|
125
|
-
:return: The
|
|
94
|
+
:return: The credential_id of this SnowflakeQueryBody. # noqa: E501
|
|
126
95
|
:rtype: str
|
|
127
96
|
"""
|
|
128
|
-
return self.
|
|
97
|
+
return self._credential_id
|
|
129
98
|
|
|
130
|
-
@
|
|
131
|
-
def
|
|
132
|
-
"""Sets the
|
|
99
|
+
@credential_id.setter
|
|
100
|
+
def credential_id(self, credential_id: 'str'):
|
|
101
|
+
"""Sets the credential_id of this SnowflakeQueryBody.
|
|
133
102
|
|
|
134
103
|
|
|
135
|
-
:param
|
|
104
|
+
:param credential_id: The credential_id of this SnowflakeQueryBody. # noqa: E501
|
|
136
105
|
:type: str
|
|
137
106
|
"""
|
|
138
107
|
|
|
139
|
-
self.
|
|
108
|
+
self._credential_id = credential_id
|
|
140
109
|
|
|
141
110
|
@property
|
|
142
111
|
def query(self) -> 'str':
|
|
@@ -159,27 +128,6 @@ class SnowflakeQueryBody(object):
|
|
|
159
128
|
|
|
160
129
|
self._query = query
|
|
161
130
|
|
|
162
|
-
@property
|
|
163
|
-
def username(self) -> 'str':
|
|
164
|
-
"""Gets the username of this SnowflakeQueryBody. # noqa: E501
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
:return: The username of this SnowflakeQueryBody. # noqa: E501
|
|
168
|
-
:rtype: str
|
|
169
|
-
"""
|
|
170
|
-
return self._username
|
|
171
|
-
|
|
172
|
-
@username.setter
|
|
173
|
-
def username(self, username: 'str'):
|
|
174
|
-
"""Sets the username of this SnowflakeQueryBody.
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
:param username: The username of this SnowflakeQueryBody. # noqa: E501
|
|
178
|
-
:type: str
|
|
179
|
-
"""
|
|
180
|
-
|
|
181
|
-
self._username = username
|
|
182
|
-
|
|
183
131
|
def to_dict(self) -> dict:
|
|
184
132
|
"""Returns the model properties as a dict"""
|
|
185
133
|
result = {}
|
|
@@ -41,25 +41,51 @@ class V1GetModelFileUrlResponse(object):
|
|
|
41
41
|
and the value is json key in definition.
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
|
+
'filepath': 'str',
|
|
44
45
|
'size': 'str',
|
|
45
46
|
'url': 'str'
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
attribute_map = {
|
|
50
|
+
'filepath': 'filepath',
|
|
49
51
|
'size': 'size',
|
|
50
52
|
'url': 'url'
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
def __init__(self, size: 'str' =None, url: 'str' =None): # noqa: E501
|
|
55
|
+
def __init__(self, filepath: 'str' =None, size: 'str' =None, url: 'str' =None): # noqa: E501
|
|
54
56
|
"""V1GetModelFileUrlResponse - a model defined in Swagger""" # noqa: E501
|
|
57
|
+
self._filepath = None
|
|
55
58
|
self._size = None
|
|
56
59
|
self._url = None
|
|
57
60
|
self.discriminator = None
|
|
61
|
+
if filepath is not None:
|
|
62
|
+
self.filepath = filepath
|
|
58
63
|
if size is not None:
|
|
59
64
|
self.size = size
|
|
60
65
|
if url is not None:
|
|
61
66
|
self.url = url
|
|
62
67
|
|
|
68
|
+
@property
|
|
69
|
+
def filepath(self) -> 'str':
|
|
70
|
+
"""Gets the filepath of this V1GetModelFileUrlResponse. # noqa: E501
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:return: The filepath of this V1GetModelFileUrlResponse. # noqa: E501
|
|
74
|
+
:rtype: str
|
|
75
|
+
"""
|
|
76
|
+
return self._filepath
|
|
77
|
+
|
|
78
|
+
@filepath.setter
|
|
79
|
+
def filepath(self, filepath: 'str'):
|
|
80
|
+
"""Sets the filepath of this V1GetModelFileUrlResponse.
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
:param filepath: The filepath of this V1GetModelFileUrlResponse. # noqa: E501
|
|
84
|
+
:type: str
|
|
85
|
+
"""
|
|
86
|
+
|
|
87
|
+
self._filepath = filepath
|
|
88
|
+
|
|
63
89
|
@property
|
|
64
90
|
def size(self) -> 'str':
|
|
65
91
|
"""Gets the size of this V1GetModelFileUrlResponse. # noqa: E501
|
|
@@ -42,7 +42,7 @@ class V1GetModelFilesResponse(object):
|
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'filepaths': 'list[str]',
|
|
45
|
-
'
|
|
45
|
+
'files': 'list[V1ModelFile]',
|
|
46
46
|
'model_id': 'str',
|
|
47
47
|
'project_id': 'str',
|
|
48
48
|
'size_bytes': 'str',
|
|
@@ -52,7 +52,7 @@ class V1GetModelFilesResponse(object):
|
|
|
52
52
|
|
|
53
53
|
attribute_map = {
|
|
54
54
|
'filepaths': 'filepaths',
|
|
55
|
-
'
|
|
55
|
+
'files': 'files',
|
|
56
56
|
'model_id': 'modelId',
|
|
57
57
|
'project_id': 'projectId',
|
|
58
58
|
'size_bytes': 'sizeBytes',
|
|
@@ -60,10 +60,10 @@ class V1GetModelFilesResponse(object):
|
|
|
60
60
|
'version': 'version'
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
def __init__(self, filepaths: 'list[str]' =None,
|
|
63
|
+
def __init__(self, filepaths: 'list[str]' =None, files: 'list[V1ModelFile]' =None, model_id: 'str' =None, project_id: 'str' =None, size_bytes: 'str' =None, upload_complete: 'bool' =None, version: 'str' =None): # noqa: E501
|
|
64
64
|
"""V1GetModelFilesResponse - a model defined in Swagger""" # noqa: E501
|
|
65
65
|
self._filepaths = None
|
|
66
|
-
self.
|
|
66
|
+
self._files = None
|
|
67
67
|
self._model_id = None
|
|
68
68
|
self._project_id = None
|
|
69
69
|
self._size_bytes = None
|
|
@@ -72,8 +72,8 @@ class V1GetModelFilesResponse(object):
|
|
|
72
72
|
self.discriminator = None
|
|
73
73
|
if filepaths is not None:
|
|
74
74
|
self.filepaths = filepaths
|
|
75
|
-
if
|
|
76
|
-
self.
|
|
75
|
+
if files is not None:
|
|
76
|
+
self.files = files
|
|
77
77
|
if model_id is not None:
|
|
78
78
|
self.model_id = model_id
|
|
79
79
|
if project_id is not None:
|
|
@@ -107,25 +107,25 @@ class V1GetModelFilesResponse(object):
|
|
|
107
107
|
self._filepaths = filepaths
|
|
108
108
|
|
|
109
109
|
@property
|
|
110
|
-
def
|
|
111
|
-
"""Gets the
|
|
110
|
+
def files(self) -> 'list[V1ModelFile]':
|
|
111
|
+
"""Gets the files of this V1GetModelFilesResponse. # noqa: E501
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
:return: The
|
|
115
|
-
:rtype: list[
|
|
114
|
+
:return: The files of this V1GetModelFilesResponse. # noqa: E501
|
|
115
|
+
:rtype: list[V1ModelFile]
|
|
116
116
|
"""
|
|
117
|
-
return self.
|
|
117
|
+
return self._files
|
|
118
118
|
|
|
119
|
-
@
|
|
120
|
-
def
|
|
121
|
-
"""Sets the
|
|
119
|
+
@files.setter
|
|
120
|
+
def files(self, files: 'list[V1ModelFile]'):
|
|
121
|
+
"""Sets the files of this V1GetModelFilesResponse.
|
|
122
122
|
|
|
123
123
|
|
|
124
|
-
:param
|
|
125
|
-
:type: list[
|
|
124
|
+
:param files: The files of this V1GetModelFilesResponse. # noqa: E501
|
|
125
|
+
:type: list[V1ModelFile]
|
|
126
126
|
"""
|
|
127
127
|
|
|
128
|
-
self.
|
|
128
|
+
self._files = files
|
|
129
129
|
|
|
130
130
|
@property
|
|
131
131
|
def model_id(self) -> 'str':
|
|
@@ -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 V1GetModelFilesUrlResponse(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
|
+
'files': 'list[V1ModelFile]',
|
|
45
|
+
'offset': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'files': 'files',
|
|
50
|
+
'offset': 'offset'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, files: 'list[V1ModelFile]' =None, offset: 'str' =None): # noqa: E501
|
|
54
|
+
"""V1GetModelFilesUrlResponse - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._files = None
|
|
56
|
+
self._offset = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if files is not None:
|
|
59
|
+
self.files = files
|
|
60
|
+
if offset is not None:
|
|
61
|
+
self.offset = offset
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def files(self) -> 'list[V1ModelFile]':
|
|
65
|
+
"""Gets the files of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The files of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
69
|
+
:rtype: list[V1ModelFile]
|
|
70
|
+
"""
|
|
71
|
+
return self._files
|
|
72
|
+
|
|
73
|
+
@files.setter
|
|
74
|
+
def files(self, files: 'list[V1ModelFile]'):
|
|
75
|
+
"""Sets the files of this V1GetModelFilesUrlResponse.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param files: The files of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
79
|
+
:type: list[V1ModelFile]
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._files = files
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def offset(self) -> 'str':
|
|
86
|
+
"""Gets the offset of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The offset of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._offset
|
|
93
|
+
|
|
94
|
+
@offset.setter
|
|
95
|
+
def offset(self, offset: 'str'):
|
|
96
|
+
"""Sets the offset of this V1GetModelFilesUrlResponse.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param offset: The offset of this V1GetModelFilesUrlResponse. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._offset = offset
|
|
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(V1GetModelFilesUrlResponse, 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: 'V1GetModelFilesUrlResponse') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1GetModelFilesUrlResponse):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1GetModelFilesUrlResponse') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|
|
@@ -43,6 +43,7 @@ class V1GetProjectBalanceResponse(object):
|
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'account_id': 'str',
|
|
45
45
|
'balance': 'float',
|
|
46
|
+
'next_free_credits_grant_at': 'datetime',
|
|
46
47
|
'project_id': 'str',
|
|
47
48
|
'transactions': 'list[V1Transaction]'
|
|
48
49
|
}
|
|
@@ -50,14 +51,16 @@ class V1GetProjectBalanceResponse(object):
|
|
|
50
51
|
attribute_map = {
|
|
51
52
|
'account_id': 'accountId',
|
|
52
53
|
'balance': 'balance',
|
|
54
|
+
'next_free_credits_grant_at': 'nextFreeCreditsGrantAt',
|
|
53
55
|
'project_id': 'projectId',
|
|
54
56
|
'transactions': 'transactions'
|
|
55
57
|
}
|
|
56
58
|
|
|
57
|
-
def __init__(self, account_id: 'str' =None, balance: 'float' =None, project_id: 'str' =None, transactions: 'list[V1Transaction]' =None): # noqa: E501
|
|
59
|
+
def __init__(self, account_id: 'str' =None, balance: 'float' =None, next_free_credits_grant_at: 'datetime' =None, project_id: 'str' =None, transactions: 'list[V1Transaction]' =None): # noqa: E501
|
|
58
60
|
"""V1GetProjectBalanceResponse - a model defined in Swagger""" # noqa: E501
|
|
59
61
|
self._account_id = None
|
|
60
62
|
self._balance = None
|
|
63
|
+
self._next_free_credits_grant_at = None
|
|
61
64
|
self._project_id = None
|
|
62
65
|
self._transactions = None
|
|
63
66
|
self.discriminator = None
|
|
@@ -65,6 +68,8 @@ class V1GetProjectBalanceResponse(object):
|
|
|
65
68
|
self.account_id = account_id
|
|
66
69
|
if balance is not None:
|
|
67
70
|
self.balance = balance
|
|
71
|
+
if next_free_credits_grant_at is not None:
|
|
72
|
+
self.next_free_credits_grant_at = next_free_credits_grant_at
|
|
68
73
|
if project_id is not None:
|
|
69
74
|
self.project_id = project_id
|
|
70
75
|
if transactions is not None:
|
|
@@ -112,6 +117,27 @@ class V1GetProjectBalanceResponse(object):
|
|
|
112
117
|
|
|
113
118
|
self._balance = balance
|
|
114
119
|
|
|
120
|
+
@property
|
|
121
|
+
def next_free_credits_grant_at(self) -> 'datetime':
|
|
122
|
+
"""Gets the next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
:return: The next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
|
|
126
|
+
:rtype: datetime
|
|
127
|
+
"""
|
|
128
|
+
return self._next_free_credits_grant_at
|
|
129
|
+
|
|
130
|
+
@next_free_credits_grant_at.setter
|
|
131
|
+
def next_free_credits_grant_at(self, next_free_credits_grant_at: 'datetime'):
|
|
132
|
+
"""Sets the next_free_credits_grant_at of this V1GetProjectBalanceResponse.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:param next_free_credits_grant_at: The next_free_credits_grant_at of this V1GetProjectBalanceResponse. # noqa: E501
|
|
136
|
+
:type: datetime
|
|
137
|
+
"""
|
|
138
|
+
|
|
139
|
+
self._next_free_credits_grant_at = next_free_credits_grant_at
|
|
140
|
+
|
|
115
141
|
@property
|
|
116
142
|
def project_id(self) -> 'str':
|
|
117
143
|
"""Gets the project_id of this V1GetProjectBalanceResponse. # noqa: E501
|
|
@@ -0,0 +1,123 @@
|
|
|
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 V1ListMultiMachineJobEventsResponse(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
|
+
'events': 'list[V1MultiMachineJobEvent]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'events': 'events'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, events: 'list[V1MultiMachineJobEvent]' =None): # noqa: E501
|
|
52
|
+
"""V1ListMultiMachineJobEventsResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._events = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if events is not None:
|
|
56
|
+
self.events = events
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def events(self) -> 'list[V1MultiMachineJobEvent]':
|
|
60
|
+
"""Gets the events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
|
|
64
|
+
:rtype: list[V1MultiMachineJobEvent]
|
|
65
|
+
"""
|
|
66
|
+
return self._events
|
|
67
|
+
|
|
68
|
+
@events.setter
|
|
69
|
+
def events(self, events: 'list[V1MultiMachineJobEvent]'):
|
|
70
|
+
"""Sets the events of this V1ListMultiMachineJobEventsResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param events: The events of this V1ListMultiMachineJobEventsResponse. # noqa: E501
|
|
74
|
+
:type: list[V1MultiMachineJobEvent]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._events = events
|
|
78
|
+
|
|
79
|
+
def to_dict(self) -> dict:
|
|
80
|
+
"""Returns the model properties as a dict"""
|
|
81
|
+
result = {}
|
|
82
|
+
|
|
83
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
84
|
+
value = getattr(self, attr)
|
|
85
|
+
if isinstance(value, list):
|
|
86
|
+
result[attr] = list(map(
|
|
87
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
88
|
+
value
|
|
89
|
+
))
|
|
90
|
+
elif hasattr(value, "to_dict"):
|
|
91
|
+
result[attr] = value.to_dict()
|
|
92
|
+
elif isinstance(value, dict):
|
|
93
|
+
result[attr] = dict(map(
|
|
94
|
+
lambda item: (item[0], item[1].to_dict())
|
|
95
|
+
if hasattr(item[1], "to_dict") else item,
|
|
96
|
+
value.items()
|
|
97
|
+
))
|
|
98
|
+
else:
|
|
99
|
+
result[attr] = value
|
|
100
|
+
if issubclass(V1ListMultiMachineJobEventsResponse, dict):
|
|
101
|
+
for key, value in self.items():
|
|
102
|
+
result[key] = value
|
|
103
|
+
|
|
104
|
+
return result
|
|
105
|
+
|
|
106
|
+
def to_str(self) -> str:
|
|
107
|
+
"""Returns the string representation of the model"""
|
|
108
|
+
return pprint.pformat(self.to_dict())
|
|
109
|
+
|
|
110
|
+
def __repr__(self) -> str:
|
|
111
|
+
"""For `print` and `pprint`"""
|
|
112
|
+
return self.to_str()
|
|
113
|
+
|
|
114
|
+
def __eq__(self, other: 'V1ListMultiMachineJobEventsResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1ListMultiMachineJobEventsResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1ListMultiMachineJobEventsResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -66,6 +66,7 @@ class V1MetricsStream(object):
|
|
|
66
66
|
'user_id': 'str',
|
|
67
67
|
'version': 'datetime',
|
|
68
68
|
'version_number': 'int',
|
|
69
|
+
'visibility': 'V1ResourceVisibility',
|
|
69
70
|
'work_id': 'str'
|
|
70
71
|
}
|
|
71
72
|
|
|
@@ -95,10 +96,11 @@ class V1MetricsStream(object):
|
|
|
95
96
|
'user_id': 'userId',
|
|
96
97
|
'version': 'version',
|
|
97
98
|
'version_number': 'versionNumber',
|
|
99
|
+
'visibility': 'visibility',
|
|
98
100
|
'work_id': 'workId'
|
|
99
101
|
}
|
|
100
102
|
|
|
101
|
-
def __init__(self, app_id: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, dark_color: 'str' =None, id: 'str' =None, job_name: 'str' =None, light_color: 'str' =None, name: 'str' =None, persisted: 'bool' =None, phase: 'V1PhaseType' =None, plugin_id: 'str' =None, project_id: 'str' =None, source_id: 'str' =None, stopped_at: 'datetime' =None, store_created_at: 'bool' =None, store_step: 'bool' =None, system_info: 'V1SystemInfo' =None, tags: 'list[V1MetricsTags]' =None, trackers: 'dict(str, V1MetricsTracker)' =None, updated_at: 'datetime' =None, updates_counter: 'int' =None, user_id: 'str' =None, version: 'datetime' =None, version_number: 'int' =None, work_id: 'str' =None): # noqa: E501
|
|
103
|
+
def __init__(self, app_id: 'str' =None, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, dark_color: 'str' =None, id: 'str' =None, job_name: 'str' =None, light_color: 'str' =None, name: 'str' =None, persisted: 'bool' =None, phase: 'V1PhaseType' =None, plugin_id: 'str' =None, project_id: 'str' =None, source_id: 'str' =None, stopped_at: 'datetime' =None, store_created_at: 'bool' =None, store_step: 'bool' =None, system_info: 'V1SystemInfo' =None, tags: 'list[V1MetricsTags]' =None, trackers: 'dict(str, V1MetricsTracker)' =None, updated_at: 'datetime' =None, updates_counter: 'int' =None, user_id: 'str' =None, version: 'datetime' =None, version_number: 'int' =None, visibility: 'V1ResourceVisibility' =None, work_id: 'str' =None): # noqa: E501
|
|
102
104
|
"""V1MetricsStream - a model defined in Swagger""" # noqa: E501
|
|
103
105
|
self._app_id = None
|
|
104
106
|
self._cloudspace_id = None
|
|
@@ -125,6 +127,7 @@ class V1MetricsStream(object):
|
|
|
125
127
|
self._user_id = None
|
|
126
128
|
self._version = None
|
|
127
129
|
self._version_number = None
|
|
130
|
+
self._visibility = None
|
|
128
131
|
self._work_id = None
|
|
129
132
|
self.discriminator = None
|
|
130
133
|
if app_id is not None:
|
|
@@ -177,6 +180,8 @@ class V1MetricsStream(object):
|
|
|
177
180
|
self.version = version
|
|
178
181
|
if version_number is not None:
|
|
179
182
|
self.version_number = version_number
|
|
183
|
+
if visibility is not None:
|
|
184
|
+
self.visibility = visibility
|
|
180
185
|
if work_id is not None:
|
|
181
186
|
self.work_id = work_id
|
|
182
187
|
|
|
@@ -705,6 +710,27 @@ class V1MetricsStream(object):
|
|
|
705
710
|
|
|
706
711
|
self._version_number = version_number
|
|
707
712
|
|
|
713
|
+
@property
|
|
714
|
+
def visibility(self) -> 'V1ResourceVisibility':
|
|
715
|
+
"""Gets the visibility of this V1MetricsStream. # noqa: E501
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
:return: The visibility of this V1MetricsStream. # noqa: E501
|
|
719
|
+
:rtype: V1ResourceVisibility
|
|
720
|
+
"""
|
|
721
|
+
return self._visibility
|
|
722
|
+
|
|
723
|
+
@visibility.setter
|
|
724
|
+
def visibility(self, visibility: 'V1ResourceVisibility'):
|
|
725
|
+
"""Sets the visibility of this V1MetricsStream.
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
:param visibility: The visibility of this V1MetricsStream. # noqa: E501
|
|
729
|
+
:type: V1ResourceVisibility
|
|
730
|
+
"""
|
|
731
|
+
|
|
732
|
+
self._visibility = visibility
|
|
733
|
+
|
|
708
734
|
@property
|
|
709
735
|
def work_id(self) -> 'str':
|
|
710
736
|
"""Gets the work_id of this V1MetricsStream. # noqa: E501
|