lightning-sdk 2025.9.10__py3-none-any.whl → 2025.9.11__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/lightning_cloud/login.py +60 -0
- lightning_sdk/lightning_cloud/openapi/__init__.py +3 -0
- lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py +105 -0
- lightning_sdk/lightning_cloud/openapi/models/__init__.py +3 -0
- lightning_sdk/lightning_cloud/openapi/models/project_tab_management_messages.py +123 -0
- lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_project.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_project_tab.py +149 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_update_project_tab_order_response.py +123 -0
- lightning_sdk/llm/llm.py +12 -3
- {lightning_sdk-2025.9.10.dist-info → lightning_sdk-2025.9.11.dist-info}/METADATA +1 -1
- {lightning_sdk-2025.9.10.dist-info → lightning_sdk-2025.9.11.dist-info}/RECORD +18 -15
- {lightning_sdk-2025.9.10.dist-info → lightning_sdk-2025.9.11.dist-info}/LICENSE +0 -0
- {lightning_sdk-2025.9.10.dist-info → lightning_sdk-2025.9.11.dist-info}/WHEEL +0 -0
- {lightning_sdk-2025.9.10.dist-info → lightning_sdk-2025.9.11.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-2025.9.10.dist-info → lightning_sdk-2025.9.11.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
|
@@ -17,6 +17,11 @@ from starlette.background import BackgroundTask
|
|
|
17
17
|
from starlette.responses import RedirectResponse
|
|
18
18
|
|
|
19
19
|
from lightning_sdk.lightning_cloud import env
|
|
20
|
+
from lightning_sdk.lightning_cloud.openapi import ApiClient, Configuration
|
|
21
|
+
from lightning_sdk.lightning_cloud.openapi.api import \
|
|
22
|
+
AuthServiceApi
|
|
23
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_guest_login_request import \
|
|
24
|
+
V1GuestLoginRequest
|
|
20
25
|
|
|
21
26
|
logger = logging.getLogger(__name__)
|
|
22
27
|
|
|
@@ -132,6 +137,61 @@ class Auth:
|
|
|
132
137
|
"We couldn't find any credentials linked to your account. Please try logging in using the CLI command `lightning login`"
|
|
133
138
|
)
|
|
134
139
|
|
|
140
|
+
def guest_login(self) -> Optional[str]:
|
|
141
|
+
"""Performs guest user authentication.
|
|
142
|
+
This method sends a request to the guest login endpoint to get temporary
|
|
143
|
+
credentials, saves them, and returns the authorization header.
|
|
144
|
+
Useful to log experiments as a non signed in user, using a guest account
|
|
145
|
+
in the background.
|
|
146
|
+
Returns
|
|
147
|
+
-------
|
|
148
|
+
Optional[str]
|
|
149
|
+
The authorization header to use for subsequent requests.
|
|
150
|
+
Raises
|
|
151
|
+
------
|
|
152
|
+
RuntimeError
|
|
153
|
+
If the guest login request fails.
|
|
154
|
+
ValueError
|
|
155
|
+
If the response from the server is invalid.
|
|
156
|
+
"""
|
|
157
|
+
|
|
158
|
+
config = Configuration()
|
|
159
|
+
config.host = env.LIGHTNING_CLOUD_URL
|
|
160
|
+
api_client = ApiClient(configuration=config)
|
|
161
|
+
auth_api = AuthServiceApi(api_client)
|
|
162
|
+
|
|
163
|
+
logger.debug(f"Attempting guest login to {config.host}")
|
|
164
|
+
|
|
165
|
+
try:
|
|
166
|
+
# The body is an empty object for a guest login.
|
|
167
|
+
body = V1GuestLoginRequest()
|
|
168
|
+
credentials = auth_api.auth_service_guest_login(body)
|
|
169
|
+
|
|
170
|
+
except requests.RequestException as e:
|
|
171
|
+
logger.error(f"Guest login request failed: {e}")
|
|
172
|
+
raise RuntimeError(
|
|
173
|
+
"Failed to connect to the guest login endpoint. "
|
|
174
|
+
"Please check your network connection and the server status."
|
|
175
|
+
) from e
|
|
176
|
+
|
|
177
|
+
# attributes based on the `V1GuestLoginResponse` model.
|
|
178
|
+
user = getattr(credentials, "user", None)
|
|
179
|
+
user_id = getattr(user, "id", None) if user else None
|
|
180
|
+
api_key = getattr(user, "api_key", None) if user else None
|
|
181
|
+
|
|
182
|
+
if not all([user_id, api_key]):
|
|
183
|
+
logger.error(
|
|
184
|
+
f"Incomplete credentials received from guest login: {credentials}"
|
|
185
|
+
)
|
|
186
|
+
raise ValueError(
|
|
187
|
+
"The guest login response did not contain the required 'user_id' and 'api_key' fields."
|
|
188
|
+
)
|
|
189
|
+
|
|
190
|
+
self.save(user_id=user_id, api_key=api_key)
|
|
191
|
+
logger.info("Successfully authenticated as a guest user.")
|
|
192
|
+
|
|
193
|
+
return self.auth_header
|
|
194
|
+
|
|
135
195
|
|
|
136
196
|
class AuthServer:
|
|
137
197
|
|
|
@@ -207,6 +207,7 @@ from lightning_sdk.lightning_cloud.openapi.models.project_id_schedules_body impo
|
|
|
207
207
|
from lightning_sdk.lightning_cloud.openapi.models.project_id_secrets_body import ProjectIdSecretsBody
|
|
208
208
|
from lightning_sdk.lightning_cloud.openapi.models.project_id_snowflake_body import ProjectIdSnowflakeBody
|
|
209
209
|
from lightning_sdk.lightning_cloud.openapi.models.project_id_storage_body import ProjectIdStorageBody
|
|
210
|
+
from lightning_sdk.lightning_cloud.openapi.models.project_tab_management_messages import ProjectTabManagementMessages
|
|
210
211
|
from lightning_sdk.lightning_cloud.openapi.models.projects_id_body import ProjectsIdBody
|
|
211
212
|
from lightning_sdk.lightning_cloud.openapi.models.projects_project_id_body import ProjectsProjectIdBody
|
|
212
213
|
from lightning_sdk.lightning_cloud.openapi.models.protobuf_any import ProtobufAny
|
|
@@ -870,6 +871,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_project_membership_invite i
|
|
|
870
871
|
from lightning_sdk.lightning_cloud.openapi.models.v1_project_membership_role_binding import V1ProjectMembershipRoleBinding
|
|
871
872
|
from lightning_sdk.lightning_cloud.openapi.models.v1_project_settings import V1ProjectSettings
|
|
872
873
|
from lightning_sdk.lightning_cloud.openapi.models.v1_project_storage import V1ProjectStorage
|
|
874
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_project_tab import V1ProjectTab
|
|
873
875
|
from lightning_sdk.lightning_cloud.openapi.models.v1_prompt_suggestion import V1PromptSuggestion
|
|
874
876
|
from lightning_sdk.lightning_cloud.openapi.models.v1_publish_cloud_space_response import V1PublishCloudSpaceResponse
|
|
875
877
|
from lightning_sdk.lightning_cloud.openapi.models.v1_published_cloud_space_response import V1PublishedCloudSpaceResponse
|
|
@@ -1002,6 +1004,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_metrics_stream_visib
|
|
|
1002
1004
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_model_visibility_response import V1UpdateModelVisibilityResponse
|
|
1003
1005
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_organization_credits_auto_replenish_response import V1UpdateOrganizationCreditsAutoReplenishResponse
|
|
1004
1006
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_project_cluster_accelerators_response import V1UpdateProjectClusterAcceleratorsResponse
|
|
1007
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_update_project_tab_order_response import V1UpdateProjectTabOrderResponse
|
|
1005
1008
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_shared_metrics_stream_response import V1UpdateSharedMetricsStreamResponse
|
|
1006
1009
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_snowflake_query_response import V1UpdateSnowflakeQueryResponse
|
|
1007
1010
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_credits_auto_replenish_response import V1UpdateUserCreditsAutoReplenishResponse
|
|
@@ -1965,3 +1965,108 @@ class ProjectsServiceApi(object):
|
|
|
1965
1965
|
_preload_content=params.get('_preload_content', True),
|
|
1966
1966
|
_request_timeout=params.get('_request_timeout'),
|
|
1967
1967
|
collection_formats=collection_formats)
|
|
1968
|
+
|
|
1969
|
+
def projects_service_update_project_tab_order(self, body: 'ProjectTabManagementMessages', project_id: 'str', **kwargs) -> 'V1UpdateProjectTabOrderResponse': # noqa: E501
|
|
1970
|
+
"""Project tab management # noqa: E501
|
|
1971
|
+
|
|
1972
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1973
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1974
|
+
>>> thread = api.projects_service_update_project_tab_order(body, project_id, async_req=True)
|
|
1975
|
+
>>> result = thread.get()
|
|
1976
|
+
|
|
1977
|
+
:param async_req bool
|
|
1978
|
+
:param ProjectTabManagementMessages body: (required)
|
|
1979
|
+
:param str project_id: (required)
|
|
1980
|
+
:return: V1UpdateProjectTabOrderResponse
|
|
1981
|
+
If the method is called asynchronously,
|
|
1982
|
+
returns the request thread.
|
|
1983
|
+
"""
|
|
1984
|
+
kwargs['_return_http_data_only'] = True
|
|
1985
|
+
if kwargs.get('async_req'):
|
|
1986
|
+
return self.projects_service_update_project_tab_order_with_http_info(body, project_id, **kwargs) # noqa: E501
|
|
1987
|
+
else:
|
|
1988
|
+
(data) = self.projects_service_update_project_tab_order_with_http_info(body, project_id, **kwargs) # noqa: E501
|
|
1989
|
+
return data
|
|
1990
|
+
|
|
1991
|
+
def projects_service_update_project_tab_order_with_http_info(self, body: 'ProjectTabManagementMessages', project_id: 'str', **kwargs) -> 'V1UpdateProjectTabOrderResponse': # noqa: E501
|
|
1992
|
+
"""Project tab management # noqa: E501
|
|
1993
|
+
|
|
1994
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
1995
|
+
asynchronous HTTP request, please pass async_req=True
|
|
1996
|
+
>>> thread = api.projects_service_update_project_tab_order_with_http_info(body, project_id, async_req=True)
|
|
1997
|
+
>>> result = thread.get()
|
|
1998
|
+
|
|
1999
|
+
:param async_req bool
|
|
2000
|
+
:param ProjectTabManagementMessages body: (required)
|
|
2001
|
+
:param str project_id: (required)
|
|
2002
|
+
:return: V1UpdateProjectTabOrderResponse
|
|
2003
|
+
If the method is called asynchronously,
|
|
2004
|
+
returns the request thread.
|
|
2005
|
+
"""
|
|
2006
|
+
|
|
2007
|
+
all_params = ['body', 'project_id'] # noqa: E501
|
|
2008
|
+
all_params.append('async_req')
|
|
2009
|
+
all_params.append('_return_http_data_only')
|
|
2010
|
+
all_params.append('_preload_content')
|
|
2011
|
+
all_params.append('_request_timeout')
|
|
2012
|
+
|
|
2013
|
+
params = locals()
|
|
2014
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
2015
|
+
if key not in all_params:
|
|
2016
|
+
raise TypeError(
|
|
2017
|
+
"Got an unexpected keyword argument '%s'"
|
|
2018
|
+
" to method projects_service_update_project_tab_order" % key
|
|
2019
|
+
)
|
|
2020
|
+
params[key] = val
|
|
2021
|
+
del params['kwargs']
|
|
2022
|
+
# verify the required parameter 'body' is set
|
|
2023
|
+
if ('body' not in params or
|
|
2024
|
+
params['body'] is None):
|
|
2025
|
+
raise ValueError("Missing the required parameter `body` when calling `projects_service_update_project_tab_order`") # noqa: E501
|
|
2026
|
+
# verify the required parameter 'project_id' is set
|
|
2027
|
+
if ('project_id' not in params or
|
|
2028
|
+
params['project_id'] is None):
|
|
2029
|
+
raise ValueError("Missing the required parameter `project_id` when calling `projects_service_update_project_tab_order`") # noqa: E501
|
|
2030
|
+
|
|
2031
|
+
collection_formats = {}
|
|
2032
|
+
|
|
2033
|
+
path_params = {}
|
|
2034
|
+
if 'project_id' in params:
|
|
2035
|
+
path_params['projectId'] = params['project_id'] # noqa: E501
|
|
2036
|
+
|
|
2037
|
+
query_params = []
|
|
2038
|
+
|
|
2039
|
+
header_params = {}
|
|
2040
|
+
|
|
2041
|
+
form_params = []
|
|
2042
|
+
local_var_files = {}
|
|
2043
|
+
|
|
2044
|
+
body_params = None
|
|
2045
|
+
if 'body' in params:
|
|
2046
|
+
body_params = params['body']
|
|
2047
|
+
# HTTP header `Accept`
|
|
2048
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
2049
|
+
['application/json']) # noqa: E501
|
|
2050
|
+
|
|
2051
|
+
# HTTP header `Content-Type`
|
|
2052
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
2053
|
+
['application/json']) # noqa: E501
|
|
2054
|
+
|
|
2055
|
+
# Authentication setting
|
|
2056
|
+
auth_settings = [] # noqa: E501
|
|
2057
|
+
|
|
2058
|
+
return self.api_client.call_api(
|
|
2059
|
+
'/v1/projects/{projectId}/tab-order', 'PUT',
|
|
2060
|
+
path_params,
|
|
2061
|
+
query_params,
|
|
2062
|
+
header_params,
|
|
2063
|
+
body=body_params,
|
|
2064
|
+
post_params=form_params,
|
|
2065
|
+
files=local_var_files,
|
|
2066
|
+
response_type='V1UpdateProjectTabOrderResponse', # noqa: E501
|
|
2067
|
+
auth_settings=auth_settings,
|
|
2068
|
+
async_req=params.get('async_req'),
|
|
2069
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
2070
|
+
_preload_content=params.get('_preload_content', True),
|
|
2071
|
+
_request_timeout=params.get('_request_timeout'),
|
|
2072
|
+
collection_formats=collection_formats)
|
|
@@ -159,6 +159,7 @@ from lightning_sdk.lightning_cloud.openapi.models.project_id_schedules_body impo
|
|
|
159
159
|
from lightning_sdk.lightning_cloud.openapi.models.project_id_secrets_body import ProjectIdSecretsBody
|
|
160
160
|
from lightning_sdk.lightning_cloud.openapi.models.project_id_snowflake_body import ProjectIdSnowflakeBody
|
|
161
161
|
from lightning_sdk.lightning_cloud.openapi.models.project_id_storage_body import ProjectIdStorageBody
|
|
162
|
+
from lightning_sdk.lightning_cloud.openapi.models.project_tab_management_messages import ProjectTabManagementMessages
|
|
162
163
|
from lightning_sdk.lightning_cloud.openapi.models.projects_id_body import ProjectsIdBody
|
|
163
164
|
from lightning_sdk.lightning_cloud.openapi.models.projects_project_id_body import ProjectsProjectIdBody
|
|
164
165
|
from lightning_sdk.lightning_cloud.openapi.models.protobuf_any import ProtobufAny
|
|
@@ -822,6 +823,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_project_membership_invite i
|
|
|
822
823
|
from lightning_sdk.lightning_cloud.openapi.models.v1_project_membership_role_binding import V1ProjectMembershipRoleBinding
|
|
823
824
|
from lightning_sdk.lightning_cloud.openapi.models.v1_project_settings import V1ProjectSettings
|
|
824
825
|
from lightning_sdk.lightning_cloud.openapi.models.v1_project_storage import V1ProjectStorage
|
|
826
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_project_tab import V1ProjectTab
|
|
825
827
|
from lightning_sdk.lightning_cloud.openapi.models.v1_prompt_suggestion import V1PromptSuggestion
|
|
826
828
|
from lightning_sdk.lightning_cloud.openapi.models.v1_publish_cloud_space_response import V1PublishCloudSpaceResponse
|
|
827
829
|
from lightning_sdk.lightning_cloud.openapi.models.v1_published_cloud_space_response import V1PublishedCloudSpaceResponse
|
|
@@ -954,6 +956,7 @@ from lightning_sdk.lightning_cloud.openapi.models.v1_update_metrics_stream_visib
|
|
|
954
956
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_model_visibility_response import V1UpdateModelVisibilityResponse
|
|
955
957
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_organization_credits_auto_replenish_response import V1UpdateOrganizationCreditsAutoReplenishResponse
|
|
956
958
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_project_cluster_accelerators_response import V1UpdateProjectClusterAcceleratorsResponse
|
|
959
|
+
from lightning_sdk.lightning_cloud.openapi.models.v1_update_project_tab_order_response import V1UpdateProjectTabOrderResponse
|
|
957
960
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_shared_metrics_stream_response import V1UpdateSharedMetricsStreamResponse
|
|
958
961
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_snowflake_query_response import V1UpdateSnowflakeQueryResponse
|
|
959
962
|
from lightning_sdk.lightning_cloud.openapi.models.v1_update_user_credits_auto_replenish_response import V1UpdateUserCreditsAutoReplenishResponse
|
|
@@ -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 ProjectTabManagementMessages(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
|
+
'tabs': 'list[V1ProjectTab]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'tabs': 'tabs'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, tabs: 'list[V1ProjectTab]' =None): # noqa: E501
|
|
52
|
+
"""ProjectTabManagementMessages - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._tabs = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if tabs is not None:
|
|
56
|
+
self.tabs = tabs
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def tabs(self) -> 'list[V1ProjectTab]':
|
|
60
|
+
"""Gets the tabs of this ProjectTabManagementMessages. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The tabs of this ProjectTabManagementMessages. # noqa: E501
|
|
64
|
+
:rtype: list[V1ProjectTab]
|
|
65
|
+
"""
|
|
66
|
+
return self._tabs
|
|
67
|
+
|
|
68
|
+
@tabs.setter
|
|
69
|
+
def tabs(self, tabs: 'list[V1ProjectTab]'):
|
|
70
|
+
"""Sets the tabs of this ProjectTabManagementMessages.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param tabs: The tabs of this ProjectTabManagementMessages. # noqa: E501
|
|
74
|
+
:type: list[V1ProjectTab]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._tabs = tabs
|
|
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(ProjectTabManagementMessages, 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: 'ProjectTabManagementMessages') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, ProjectTabManagementMessages):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'ProjectTabManagementMessages') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
|
@@ -57,6 +57,7 @@ class ProjectsIdBody(object):
|
|
|
57
57
|
'default_machine_type': 'str',
|
|
58
58
|
'description': 'str',
|
|
59
59
|
'display_name': 'str',
|
|
60
|
+
'layout_config': 'list[V1ProjectTab]',
|
|
60
61
|
'name': 'str',
|
|
61
62
|
'preferred_cluster': 'str',
|
|
62
63
|
'preferred_deployment_provider': 'str',
|
|
@@ -84,6 +85,7 @@ class ProjectsIdBody(object):
|
|
|
84
85
|
'default_machine_type': 'defaultMachineType',
|
|
85
86
|
'description': 'description',
|
|
86
87
|
'display_name': 'displayName',
|
|
88
|
+
'layout_config': 'layoutConfig',
|
|
87
89
|
'name': 'name',
|
|
88
90
|
'preferred_cluster': 'preferredCluster',
|
|
89
91
|
'preferred_deployment_provider': 'preferredDeploymentProvider',
|
|
@@ -94,7 +96,7 @@ class ProjectsIdBody(object):
|
|
|
94
96
|
'switch_to_default_machine_on_idle': 'switchToDefaultMachineOnIdle'
|
|
95
97
|
}
|
|
96
98
|
|
|
97
|
-
def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_dgx_saas: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_lightning_saas: 'bool' =None, allow_nebius_saas: 'bool' =None, allow_voltage_park_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, quotas: 'V1Quotas' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None): # noqa: E501
|
|
99
|
+
def __init__(self, allow_aws_saas: 'bool' =None, allow_credits_auto_replenish: 'bool' =None, allow_dgx_saas: 'bool' =None, allow_external_project_duplication: 'bool' =None, allow_gcp_saas: 'bool' =None, allow_lambda_saas: 'bool' =None, allow_lightning_saas: 'bool' =None, allow_nebius_saas: 'bool' =None, allow_voltage_park_saas: 'bool' =None, allow_vultr_saas: 'bool' =None, auto_replenish_amount: 'float' =None, auto_replenish_threshold: 'float' =None, auto_switch_machine: 'bool' =None, default_machine_type: 'str' =None, description: 'str' =None, display_name: 'str' =None, layout_config: 'list[V1ProjectTab]' =None, name: 'str' =None, preferred_cluster: 'str' =None, preferred_deployment_provider: 'str' =None, preferred_studio_provider: 'str' =None, quotas: 'V1Quotas' =None, same_compute_on_resume: 'bool' =None, start_studio_on_spot_instance: 'bool' =None, switch_to_default_machine_on_idle: 'bool' =None): # noqa: E501
|
|
98
100
|
"""ProjectsIdBody - a model defined in Swagger""" # noqa: E501
|
|
99
101
|
self._allow_aws_saas = None
|
|
100
102
|
self._allow_credits_auto_replenish = None
|
|
@@ -112,6 +114,7 @@ class ProjectsIdBody(object):
|
|
|
112
114
|
self._default_machine_type = None
|
|
113
115
|
self._description = None
|
|
114
116
|
self._display_name = None
|
|
117
|
+
self._layout_config = None
|
|
115
118
|
self._name = None
|
|
116
119
|
self._preferred_cluster = None
|
|
117
120
|
self._preferred_deployment_provider = None
|
|
@@ -153,6 +156,8 @@ class ProjectsIdBody(object):
|
|
|
153
156
|
self.description = description
|
|
154
157
|
if display_name is not None:
|
|
155
158
|
self.display_name = display_name
|
|
159
|
+
if layout_config is not None:
|
|
160
|
+
self.layout_config = layout_config
|
|
156
161
|
if name is not None:
|
|
157
162
|
self.name = name
|
|
158
163
|
if preferred_cluster is not None:
|
|
@@ -506,6 +511,27 @@ class ProjectsIdBody(object):
|
|
|
506
511
|
|
|
507
512
|
self._display_name = display_name
|
|
508
513
|
|
|
514
|
+
@property
|
|
515
|
+
def layout_config(self) -> 'list[V1ProjectTab]':
|
|
516
|
+
"""Gets the layout_config of this ProjectsIdBody. # noqa: E501
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
:return: The layout_config of this ProjectsIdBody. # noqa: E501
|
|
520
|
+
:rtype: list[V1ProjectTab]
|
|
521
|
+
"""
|
|
522
|
+
return self._layout_config
|
|
523
|
+
|
|
524
|
+
@layout_config.setter
|
|
525
|
+
def layout_config(self, layout_config: 'list[V1ProjectTab]'):
|
|
526
|
+
"""Sets the layout_config of this ProjectsIdBody.
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
:param layout_config: The layout_config of this ProjectsIdBody. # noqa: E501
|
|
530
|
+
:type: list[V1ProjectTab]
|
|
531
|
+
"""
|
|
532
|
+
|
|
533
|
+
self._layout_config = layout_config
|
|
534
|
+
|
|
509
535
|
@property
|
|
510
536
|
def name(self) -> 'str':
|
|
511
537
|
"""Gets the name of this ProjectsIdBody. # noqa: E501
|
|
@@ -41,6 +41,7 @@ class V1IncidentType(object):
|
|
|
41
41
|
K8S_HIGH_TEMPERATURE = "INCIDENT_TYPE_K8S_HIGH_TEMPERATURE"
|
|
42
42
|
K8S_UNSCHEDULABLE_GPUS = "INCIDENT_TYPE_K8S_UNSCHEDULABLE_GPUS"
|
|
43
43
|
K8S_XID_GPU_ERROR = "INCIDENT_TYPE_K8S_XID_GPU_ERROR"
|
|
44
|
+
K8S_UNSCHEDULABLE_NODE = "INCIDENT_TYPE_K8S_UNSCHEDULABLE_NODE"
|
|
44
45
|
"""
|
|
45
46
|
Attributes:
|
|
46
47
|
swagger_types (dict): The key is attribute name
|
|
@@ -50,6 +50,7 @@ class V1Project(object):
|
|
|
50
50
|
'free_storage_bytes': 'str',
|
|
51
51
|
'id': 'str',
|
|
52
52
|
'is_default': 'bool',
|
|
53
|
+
'layout_config': 'list[V1ProjectTab]',
|
|
53
54
|
'lock_out_uploads': 'bool',
|
|
54
55
|
'name': 'str',
|
|
55
56
|
'number_of_files_uploads': 'str',
|
|
@@ -73,6 +74,7 @@ class V1Project(object):
|
|
|
73
74
|
'free_storage_bytes': 'freeStorageBytes',
|
|
74
75
|
'id': 'id',
|
|
75
76
|
'is_default': 'isDefault',
|
|
77
|
+
'layout_config': 'layoutConfig',
|
|
76
78
|
'lock_out_uploads': 'lockOutUploads',
|
|
77
79
|
'name': 'name',
|
|
78
80
|
'number_of_files_uploads': 'numberOfFilesUploads',
|
|
@@ -86,7 +88,7 @@ class V1Project(object):
|
|
|
86
88
|
'updated_at': 'updatedAt'
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
def __init__(self, abac_enabled: 'bool' =None, created_at: 'datetime' =None, creator_id: 'str' =None, current_storage_bytes: 'str' =None, description: 'str' =None, display_name: 'str' =None, free_storage_bytes: 'str' =None, id: 'str' =None, is_default: 'bool' =None, lock_out_uploads: 'bool' =None, name: 'str' =None, number_of_files_uploads: 'str' =None, owner_id: 'str' =None, owner_type: 'V1OwnerType' =None, private: 'bool' =None, project_settings: 'V1ProjectSettings' =None, quotas: 'V1Quotas' =None, requires_uploads_sync: 'bool' =None, total_size_uploads_bytes: 'str' =None, updated_at: 'datetime' =None): # noqa: E501
|
|
91
|
+
def __init__(self, abac_enabled: 'bool' =None, created_at: 'datetime' =None, creator_id: 'str' =None, current_storage_bytes: 'str' =None, description: 'str' =None, display_name: 'str' =None, free_storage_bytes: 'str' =None, id: 'str' =None, is_default: 'bool' =None, layout_config: 'list[V1ProjectTab]' =None, lock_out_uploads: 'bool' =None, name: 'str' =None, number_of_files_uploads: 'str' =None, owner_id: 'str' =None, owner_type: 'V1OwnerType' =None, private: 'bool' =None, project_settings: 'V1ProjectSettings' =None, quotas: 'V1Quotas' =None, requires_uploads_sync: 'bool' =None, total_size_uploads_bytes: 'str' =None, updated_at: 'datetime' =None): # noqa: E501
|
|
90
92
|
"""V1Project - a model defined in Swagger""" # noqa: E501
|
|
91
93
|
self._abac_enabled = None
|
|
92
94
|
self._created_at = None
|
|
@@ -97,6 +99,7 @@ class V1Project(object):
|
|
|
97
99
|
self._free_storage_bytes = None
|
|
98
100
|
self._id = None
|
|
99
101
|
self._is_default = None
|
|
102
|
+
self._layout_config = None
|
|
100
103
|
self._lock_out_uploads = None
|
|
101
104
|
self._name = None
|
|
102
105
|
self._number_of_files_uploads = None
|
|
@@ -127,6 +130,8 @@ class V1Project(object):
|
|
|
127
130
|
self.id = id
|
|
128
131
|
if is_default is not None:
|
|
129
132
|
self.is_default = is_default
|
|
133
|
+
if layout_config is not None:
|
|
134
|
+
self.layout_config = layout_config
|
|
130
135
|
if lock_out_uploads is not None:
|
|
131
136
|
self.lock_out_uploads = lock_out_uploads
|
|
132
137
|
if name is not None:
|
|
@@ -339,6 +344,27 @@ class V1Project(object):
|
|
|
339
344
|
|
|
340
345
|
self._is_default = is_default
|
|
341
346
|
|
|
347
|
+
@property
|
|
348
|
+
def layout_config(self) -> 'list[V1ProjectTab]':
|
|
349
|
+
"""Gets the layout_config of this V1Project. # noqa: E501
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
:return: The layout_config of this V1Project. # noqa: E501
|
|
353
|
+
:rtype: list[V1ProjectTab]
|
|
354
|
+
"""
|
|
355
|
+
return self._layout_config
|
|
356
|
+
|
|
357
|
+
@layout_config.setter
|
|
358
|
+
def layout_config(self, layout_config: 'list[V1ProjectTab]'):
|
|
359
|
+
"""Sets the layout_config of this V1Project.
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
:param layout_config: The layout_config of this V1Project. # noqa: E501
|
|
363
|
+
:type: list[V1ProjectTab]
|
|
364
|
+
"""
|
|
365
|
+
|
|
366
|
+
self._layout_config = layout_config
|
|
367
|
+
|
|
342
368
|
@property
|
|
343
369
|
def lock_out_uploads(self) -> 'bool':
|
|
344
370
|
"""Gets the lock_out_uploads of this V1Project. # noqa: E501
|
|
@@ -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 V1ProjectTab(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
|
+
'is_enabled': 'bool',
|
|
45
|
+
'slug': 'str'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
attribute_map = {
|
|
49
|
+
'is_enabled': 'isEnabled',
|
|
50
|
+
'slug': 'slug'
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
def __init__(self, is_enabled: 'bool' =None, slug: 'str' =None): # noqa: E501
|
|
54
|
+
"""V1ProjectTab - a model defined in Swagger""" # noqa: E501
|
|
55
|
+
self._is_enabled = None
|
|
56
|
+
self._slug = None
|
|
57
|
+
self.discriminator = None
|
|
58
|
+
if is_enabled is not None:
|
|
59
|
+
self.is_enabled = is_enabled
|
|
60
|
+
if slug is not None:
|
|
61
|
+
self.slug = slug
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def is_enabled(self) -> 'bool':
|
|
65
|
+
"""Gets the is_enabled of this V1ProjectTab. # noqa: E501
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
:return: The is_enabled of this V1ProjectTab. # noqa: E501
|
|
69
|
+
:rtype: bool
|
|
70
|
+
"""
|
|
71
|
+
return self._is_enabled
|
|
72
|
+
|
|
73
|
+
@is_enabled.setter
|
|
74
|
+
def is_enabled(self, is_enabled: 'bool'):
|
|
75
|
+
"""Sets the is_enabled of this V1ProjectTab.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
:param is_enabled: The is_enabled of this V1ProjectTab. # noqa: E501
|
|
79
|
+
:type: bool
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
self._is_enabled = is_enabled
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def slug(self) -> 'str':
|
|
86
|
+
"""Gets the slug of this V1ProjectTab. # noqa: E501
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
:return: The slug of this V1ProjectTab. # noqa: E501
|
|
90
|
+
:rtype: str
|
|
91
|
+
"""
|
|
92
|
+
return self._slug
|
|
93
|
+
|
|
94
|
+
@slug.setter
|
|
95
|
+
def slug(self, slug: 'str'):
|
|
96
|
+
"""Sets the slug of this V1ProjectTab.
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
:param slug: The slug of this V1ProjectTab. # noqa: E501
|
|
100
|
+
:type: str
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
self._slug = slug
|
|
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(V1ProjectTab, 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: 'V1ProjectTab') -> bool:
|
|
141
|
+
"""Returns true if both objects are equal"""
|
|
142
|
+
if not isinstance(other, V1ProjectTab):
|
|
143
|
+
return False
|
|
144
|
+
|
|
145
|
+
return self.__dict__ == other.__dict__
|
|
146
|
+
|
|
147
|
+
def __ne__(self, other: 'V1ProjectTab') -> bool:
|
|
148
|
+
"""Returns true if both objects are not equal"""
|
|
149
|
+
return not self == other
|
|
@@ -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 V1UpdateProjectTabOrderResponse(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
|
+
'tabs': 'list[V1ProjectTab]'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
attribute_map = {
|
|
48
|
+
'tabs': 'tabs'
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def __init__(self, tabs: 'list[V1ProjectTab]' =None): # noqa: E501
|
|
52
|
+
"""V1UpdateProjectTabOrderResponse - a model defined in Swagger""" # noqa: E501
|
|
53
|
+
self._tabs = None
|
|
54
|
+
self.discriminator = None
|
|
55
|
+
if tabs is not None:
|
|
56
|
+
self.tabs = tabs
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def tabs(self) -> 'list[V1ProjectTab]':
|
|
60
|
+
"""Gets the tabs of this V1UpdateProjectTabOrderResponse. # noqa: E501
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
:return: The tabs of this V1UpdateProjectTabOrderResponse. # noqa: E501
|
|
64
|
+
:rtype: list[V1ProjectTab]
|
|
65
|
+
"""
|
|
66
|
+
return self._tabs
|
|
67
|
+
|
|
68
|
+
@tabs.setter
|
|
69
|
+
def tabs(self, tabs: 'list[V1ProjectTab]'):
|
|
70
|
+
"""Sets the tabs of this V1UpdateProjectTabOrderResponse.
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
:param tabs: The tabs of this V1UpdateProjectTabOrderResponse. # noqa: E501
|
|
74
|
+
:type: list[V1ProjectTab]
|
|
75
|
+
"""
|
|
76
|
+
|
|
77
|
+
self._tabs = tabs
|
|
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(V1UpdateProjectTabOrderResponse, 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: 'V1UpdateProjectTabOrderResponse') -> bool:
|
|
115
|
+
"""Returns true if both objects are equal"""
|
|
116
|
+
if not isinstance(other, V1UpdateProjectTabOrderResponse):
|
|
117
|
+
return False
|
|
118
|
+
|
|
119
|
+
return self.__dict__ == other.__dict__
|
|
120
|
+
|
|
121
|
+
def __ne__(self, other: 'V1UpdateProjectTabOrderResponse') -> bool:
|
|
122
|
+
"""Returns true if both objects are not equal"""
|
|
123
|
+
return not self == other
|
lightning_sdk/llm/llm.py
CHANGED
|
@@ -117,6 +117,15 @@ class LLM:
|
|
|
117
117
|
def metadata(self) -> ModelMetadata:
|
|
118
118
|
if self._metadata is None:
|
|
119
119
|
model = self._llm_api.get_model_metadata(self._teamspace_id, self._model_name)
|
|
120
|
+
abilities = (
|
|
121
|
+
model.abilities
|
|
122
|
+
or type(
|
|
123
|
+
"obj",
|
|
124
|
+
(object,),
|
|
125
|
+
{"can_receive_images": False, "can_receive_files": False, "can_call_hub_deployment": False},
|
|
126
|
+
)()
|
|
127
|
+
)
|
|
128
|
+
|
|
120
129
|
self._metadata = ModelMetadata(
|
|
121
130
|
name=self._model_name,
|
|
122
131
|
provider=self._model_provider,
|
|
@@ -126,9 +135,9 @@ class LLM:
|
|
|
126
135
|
prompt_price=model.prompt_token_price,
|
|
127
136
|
completion_price=model.completion_token_price,
|
|
128
137
|
capabilities={
|
|
129
|
-
"images":
|
|
130
|
-
"files":
|
|
131
|
-
"hub_deployment":
|
|
138
|
+
"images": abilities.can_receive_images,
|
|
139
|
+
"files": abilities.can_receive_files,
|
|
140
|
+
"hub_deployment": abilities.can_call_hub_deployment,
|
|
132
141
|
},
|
|
133
142
|
throughput=model.throughput,
|
|
134
143
|
time_to_first_token=model.time_to_first_token,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
docs/source/conf.py,sha256=r8yX20eC-4mHhMTd0SbQb5TlSWHhO6wnJ0VJ_FBFpag,13249
|
|
2
|
-
lightning_sdk/__init__.py,sha256=
|
|
2
|
+
lightning_sdk/__init__.py,sha256=RTO9pPFR4nJ_S0mZ9BOC-0Wp3hCm4yZ1f8Lvr8RjDwI,1145
|
|
3
3
|
lightning_sdk/agents.py,sha256=ly6Ma1j0ZgGPFyvPvMN28JWiB9dATIstFa5XM8pMi6I,1577
|
|
4
4
|
lightning_sdk/ai_hub.py,sha256=iI1vNhgcz_Ff1c3rN1ogN7dK-r-HXRj6NMtS2cA14UA,6925
|
|
5
5
|
lightning_sdk/base_studio.py,sha256=_Pwwl37R9GRd7t-f2kO5aQXiLNrP4sUtUNht2ZkP8LE,3678
|
|
@@ -99,11 +99,11 @@ lightning_sdk/job/work.py,sha256=aRknNDja-96qQaYw0fNboEGtOZCmvztYEzUPxLNAt8g,245
|
|
|
99
99
|
lightning_sdk/lightning_cloud/__init__.py,sha256=o91SMAlwr4Ke5ESe8fHjqXcj31_h7rT-MlFoXA-n2EI,173
|
|
100
100
|
lightning_sdk/lightning_cloud/__version__.py,sha256=lOfmWHtjmiuSG28TbKQqd2B3nwmSGOlKVFwhaj_cRJk,23
|
|
101
101
|
lightning_sdk/lightning_cloud/env.py,sha256=XZXpF4sD9jlB8DY0herTy_8XiUJuDVjxy5APjRD2_aU,1379
|
|
102
|
-
lightning_sdk/lightning_cloud/login.py,sha256=
|
|
102
|
+
lightning_sdk/lightning_cloud/login.py,sha256=qbIBbyS_6pFUaHXQTuQBkSlTJjoFFPsh4Op3TQw8WVM,9670
|
|
103
103
|
lightning_sdk/lightning_cloud/rest_client.py,sha256=K2J_QXihpbp5tVzs9PzffgMCQY1NeH5tRpuJBYj27vU,7125
|
|
104
104
|
lightning_sdk/lightning_cloud/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
105
105
|
lightning_sdk/lightning_cloud/cli/__main__.py,sha256=aHrigVV0qIp74MuYTdN6uO8a9Xp6E1aOwdR8w1fG-7c,688
|
|
106
|
-
lightning_sdk/lightning_cloud/openapi/__init__.py,sha256=
|
|
106
|
+
lightning_sdk/lightning_cloud/openapi/__init__.py,sha256=khIUajnC_mZ_nwIoiQQ_z0IZPTOC_jxfv8OSHZ8nWyc,115080
|
|
107
107
|
lightning_sdk/lightning_cloud/openapi/api_client.py,sha256=pUTQMNcZmH4BhpnuAXuT7wnegaxaX26bzdEWjdoLeTo,25630
|
|
108
108
|
lightning_sdk/lightning_cloud/openapi/configuration.py,sha256=SkBPJ3WZ9SF1LxxWeGKa4UwbGRsk9p3-yL_Kn7l5CSM,7866
|
|
109
109
|
lightning_sdk/lightning_cloud/openapi/rest.py,sha256=ZPPr6ZkBp6LtuAsiUU7D8Pz8Dt9ECbEM_26Ov74tdpw,13322
|
|
@@ -140,7 +140,7 @@ lightning_sdk/lightning_cloud/openapi/api/pipeline_templates_service_api.py,sha2
|
|
|
140
140
|
lightning_sdk/lightning_cloud/openapi/api/pipelines_service_api.py,sha256=X7StCd6q68-JUMwOAULiOhUhZFWem4cptwPyG9tRNlY,33446
|
|
141
141
|
lightning_sdk/lightning_cloud/openapi/api/product_license_service_api.py,sha256=Ht484M-ChZ3Ddlrv16kHU1HAM75WKieYrj488VwKDtM,21439
|
|
142
142
|
lightning_sdk/lightning_cloud/openapi/api/profiler_service_api.py,sha256=hM2vTawBBuOYZrxN1SjZ6mU5ldvB_jUXRcLb0as0F4M,28286
|
|
143
|
-
lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py,sha256=
|
|
143
|
+
lightning_sdk/lightning_cloud/openapi/api/projects_service_api.py,sha256=gBzdjzpz5NU6VJyO1qMQgH00NAoClBeiEG0N3QH6Tik,89477
|
|
144
144
|
lightning_sdk/lightning_cloud/openapi/api/quest_service_api.py,sha256=IQppAcHoy8J99xdnZVDfyr-yzmFIkolMN3caF-wm7D0,16318
|
|
145
145
|
lightning_sdk/lightning_cloud/openapi/api/schedules_service_api.py,sha256=x2j9pSInKp3jYvQkcNn_DUrA2gvwVU0IVP3ynvlTYw8,40368
|
|
146
146
|
lightning_sdk/lightning_cloud/openapi/api/secret_service_api.py,sha256=-oTJJ_XbfGAKle82anvK2XKSYE9OxRedCmUfJFjB9O0,41339
|
|
@@ -151,7 +151,7 @@ lightning_sdk/lightning_cloud/openapi/api/storage_service_api.py,sha256=7gbiF09P
|
|
|
151
151
|
lightning_sdk/lightning_cloud/openapi/api/studio_jobs_service_api.py,sha256=VJ7VcSvdmGbPkgmQZhaOSR47olcNPMzRlmT5J5uKsng,27877
|
|
152
152
|
lightning_sdk/lightning_cloud/openapi/api/user_service_api.py,sha256=bUCDZf1P16juI8-J_dpE-MvRt3x8x5HBJpluxix6Vzc,68363
|
|
153
153
|
lightning_sdk/lightning_cloud/openapi/api/volume_service_api.py,sha256=pg1aaSuYJUAlUDKLN07l8wC-poU_HFxZ_98QZHty74I,10344
|
|
154
|
-
lightning_sdk/lightning_cloud/openapi/models/__init__.py,sha256=
|
|
154
|
+
lightning_sdk/lightning_cloud/openapi/models/__init__.py,sha256=Ff1usNXo7_GF33G7TXsJeePhAdu0Xgr0cftPni37c4s,108988
|
|
155
155
|
lightning_sdk/lightning_cloud/openapi/models/affiliatelinks_id_body.py,sha256=X087AkCafKp2g8E2MR5ghU3pxCNNcoehZJttvuVfdC8,4274
|
|
156
156
|
lightning_sdk/lightning_cloud/openapi/models/agentmanagedendpoints_id_body.py,sha256=5HIzKC2DGqxIJIdZbs6KGh9pnBe9ik8FyxlXGUSc1HQ,10233
|
|
157
157
|
lightning_sdk/lightning_cloud/openapi/models/agents_id_body.py,sha256=jKg8Q5cJ3iY9DpDHvig6rgezR_qYYPIAr5Cez2pSifs,22374
|
|
@@ -290,7 +290,8 @@ lightning_sdk/lightning_cloud/openapi/models/project_id_schedules_body.py,sha256
|
|
|
290
290
|
lightning_sdk/lightning_cloud/openapi/models/project_id_secrets_body.py,sha256=jV7ztO03VzSC55pGFNGFsjRZEyIMOXvTIBcu4zNFXg8,4981
|
|
291
291
|
lightning_sdk/lightning_cloud/openapi/models/project_id_snowflake_body.py,sha256=GvWXA_I6HvvCszRlKefxVDk29Mbxk1Ka2VbVCVsbgw8,3840
|
|
292
292
|
lightning_sdk/lightning_cloud/openapi/models/project_id_storage_body.py,sha256=VbfbhZRW9XwXT4sowVt9cWzY67VIscv9Uh14PZ_9eIc,6037
|
|
293
|
-
lightning_sdk/lightning_cloud/openapi/models/
|
|
293
|
+
lightning_sdk/lightning_cloud/openapi/models/project_tab_management_messages.py,sha256=1FtC6UdmLELZ7phmv5kqKEPsUBwwXnheAoAbp4MFWso,3811
|
|
294
|
+
lightning_sdk/lightning_cloud/openapi/models/projects_id_body.py,sha256=S-mizpFoWU9kiB-zbr0GRHXExsWW6xxWAMs7vwvrbEM,26015
|
|
294
295
|
lightning_sdk/lightning_cloud/openapi/models/projects_project_id_body.py,sha256=9KEoSAXY-v0XckFv6K0Kfk12BkoMK1kObPKQS52bjPE,5139
|
|
295
296
|
lightning_sdk/lightning_cloud/openapi/models/protobuf_any.py,sha256=I4a5W5zqZprIP8eTbU-LdYvIj7b2r2B4qPMNIgSCEwk,7143
|
|
296
297
|
lightning_sdk/lightning_cloud/openapi/models/protobuf_null_value.py,sha256=LOQFanGx6mzOYVjlDFd2olKTBfWkhF7vfnHUmZ8lCWI,3063
|
|
@@ -696,7 +697,7 @@ lightning_sdk/lightning_cloud/openapi/models/v1_image_spec.py,sha256=-EtWhl0QjWN
|
|
|
696
697
|
lightning_sdk/lightning_cloud/openapi/models/v1_image_state.py,sha256=CJBTG9zdzN6yPn9dHMIbO5p5EeVFHYv2vw6zWnRJNaA,3157
|
|
697
698
|
lightning_sdk/lightning_cloud/openapi/models/v1_incident_event.py,sha256=kVyFjR_vt6rOPXQF6FypgZFuow1q1hQEEJGp0P7GraQ,16106
|
|
698
699
|
lightning_sdk/lightning_cloud/openapi/models/v1_incident_severity.py,sha256=viNzi7aeD9XwmBiZeAHzZyFz1qc_Y0C0DVN48TsxyKg,3211
|
|
699
|
-
lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py,sha256=
|
|
700
|
+
lightning_sdk/lightning_cloud/openapi/models/v1_incident_type.py,sha256=6G0aM_thfSi5sg3zoqt-oYB0Tgv6SLlnJrOCVvLiR0Y,3319
|
|
700
701
|
lightning_sdk/lightning_cloud/openapi/models/v1_index.py,sha256=xAYTbs8W6J9T6AMXEDdHAK7RrUU1wF2h7V1OIymnNNs,4390
|
|
701
702
|
lightning_sdk/lightning_cloud/openapi/models/v1_input.py,sha256=fdtyBWeSC3knH_bHz8Wlsh9gxXVWIZjqzaekNFyeeV0,5012
|
|
702
703
|
lightning_sdk/lightning_cloud/openapi/models/v1_instance_overprovisioning_spec.py,sha256=4iVO8U1L65qdbgrQN72SLbrt-Ns2Oy6mpTU7YRc-C1g,9026
|
|
@@ -943,7 +944,7 @@ lightning_sdk/lightning_cloud/openapi/models/v1_product_license.py,sha256=XSAezL
|
|
|
943
944
|
lightning_sdk/lightning_cloud/openapi/models/v1_product_license_check_response.py,sha256=YM5WnVoNLg6kxxkNEGOosmfzBWqiS4WyxgOJvOdZTVk,3757
|
|
944
945
|
lightning_sdk/lightning_cloud/openapi/models/v1_profiler_capture.py,sha256=vtZLSdmLUawWwUHgfGwW6-zNgOCN6GOs7rGU99I8Yxk,10312
|
|
945
946
|
lightning_sdk/lightning_cloud/openapi/models/v1_profiler_enabled_response.py,sha256=z-5iw130qv54DZFTAXE4t9VeMsME_2aoKC1zXi4koQA,3757
|
|
946
|
-
lightning_sdk/lightning_cloud/openapi/models/v1_project.py,sha256=
|
|
947
|
+
lightning_sdk/lightning_cloud/openapi/models/v1_project.py,sha256=KmR2KrIOSYU3zs2WItVLBww06V-1K0cGegU9ApecQSg,19229
|
|
947
948
|
lightning_sdk/lightning_cloud/openapi/models/v1_project_artifact.py,sha256=jMg7BHIX29bYQUK5VPHS7OXJlsZ8RvdIE9trNH5YXHU,6642
|
|
948
949
|
lightning_sdk/lightning_cloud/openapi/models/v1_project_cluster_binding.py,sha256=jv2wkiEm5u2VhpTeRcd27dur5wnyt1QTb1ae0tzSfwg,10335
|
|
949
950
|
lightning_sdk/lightning_cloud/openapi/models/v1_project_compute_daily_usage.py,sha256=92qqkHCx9gfZCg7FGVn7TDMQjuHw5E0POtLC7HoQ9pE,6565
|
|
@@ -953,6 +954,7 @@ lightning_sdk/lightning_cloud/openapi/models/v1_project_membership_invite.py,sha
|
|
|
953
954
|
lightning_sdk/lightning_cloud/openapi/models/v1_project_membership_role_binding.py,sha256=pS5454riAOUNeB7B3Y8ChEj9RJQYaroelZuJQs8w2yM,7727
|
|
954
955
|
lightning_sdk/lightning_cloud/openapi/models/v1_project_settings.py,sha256=-clOSaYx-h_m_kumy7ezagqiOwSywS6h2unZZD0rDOE,24012
|
|
955
956
|
lightning_sdk/lightning_cloud/openapi/models/v1_project_storage.py,sha256=u3crPf64VU2hxYqTsyR1OV5s3VgJghzdfftC5WhpZx4,17470
|
|
957
|
+
lightning_sdk/lightning_cloud/openapi/models/v1_project_tab.py,sha256=9cAsBIsmu-Pj2eLfujSLGipRGVXIioAnBwEKTZUJw7s,4287
|
|
956
958
|
lightning_sdk/lightning_cloud/openapi/models/v1_prompt_suggestion.py,sha256=e6oennqdamYVWCVMyagRp3ma2oEJjrG5YSPl9A5WqMY,4326
|
|
957
959
|
lightning_sdk/lightning_cloud/openapi/models/v1_publish_cloud_space_response.py,sha256=5-M8nxZXcc949C6CwFw9pkV2RXcvFO3C3ocK_0YGPLQ,3052
|
|
958
960
|
lightning_sdk/lightning_cloud/openapi/models/v1_published_cloud_space_response.py,sha256=1z3MjGRAyUMWaQOAy73fh3YLxm_XDqKf3CYhqC19HtQ,22692
|
|
@@ -1085,6 +1087,7 @@ lightning_sdk/lightning_cloud/openapi/models/v1_update_metrics_stream_visibility
|
|
|
1085
1087
|
lightning_sdk/lightning_cloud/openapi/models/v1_update_model_visibility_response.py,sha256=y9piacBOLGt-OlLcYjFEyqRzPdqaHSI1tXxZfxwQlqE,3973
|
|
1086
1088
|
lightning_sdk/lightning_cloud/openapi/models/v1_update_organization_credits_auto_replenish_response.py,sha256=Ad-xyR_4qwYTzrqhYMA1ToU3vE7zWTKt0ny5mmTTIiA,3178
|
|
1087
1089
|
lightning_sdk/lightning_cloud/openapi/models/v1_update_project_cluster_accelerators_response.py,sha256=9NujcwHJzLFuj66q_AZVdyyZrFiy7_5pwOx89eFdS_U,3142
|
|
1090
|
+
lightning_sdk/lightning_cloud/openapi/models/v1_update_project_tab_order_response.py,sha256=3HkdhezPxsAQWqao5WF69sUHfqqQAV_tsNjhlFoPcHA,3841
|
|
1088
1091
|
lightning_sdk/lightning_cloud/openapi/models/v1_update_shared_metrics_stream_response.py,sha256=mQaPeGjhJ6EohqmF9MFqRR1NKqvznWmvzBAXgMKlW98,3100
|
|
1089
1092
|
lightning_sdk/lightning_cloud/openapi/models/v1_update_snowflake_query_response.py,sha256=NzTD_--qCS5GsJTcnYO2UNRlaQfJyJxB2BApVNGHoEk,3070
|
|
1090
1093
|
lightning_sdk/lightning_cloud/openapi/models/v1_update_user_credits_auto_replenish_response.py,sha256=fx6-ivkHzIT5wBhN63v9-1QKaJjms1KyL4HbvAzmF50,3130
|
|
@@ -1149,7 +1152,7 @@ lightning_sdk/lightning_cloud/utils/dataset.py,sha256=4nUspe8iAaRPgSYpXA2uAQCgyd
|
|
|
1149
1152
|
lightning_sdk/lightning_cloud/utils/name_generator.py,sha256=MkciuA10332V0mcE2PxLIiwWomWE0Fm_gNGK01vwRr4,58046
|
|
1150
1153
|
lightning_sdk/lightning_cloud/utils/network.py,sha256=axPgl8rhyPcPjxiztDxyksfxax3VNg2OXL5F5Uc81b4,406
|
|
1151
1154
|
lightning_sdk/llm/__init__.py,sha256=ErZva0HqN2iPtK_6hI6GN7A_HPGNrHo3wYh7vyFdO3Q,57
|
|
1152
|
-
lightning_sdk/llm/llm.py,sha256=
|
|
1155
|
+
lightning_sdk/llm/llm.py,sha256=M2gKP77SDz05flUpvnqh6vLXLdNwNzPn2jzXTIls7S0,20805
|
|
1153
1156
|
lightning_sdk/llm/public_assistants.py,sha256=k0yc41AyrKImnRa8Fv-ow9javnlrRQeP63507p2VybA,1579
|
|
1154
1157
|
lightning_sdk/mmt/__init__.py,sha256=ExMu90-96bGBnyp5h0CErQszUGB1-PcjC4-R8_NYbeY,117
|
|
1155
1158
|
lightning_sdk/mmt/base.py,sha256=iqVudKDxazomuezj6l7pa-m9I1EQnM82OKs4ZQbo4Ck,16434
|
|
@@ -1174,9 +1177,9 @@ lightning_sdk/utils/enum.py,sha256=h2JRzqoBcSlUdanFHmkj_j5DleBHAu1esQYUsdNI-hU,4
|
|
|
1174
1177
|
lightning_sdk/utils/names.py,sha256=1EuXbIh7wldkDp1FG10oz9vIOyWrpGWeFFVy-DQBgzA,18162
|
|
1175
1178
|
lightning_sdk/utils/progress.py,sha256=IXfEcUF-rL5jIw0Hir6eSxN7VBZfR--1O2LaEhGAU70,12698
|
|
1176
1179
|
lightning_sdk/utils/resolve.py,sha256=4TyEnIgIrvkSvYk5i5PmcIogD_5Y9pBhiphRLfLMttc,10477
|
|
1177
|
-
lightning_sdk-2025.9.
|
|
1178
|
-
lightning_sdk-2025.9.
|
|
1179
|
-
lightning_sdk-2025.9.
|
|
1180
|
-
lightning_sdk-2025.9.
|
|
1181
|
-
lightning_sdk-2025.9.
|
|
1182
|
-
lightning_sdk-2025.9.
|
|
1180
|
+
lightning_sdk-2025.9.11.dist-info/LICENSE,sha256=uFIuZwj5z-4TeF2UuacPZ1o17HkvKObT8fY50qN84sg,1064
|
|
1181
|
+
lightning_sdk-2025.9.11.dist-info/METADATA,sha256=qmaN-yNF1oQ04YxqFC1BOQJ8sdFTT8EjzzwqRihys3Q,4130
|
|
1182
|
+
lightning_sdk-2025.9.11.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
|
|
1183
|
+
lightning_sdk-2025.9.11.dist-info/entry_points.txt,sha256=OoZa4Fc8NMs6GSN0cdA1J8e6couzAcL82CbM1yo4f_M,122
|
|
1184
|
+
lightning_sdk-2025.9.11.dist-info/top_level.txt,sha256=ps8doKILFXmN7F1mHncShmnQoTxKBRPIcchC8TpoBw4,19
|
|
1185
|
+
lightning_sdk-2025.9.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|