lightning-sdk 0.1.35__py3-none-any.whl → 0.1.36__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 +10 -5
- lightning_sdk/api/ai_hub_api.py +49 -19
- lightning_sdk/api/utils.py +1 -0
- lightning_sdk/lightning_cloud/cli/__main__.py +15 -13
- lightning_sdk/lightning_cloud/openapi/api/cloud_space_service_api.py +5 -1
- lightning_sdk/lightning_cloud/openapi/models/agents_id_body.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/cloud_space_id_versionpublications_body1.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/externalv1_cloud_space_instance_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_assistant.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_release.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_state.py +1 -0
- lightning_sdk/lightning_cloud/openapi/models/v1_deployment_status.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_model_files_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_get_user_response.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_magic_link_login_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_metric_value.py +1 -27
- lightning_sdk/lightning_cloud/openapi/models/v1_metrics.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_update_user_request.py +27 -1
- lightning_sdk/lightning_cloud/openapi/models/v1_user_features.py +27 -1
- lightning_sdk/lightning_cloud/rest_client.py +1 -4
- lightning_sdk/lightning_cloud/source_code/tar.py +1 -3
- {lightning_sdk-0.1.35.dist-info → lightning_sdk-0.1.36.dist-info}/METADATA +1 -2
- {lightning_sdk-0.1.35.dist-info → lightning_sdk-0.1.36.dist-info}/RECORD +28 -28
- {lightning_sdk-0.1.35.dist-info → lightning_sdk-0.1.36.dist-info}/LICENSE +0 -0
- {lightning_sdk-0.1.35.dist-info → lightning_sdk-0.1.36.dist-info}/WHEEL +0 -0
- {lightning_sdk-0.1.35.dist-info → lightning_sdk-0.1.36.dist-info}/entry_points.txt +0 -0
- {lightning_sdk-0.1.35.dist-info → lightning_sdk-0.1.36.dist-info}/top_level.txt +0 -0
lightning_sdk/__init__.py
CHANGED
lightning_sdk/ai_hub.py
CHANGED
|
@@ -127,14 +127,18 @@ class AIHub:
|
|
|
127
127
|
name: Optional[str] = None,
|
|
128
128
|
teamspace: Optional[Union[str, "Teamspace"]] = None,
|
|
129
129
|
org: Optional[Union[str, "Organization"]] = None,
|
|
130
|
-
|
|
130
|
+
api_arguments: Optional[Dict[str, Any]] = None,
|
|
131
131
|
) -> Dict[str, Union[str, bool]]:
|
|
132
132
|
"""Deploy an API from the AI Hub.
|
|
133
133
|
|
|
134
134
|
Example:
|
|
135
135
|
from lightning_sdk import AIHub
|
|
136
|
-
|
|
137
|
-
deployment =
|
|
136
|
+
hub = AIHub()
|
|
137
|
+
deployment = hub.deploy("temp_01jc37n6qpqkdptjpyep0z06hy")
|
|
138
|
+
|
|
139
|
+
# Using API arguments
|
|
140
|
+
api_arugments = {"batch_size" 10, "batch_timeout": 0.001, "env_token": "lit_xxxx"}
|
|
141
|
+
deployment = hub.deploy("temp_01jc37n6qpqkdptjpyep0z06hy", api_arugments=api_arugments)
|
|
138
142
|
|
|
139
143
|
Args:
|
|
140
144
|
api_id: The ID of the API you want to deploy.
|
|
@@ -142,7 +146,7 @@ class AIHub:
|
|
|
142
146
|
name: Name for the deployed API. Defaults to None.
|
|
143
147
|
teamspace: The team or group for deployment. Defaults to None.
|
|
144
148
|
org: The organization for deployment. Defaults to None.
|
|
145
|
-
|
|
149
|
+
api_arguments: Additional API argument, such as model name, or batch size.
|
|
146
150
|
|
|
147
151
|
Returns:
|
|
148
152
|
A dictionary containing the name of the deployed API,
|
|
@@ -155,8 +159,9 @@ class AIHub:
|
|
|
155
159
|
teamspace = self._authenticate(teamspace, org)
|
|
156
160
|
teamspace_id = teamspace.id
|
|
157
161
|
|
|
162
|
+
api_arguments = api_arguments or {}
|
|
158
163
|
deployment = self._api.deploy_api(
|
|
159
|
-
template_id=api_id, cluster_id=cluster, project_id=teamspace_id, name=name,
|
|
164
|
+
template_id=api_id, cluster_id=cluster, project_id=teamspace_id, name=name, api_arguments=api_arguments
|
|
160
165
|
)
|
|
161
166
|
url = quote(f"{LIGHTNING_CLOUD_URL}/{teamspace._org.name}/{teamspace.name}/jobs/{deployment.name}", safe=":/()")
|
|
162
167
|
print("Deployment available at:", url)
|
lightning_sdk/api/ai_hub_api.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import re
|
|
2
1
|
import traceback
|
|
3
|
-
from typing import List, Optional
|
|
2
|
+
from typing import Dict, List, Optional
|
|
4
3
|
|
|
5
4
|
import backoff
|
|
6
5
|
|
|
@@ -8,7 +7,10 @@ from lightning_sdk.lightning_cloud.openapi.models import (
|
|
|
8
7
|
CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs,
|
|
9
8
|
V1Deployment,
|
|
10
9
|
V1DeploymentTemplate,
|
|
11
|
-
|
|
10
|
+
V1DeploymentTemplateParameter,
|
|
11
|
+
V1DeploymentTemplateParameterPlacement,
|
|
12
|
+
V1DeploymentTemplateParameterType,
|
|
13
|
+
V1JobSpec,
|
|
12
14
|
)
|
|
13
15
|
from lightning_sdk.lightning_cloud.openapi.models.v1_deployment_template_gallery_response import (
|
|
14
16
|
V1DeploymentTemplateGalleryResponse,
|
|
@@ -37,31 +39,59 @@ class AIHubApi:
|
|
|
37
39
|
).templates
|
|
38
40
|
|
|
39
41
|
@staticmethod
|
|
40
|
-
def
|
|
41
|
-
|
|
42
|
+
def _update_parameters(
|
|
43
|
+
job: V1JobSpec, placements: List[V1DeploymentTemplateParameterPlacement], pattern: str, value: str
|
|
44
|
+
) -> None:
|
|
45
|
+
for placement in placements:
|
|
46
|
+
if placement == V1DeploymentTemplateParameterPlacement.COMMAND:
|
|
47
|
+
job.command = job.command.replace(pattern, str(value))
|
|
48
|
+
if placement == V1DeploymentTemplateParameterPlacement.ENTRYPOINT:
|
|
49
|
+
job.entrypoint = job.entrypoint.replace(pattern, str(value))
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
arguments = {}
|
|
48
|
-
for key in keys:
|
|
49
|
-
if key in kwargs:
|
|
50
|
-
arguments[key] = kwargs[key]
|
|
51
|
-
return [f"--{k} {v}" for k, v in arguments.items()]
|
|
51
|
+
if placement == V1DeploymentTemplateParameterPlacement.ENV:
|
|
52
|
+
for e in job.env:
|
|
53
|
+
if e.value == pattern:
|
|
54
|
+
e.value = str(value)
|
|
52
55
|
|
|
53
56
|
@staticmethod
|
|
54
|
-
def
|
|
55
|
-
|
|
57
|
+
def _set_parameters(
|
|
58
|
+
job: V1JobSpec, parameters: List[V1DeploymentTemplateParameter], api_arguments: Dict[str, str]
|
|
59
|
+
) -> V1JobSpec:
|
|
60
|
+
for p in parameters:
|
|
61
|
+
if p.name not in api_arguments:
|
|
62
|
+
if p.type == V1DeploymentTemplateParameterType.INPUT and p.input and p.input.default_value:
|
|
63
|
+
api_arguments[p.name] = p.input.default_value
|
|
64
|
+
|
|
65
|
+
if p.type == V1DeploymentTemplateParameterType.SELECT and p.select and len(p.select.options) > 0:
|
|
66
|
+
api_arguments[p.name] = p.select.options[0]
|
|
67
|
+
|
|
68
|
+
if p.type == V1DeploymentTemplateParameterType.CHECKBOX and p.checkbox:
|
|
69
|
+
api_arguments[p.name] = (
|
|
70
|
+
(p.checkbox.true_value or "True")
|
|
71
|
+
if p.checkbox.is_checked
|
|
72
|
+
else (p.checkbox.false_value or "False")
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
for p in parameters:
|
|
76
|
+
name = p.name
|
|
77
|
+
pattern = f"${{{name}}}"
|
|
78
|
+
if name in api_arguments:
|
|
79
|
+
AIHubApi._update_parameters(job, p.placements, pattern, api_arguments[name])
|
|
80
|
+
elif not p.required:
|
|
81
|
+
AIHubApi._update_parameters(job, p.placements, pattern, "")
|
|
82
|
+
else:
|
|
83
|
+
raise ValueError(f"API reqires argument '{p.name}' but is not provided with api_arguments.")
|
|
84
|
+
|
|
85
|
+
return job
|
|
56
86
|
|
|
57
87
|
def deploy_api(
|
|
58
|
-
self, template_id: str, project_id: str, cluster_id: str, name: Optional[str],
|
|
88
|
+
self, template_id: str, project_id: str, cluster_id: str, name: Optional[str], api_arguments: Dict[str, str]
|
|
59
89
|
) -> V1Deployment:
|
|
60
90
|
template = self._client.deployment_templates_service_get_deployment_template(template_id)
|
|
61
91
|
name = name or template.name
|
|
62
92
|
template.spec_v2.endpoint.id = None
|
|
63
|
-
|
|
64
|
-
template.spec_v2.job.
|
|
93
|
+
|
|
94
|
+
AIHubApi._set_parameters(template.spec_v2.job, template.parameter_spec.parameters, api_arguments)
|
|
65
95
|
return self._client.jobs_service_create_deployment(
|
|
66
96
|
project_id=project_id,
|
|
67
97
|
body=CreateDeploymentRequestDefinesASpecForTheJobThatAllowsForAutoscalingJobs(
|
lightning_sdk/api/utils.py
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import click
|
|
2
1
|
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
def main():
|
|
6
|
-
pass
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
@main.command()
|
|
10
|
-
def login():
|
|
3
|
+
def login() -> None:
|
|
11
4
|
"""Authorize the CLI to access Grid AI resources for a particular user.
|
|
12
|
-
|
|
13
|
-
a web browser will open to complete the authentication.
|
|
5
|
+
|
|
6
|
+
Use login command to force authenticate, a web browser will open to complete the authentication.
|
|
14
7
|
"""
|
|
15
8
|
from lightning_sdk.lightning_cloud.login import Auth # local to avoid circular import
|
|
16
9
|
|
|
@@ -18,10 +11,19 @@ def login():
|
|
|
18
11
|
auth.clear()
|
|
19
12
|
auth._run_server()
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
@main.command()
|
|
23
|
-
def logout():
|
|
14
|
+
def logout() -> None:
|
|
24
15
|
"""Logout from LightningCloud"""
|
|
25
16
|
from lightning_sdk.lightning_cloud.login import Auth # local to avoid circular import
|
|
26
17
|
|
|
27
18
|
Auth.clear()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def main() -> None:
|
|
22
|
+
"""CLI entrypoint."""
|
|
23
|
+
from fire import Fire
|
|
24
|
+
|
|
25
|
+
Fire({"login": login, "logout": logout})
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
if __name__ == "__main__":
|
|
29
|
+
main()
|
|
@@ -1753,6 +1753,7 @@ class CloudSpaceServiceApi(object):
|
|
|
1753
1753
|
:param str project_id: (required)
|
|
1754
1754
|
:param str cloud_space_id: (required)
|
|
1755
1755
|
:param str org_id:
|
|
1756
|
+
:param str cloud_space_version_id:
|
|
1756
1757
|
:return: V1DeleteCloudSpaceVersionPublicationResponse
|
|
1757
1758
|
If the method is called asynchronously,
|
|
1758
1759
|
returns the request thread.
|
|
@@ -1776,12 +1777,13 @@ class CloudSpaceServiceApi(object):
|
|
|
1776
1777
|
:param str project_id: (required)
|
|
1777
1778
|
:param str cloud_space_id: (required)
|
|
1778
1779
|
:param str org_id:
|
|
1780
|
+
:param str cloud_space_version_id:
|
|
1779
1781
|
:return: V1DeleteCloudSpaceVersionPublicationResponse
|
|
1780
1782
|
If the method is called asynchronously,
|
|
1781
1783
|
returns the request thread.
|
|
1782
1784
|
"""
|
|
1783
1785
|
|
|
1784
|
-
all_params = ['project_id', 'cloud_space_id', 'org_id'] # noqa: E501
|
|
1786
|
+
all_params = ['project_id', 'cloud_space_id', 'org_id', 'cloud_space_version_id'] # noqa: E501
|
|
1785
1787
|
all_params.append('async_req')
|
|
1786
1788
|
all_params.append('_return_http_data_only')
|
|
1787
1789
|
all_params.append('_preload_content')
|
|
@@ -1816,6 +1818,8 @@ class CloudSpaceServiceApi(object):
|
|
|
1816
1818
|
query_params = []
|
|
1817
1819
|
if 'org_id' in params:
|
|
1818
1820
|
query_params.append(('orgId', params['org_id'])) # noqa: E501
|
|
1821
|
+
if 'cloud_space_version_id' in params:
|
|
1822
|
+
query_params.append(('cloudSpaceVersionId', params['cloud_space_version_id'])) # noqa: E501
|
|
1819
1823
|
|
|
1820
1824
|
header_params = {}
|
|
1821
1825
|
|
|
@@ -52,6 +52,7 @@ class AgentsIdBody(object):
|
|
|
52
52
|
'knowledge': 'str',
|
|
53
53
|
'knowledge_configuration': 'V1KnowledgeConfiguration',
|
|
54
54
|
'model': 'str',
|
|
55
|
+
'model_provider': 'str',
|
|
55
56
|
'name': 'str',
|
|
56
57
|
'org_id': 'str',
|
|
57
58
|
'prompt_suggestions': 'list[V1PromptSuggestion]',
|
|
@@ -75,6 +76,7 @@ class AgentsIdBody(object):
|
|
|
75
76
|
'knowledge': 'knowledge',
|
|
76
77
|
'knowledge_configuration': 'knowledgeConfiguration',
|
|
77
78
|
'model': 'model',
|
|
79
|
+
'model_provider': 'modelProvider',
|
|
78
80
|
'name': 'name',
|
|
79
81
|
'org_id': 'orgId',
|
|
80
82
|
'prompt_suggestions': 'promptSuggestions',
|
|
@@ -86,7 +88,7 @@ class AgentsIdBody(object):
|
|
|
86
88
|
'user_id': 'userId'
|
|
87
89
|
}
|
|
88
90
|
|
|
89
|
-
def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, description: 'str' =None, endpoint_id: 'str' =None, expected_cold_start_time: 'str' =None, file_uploads_enabled: 'bool' =None, internal_assistant_name: 'str' =None, knowledge: 'str' =None, knowledge_configuration: 'V1KnowledgeConfiguration' =None, model: 'str' =None, name: 'str' =None, org_id: 'str' =None, prompt_suggestions: 'list[V1PromptSuggestion]' =None, prompt_template: 'str' =None, publish_status: 'str' =None, status: 'V1AssistantModelStatus' =None, thumbnail_url: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
|
|
91
|
+
def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, description: 'str' =None, endpoint_id: 'str' =None, expected_cold_start_time: 'str' =None, file_uploads_enabled: 'bool' =None, internal_assistant_name: 'str' =None, knowledge: 'str' =None, knowledge_configuration: 'V1KnowledgeConfiguration' =None, model: 'str' =None, model_provider: 'str' =None, name: 'str' =None, org_id: 'str' =None, prompt_suggestions: 'list[V1PromptSuggestion]' =None, prompt_template: 'str' =None, publish_status: 'str' =None, status: 'V1AssistantModelStatus' =None, thumbnail_url: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
|
|
90
92
|
"""AgentsIdBody - a model defined in Swagger""" # noqa: E501
|
|
91
93
|
self._cloudspace_id = None
|
|
92
94
|
self._cluster_id = None
|
|
@@ -99,6 +101,7 @@ class AgentsIdBody(object):
|
|
|
99
101
|
self._knowledge = None
|
|
100
102
|
self._knowledge_configuration = None
|
|
101
103
|
self._model = None
|
|
104
|
+
self._model_provider = None
|
|
102
105
|
self._name = None
|
|
103
106
|
self._org_id = None
|
|
104
107
|
self._prompt_suggestions = None
|
|
@@ -131,6 +134,8 @@ class AgentsIdBody(object):
|
|
|
131
134
|
self.knowledge_configuration = knowledge_configuration
|
|
132
135
|
if model is not None:
|
|
133
136
|
self.model = model
|
|
137
|
+
if model_provider is not None:
|
|
138
|
+
self.model_provider = model_provider
|
|
134
139
|
if name is not None:
|
|
135
140
|
self.name = name
|
|
136
141
|
if org_id is not None:
|
|
@@ -381,6 +386,27 @@ class AgentsIdBody(object):
|
|
|
381
386
|
|
|
382
387
|
self._model = model
|
|
383
388
|
|
|
389
|
+
@property
|
|
390
|
+
def model_provider(self) -> 'str':
|
|
391
|
+
"""Gets the model_provider of this AgentsIdBody. # noqa: E501
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
:return: The model_provider of this AgentsIdBody. # noqa: E501
|
|
395
|
+
:rtype: str
|
|
396
|
+
"""
|
|
397
|
+
return self._model_provider
|
|
398
|
+
|
|
399
|
+
@model_provider.setter
|
|
400
|
+
def model_provider(self, model_provider: 'str'):
|
|
401
|
+
"""Sets the model_provider of this AgentsIdBody.
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
:param model_provider: The model_provider of this AgentsIdBody. # noqa: E501
|
|
405
|
+
:type: str
|
|
406
|
+
"""
|
|
407
|
+
|
|
408
|
+
self._model_provider = model_provider
|
|
409
|
+
|
|
384
410
|
@property
|
|
385
411
|
def name(self) -> 'str':
|
|
386
412
|
"""Gets the name of this AgentsIdBody. # noqa: E501
|
|
@@ -42,21 +42,26 @@ class CloudSpaceIdVersionpublicationsBody1(object):
|
|
|
42
42
|
"""
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'cloud_space_version_id': 'str',
|
|
45
|
+
'featured': 'bool',
|
|
45
46
|
'org_id': 'str'
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
attribute_map = {
|
|
49
50
|
'cloud_space_version_id': 'cloudSpaceVersionId',
|
|
51
|
+
'featured': 'featured',
|
|
50
52
|
'org_id': 'orgId'
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
def __init__(self, cloud_space_version_id: 'str' =None, org_id: 'str' =None): # noqa: E501
|
|
55
|
+
def __init__(self, cloud_space_version_id: 'str' =None, featured: 'bool' =None, org_id: 'str' =None): # noqa: E501
|
|
54
56
|
"""CloudSpaceIdVersionpublicationsBody1 - a model defined in Swagger""" # noqa: E501
|
|
55
57
|
self._cloud_space_version_id = None
|
|
58
|
+
self._featured = None
|
|
56
59
|
self._org_id = None
|
|
57
60
|
self.discriminator = None
|
|
58
61
|
if cloud_space_version_id is not None:
|
|
59
62
|
self.cloud_space_version_id = cloud_space_version_id
|
|
63
|
+
if featured is not None:
|
|
64
|
+
self.featured = featured
|
|
60
65
|
if org_id is not None:
|
|
61
66
|
self.org_id = org_id
|
|
62
67
|
|
|
@@ -81,6 +86,27 @@ class CloudSpaceIdVersionpublicationsBody1(object):
|
|
|
81
86
|
|
|
82
87
|
self._cloud_space_version_id = cloud_space_version_id
|
|
83
88
|
|
|
89
|
+
@property
|
|
90
|
+
def featured(self) -> 'bool':
|
|
91
|
+
"""Gets the featured of this CloudSpaceIdVersionpublicationsBody1. # noqa: E501
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
:return: The featured of this CloudSpaceIdVersionpublicationsBody1. # noqa: E501
|
|
95
|
+
:rtype: bool
|
|
96
|
+
"""
|
|
97
|
+
return self._featured
|
|
98
|
+
|
|
99
|
+
@featured.setter
|
|
100
|
+
def featured(self, featured: 'bool'):
|
|
101
|
+
"""Sets the featured of this CloudSpaceIdVersionpublicationsBody1.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
:param featured: The featured of this CloudSpaceIdVersionpublicationsBody1. # noqa: E501
|
|
105
|
+
:type: bool
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
self._featured = featured
|
|
109
|
+
|
|
84
110
|
@property
|
|
85
111
|
def org_id(self) -> 'str':
|
|
86
112
|
"""Gets the org_id of this CloudSpaceIdVersionpublicationsBody1. # noqa: E501
|
|
@@ -54,6 +54,7 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
54
54
|
'instance_url': 'str',
|
|
55
55
|
'jupyterlab_url': 'str',
|
|
56
56
|
'phase': 'V1CloudSpaceInstanceState',
|
|
57
|
+
'price': 'float',
|
|
57
58
|
'ssh_host': 'str',
|
|
58
59
|
'ssh_port': 'int',
|
|
59
60
|
'ssh_username': 'str',
|
|
@@ -84,6 +85,7 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
84
85
|
'instance_url': 'instanceUrl',
|
|
85
86
|
'jupyterlab_url': 'jupyterlabUrl',
|
|
86
87
|
'phase': 'phase',
|
|
88
|
+
'price': 'price',
|
|
87
89
|
'ssh_host': 'sshHost',
|
|
88
90
|
'ssh_port': 'sshPort',
|
|
89
91
|
'ssh_username': 'sshUsername',
|
|
@@ -100,7 +102,7 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
100
102
|
'vscode_url': 'vscodeUrl'
|
|
101
103
|
}
|
|
102
104
|
|
|
103
|
-
def __init__(self, app_url: 'str' =None, cloud_space_id: 'str' =None, cloud_space_instance_id: 'str' =None, compute_config: 'V1UserRequestedComputeConfig' =None, creation_timestamp: 'datetime' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, free: 'bool' =None, ide: 'str' =None, instance_id: 'str' =None, instance_region: 'str' =None, instance_url: 'str' =None, jupyterlab_url: 'str' =None, phase: 'V1CloudSpaceInstanceState' =None, ssh_host: 'str' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, start_timestamp: 'datetime' =None, startup_eta_seconds: 'str' =None, startup_percentage: 'str' =None, startup_phase: 'str' =None, startup_status: 'V1CloudSpaceInstanceStartupStatus' =None, status_message: 'str' =None, switched_at: 'datetime' =None, sync_eta_seconds: 'str' =None, sync_in_progress: 'bool' =None, sync_percentage: 'str' =None, vscode_url: 'str' =None): # noqa: E501
|
|
105
|
+
def __init__(self, app_url: 'str' =None, cloud_space_id: 'str' =None, cloud_space_instance_id: 'str' =None, compute_config: 'V1UserRequestedComputeConfig' =None, creation_timestamp: 'datetime' =None, data_connection_mounts: 'list[V1DataConnectionMount]' =None, free: 'bool' =None, ide: 'str' =None, instance_id: 'str' =None, instance_region: 'str' =None, instance_url: 'str' =None, jupyterlab_url: 'str' =None, phase: 'V1CloudSpaceInstanceState' =None, price: 'float' =None, ssh_host: 'str' =None, ssh_port: 'int' =None, ssh_username: 'str' =None, start_timestamp: 'datetime' =None, startup_eta_seconds: 'str' =None, startup_percentage: 'str' =None, startup_phase: 'str' =None, startup_status: 'V1CloudSpaceInstanceStartupStatus' =None, status_message: 'str' =None, switched_at: 'datetime' =None, sync_eta_seconds: 'str' =None, sync_in_progress: 'bool' =None, sync_percentage: 'str' =None, vscode_url: 'str' =None): # noqa: E501
|
|
104
106
|
"""Externalv1CloudSpaceInstanceStatus - a model defined in Swagger""" # noqa: E501
|
|
105
107
|
self._app_url = None
|
|
106
108
|
self._cloud_space_id = None
|
|
@@ -115,6 +117,7 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
115
117
|
self._instance_url = None
|
|
116
118
|
self._jupyterlab_url = None
|
|
117
119
|
self._phase = None
|
|
120
|
+
self._price = None
|
|
118
121
|
self._ssh_host = None
|
|
119
122
|
self._ssh_port = None
|
|
120
123
|
self._ssh_username = None
|
|
@@ -156,6 +159,8 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
156
159
|
self.jupyterlab_url = jupyterlab_url
|
|
157
160
|
if phase is not None:
|
|
158
161
|
self.phase = phase
|
|
162
|
+
if price is not None:
|
|
163
|
+
self.price = price
|
|
159
164
|
if ssh_host is not None:
|
|
160
165
|
self.ssh_host = ssh_host
|
|
161
166
|
if ssh_port is not None:
|
|
@@ -458,6 +463,27 @@ class Externalv1CloudSpaceInstanceStatus(object):
|
|
|
458
463
|
|
|
459
464
|
self._phase = phase
|
|
460
465
|
|
|
466
|
+
@property
|
|
467
|
+
def price(self) -> 'float':
|
|
468
|
+
"""Gets the price of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
:return: The price of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
472
|
+
:rtype: float
|
|
473
|
+
"""
|
|
474
|
+
return self._price
|
|
475
|
+
|
|
476
|
+
@price.setter
|
|
477
|
+
def price(self, price: 'float'):
|
|
478
|
+
"""Sets the price of this Externalv1CloudSpaceInstanceStatus.
|
|
479
|
+
|
|
480
|
+
|
|
481
|
+
:param price: The price of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
482
|
+
:type: float
|
|
483
|
+
"""
|
|
484
|
+
|
|
485
|
+
self._price = price
|
|
486
|
+
|
|
461
487
|
@property
|
|
462
488
|
def ssh_host(self) -> 'str':
|
|
463
489
|
"""Gets the ssh_host of this Externalv1CloudSpaceInstanceStatus. # noqa: E501
|
|
@@ -53,6 +53,7 @@ class V1Assistant(object):
|
|
|
53
53
|
'knowledge': 'str',
|
|
54
54
|
'knowledge_configuration': 'V1KnowledgeConfiguration',
|
|
55
55
|
'model': 'str',
|
|
56
|
+
'model_provider': 'str',
|
|
56
57
|
'name': 'str',
|
|
57
58
|
'org_id': 'str',
|
|
58
59
|
'project_id': 'str',
|
|
@@ -78,6 +79,7 @@ class V1Assistant(object):
|
|
|
78
79
|
'knowledge': 'knowledge',
|
|
79
80
|
'knowledge_configuration': 'knowledgeConfiguration',
|
|
80
81
|
'model': 'model',
|
|
82
|
+
'model_provider': 'modelProvider',
|
|
81
83
|
'name': 'name',
|
|
82
84
|
'org_id': 'orgId',
|
|
83
85
|
'project_id': 'projectId',
|
|
@@ -90,7 +92,7 @@ class V1Assistant(object):
|
|
|
90
92
|
'user_id': 'userId'
|
|
91
93
|
}
|
|
92
94
|
|
|
93
|
-
def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, description: 'str' =None, endpoint_id: 'str' =None, expected_cold_start_time: 'str' =None, file_uploads_enabled: 'bool' =None, id: 'str' =None, internal_assistant_name: 'str' =None, knowledge: 'str' =None, knowledge_configuration: 'V1KnowledgeConfiguration' =None, model: 'str' =None, name: 'str' =None, org_id: 'str' =None, project_id: 'str' =None, prompt_suggestions: 'list[V1PromptSuggestion]' =None, prompt_template: 'str' =None, publish_status: 'str' =None, status: 'V1AssistantModelStatus' =None, thumbnail_url: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
|
|
95
|
+
def __init__(self, cloudspace_id: 'str' =None, cluster_id: 'str' =None, created_at: 'datetime' =None, description: 'str' =None, endpoint_id: 'str' =None, expected_cold_start_time: 'str' =None, file_uploads_enabled: 'bool' =None, id: 'str' =None, internal_assistant_name: 'str' =None, knowledge: 'str' =None, knowledge_configuration: 'V1KnowledgeConfiguration' =None, model: 'str' =None, model_provider: 'str' =None, name: 'str' =None, org_id: 'str' =None, project_id: 'str' =None, prompt_suggestions: 'list[V1PromptSuggestion]' =None, prompt_template: 'str' =None, publish_status: 'str' =None, status: 'V1AssistantModelStatus' =None, thumbnail_url: 'str' =None, updated_at: 'datetime' =None, user_id: 'str' =None): # noqa: E501
|
|
94
96
|
"""V1Assistant - a model defined in Swagger""" # noqa: E501
|
|
95
97
|
self._cloudspace_id = None
|
|
96
98
|
self._cluster_id = None
|
|
@@ -104,6 +106,7 @@ class V1Assistant(object):
|
|
|
104
106
|
self._knowledge = None
|
|
105
107
|
self._knowledge_configuration = None
|
|
106
108
|
self._model = None
|
|
109
|
+
self._model_provider = None
|
|
107
110
|
self._name = None
|
|
108
111
|
self._org_id = None
|
|
109
112
|
self._project_id = None
|
|
@@ -139,6 +142,8 @@ class V1Assistant(object):
|
|
|
139
142
|
self.knowledge_configuration = knowledge_configuration
|
|
140
143
|
if model is not None:
|
|
141
144
|
self.model = model
|
|
145
|
+
if model_provider is not None:
|
|
146
|
+
self.model_provider = model_provider
|
|
142
147
|
if name is not None:
|
|
143
148
|
self.name = name
|
|
144
149
|
if org_id is not None:
|
|
@@ -412,6 +417,27 @@ class V1Assistant(object):
|
|
|
412
417
|
|
|
413
418
|
self._model = model
|
|
414
419
|
|
|
420
|
+
@property
|
|
421
|
+
def model_provider(self) -> 'str':
|
|
422
|
+
"""Gets the model_provider of this V1Assistant. # noqa: E501
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
:return: The model_provider of this V1Assistant. # noqa: E501
|
|
426
|
+
:rtype: str
|
|
427
|
+
"""
|
|
428
|
+
return self._model_provider
|
|
429
|
+
|
|
430
|
+
@model_provider.setter
|
|
431
|
+
def model_provider(self, model_provider: 'str'):
|
|
432
|
+
"""Sets the model_provider of this V1Assistant.
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
:param model_provider: The model_provider of this V1Assistant. # noqa: E501
|
|
436
|
+
:type: str
|
|
437
|
+
"""
|
|
438
|
+
|
|
439
|
+
self._model_provider = model_provider
|
|
440
|
+
|
|
415
441
|
@property
|
|
416
442
|
def name(self) -> 'str':
|
|
417
443
|
"""Gets the name of this V1Assistant. # noqa: E501
|
|
@@ -43,6 +43,7 @@ class V1DeploymentRelease(object):
|
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'archived': 'bool',
|
|
45
45
|
'created_at': 'datetime',
|
|
46
|
+
'first_job_state': 'str',
|
|
46
47
|
'id': 'str',
|
|
47
48
|
'project_id': 'str',
|
|
48
49
|
'replicas': 'int',
|
|
@@ -54,6 +55,7 @@ class V1DeploymentRelease(object):
|
|
|
54
55
|
attribute_map = {
|
|
55
56
|
'archived': 'archived',
|
|
56
57
|
'created_at': 'createdAt',
|
|
58
|
+
'first_job_state': 'firstJobState',
|
|
57
59
|
'id': 'id',
|
|
58
60
|
'project_id': 'projectId',
|
|
59
61
|
'replicas': 'replicas',
|
|
@@ -62,10 +64,11 @@ class V1DeploymentRelease(object):
|
|
|
62
64
|
'version': 'version'
|
|
63
65
|
}
|
|
64
66
|
|
|
65
|
-
def __init__(self, archived: 'bool' =None, created_at: 'datetime' =None, id: 'str' =None, project_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, user_id: 'str' =None, version: 'int' =None): # noqa: E501
|
|
67
|
+
def __init__(self, archived: 'bool' =None, created_at: 'datetime' =None, first_job_state: 'str' =None, id: 'str' =None, project_id: 'str' =None, replicas: 'int' =None, spec: 'V1JobSpec' =None, user_id: 'str' =None, version: 'int' =None): # noqa: E501
|
|
66
68
|
"""V1DeploymentRelease - a model defined in Swagger""" # noqa: E501
|
|
67
69
|
self._archived = None
|
|
68
70
|
self._created_at = None
|
|
71
|
+
self._first_job_state = None
|
|
69
72
|
self._id = None
|
|
70
73
|
self._project_id = None
|
|
71
74
|
self._replicas = None
|
|
@@ -77,6 +80,8 @@ class V1DeploymentRelease(object):
|
|
|
77
80
|
self.archived = archived
|
|
78
81
|
if created_at is not None:
|
|
79
82
|
self.created_at = created_at
|
|
83
|
+
if first_job_state is not None:
|
|
84
|
+
self.first_job_state = first_job_state
|
|
80
85
|
if id is not None:
|
|
81
86
|
self.id = id
|
|
82
87
|
if project_id is not None:
|
|
@@ -132,6 +137,27 @@ class V1DeploymentRelease(object):
|
|
|
132
137
|
|
|
133
138
|
self._created_at = created_at
|
|
134
139
|
|
|
140
|
+
@property
|
|
141
|
+
def first_job_state(self) -> 'str':
|
|
142
|
+
"""Gets the first_job_state of this V1DeploymentRelease. # noqa: E501
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
:return: The first_job_state of this V1DeploymentRelease. # noqa: E501
|
|
146
|
+
:rtype: str
|
|
147
|
+
"""
|
|
148
|
+
return self._first_job_state
|
|
149
|
+
|
|
150
|
+
@first_job_state.setter
|
|
151
|
+
def first_job_state(self, first_job_state: 'str'):
|
|
152
|
+
"""Sets the first_job_state of this V1DeploymentRelease.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
:param first_job_state: The first_job_state of this V1DeploymentRelease. # noqa: E501
|
|
156
|
+
:type: str
|
|
157
|
+
"""
|
|
158
|
+
|
|
159
|
+
self._first_job_state = first_job_state
|
|
160
|
+
|
|
135
161
|
@property
|
|
136
162
|
def id(self) -> 'str':
|
|
137
163
|
"""Gets the id of this V1DeploymentRelease. # noqa: E501
|
|
@@ -40,6 +40,7 @@ class V1DeploymentState(object):
|
|
|
40
40
|
UNSPECIFIED = "DEPLOYMENT_STATE_UNSPECIFIED"
|
|
41
41
|
RUNNING = "DEPLOYMENT_STATE_RUNNING"
|
|
42
42
|
DELETED = "DEPLOYMENT_STATE_DELETED"
|
|
43
|
+
FAILED = "DEPLOYMENT_STATE_FAILED"
|
|
43
44
|
"""
|
|
44
45
|
Attributes:
|
|
45
46
|
swagger_types (dict): The key is attribute name
|
|
@@ -43,6 +43,7 @@ class V1DeploymentStatus(object):
|
|
|
43
43
|
swagger_types = {
|
|
44
44
|
'deleting_replicas': 'str',
|
|
45
45
|
'failing_replicas': 'str',
|
|
46
|
+
'first_job_state_current_release': 'str',
|
|
46
47
|
'message': 'str',
|
|
47
48
|
'pending_replicas': 'str',
|
|
48
49
|
'ready_replicas': 'str',
|
|
@@ -52,16 +53,18 @@ class V1DeploymentStatus(object):
|
|
|
52
53
|
attribute_map = {
|
|
53
54
|
'deleting_replicas': 'deletingReplicas',
|
|
54
55
|
'failing_replicas': 'failingReplicas',
|
|
56
|
+
'first_job_state_current_release': 'firstJobStateCurrentRelease',
|
|
55
57
|
'message': 'message',
|
|
56
58
|
'pending_replicas': 'pendingReplicas',
|
|
57
59
|
'ready_replicas': 'readyReplicas',
|
|
58
60
|
'urls': 'urls'
|
|
59
61
|
}
|
|
60
62
|
|
|
61
|
-
def __init__(self, deleting_replicas: 'str' =None, failing_replicas: 'str' =None, message: 'str' =None, pending_replicas: 'str' =None, ready_replicas: 'str' =None, urls: 'list[str]' =None): # noqa: E501
|
|
63
|
+
def __init__(self, deleting_replicas: 'str' =None, failing_replicas: 'str' =None, first_job_state_current_release: 'str' =None, message: 'str' =None, pending_replicas: 'str' =None, ready_replicas: 'str' =None, urls: 'list[str]' =None): # noqa: E501
|
|
62
64
|
"""V1DeploymentStatus - a model defined in Swagger""" # noqa: E501
|
|
63
65
|
self._deleting_replicas = None
|
|
64
66
|
self._failing_replicas = None
|
|
67
|
+
self._first_job_state_current_release = None
|
|
65
68
|
self._message = None
|
|
66
69
|
self._pending_replicas = None
|
|
67
70
|
self._ready_replicas = None
|
|
@@ -71,6 +74,8 @@ class V1DeploymentStatus(object):
|
|
|
71
74
|
self.deleting_replicas = deleting_replicas
|
|
72
75
|
if failing_replicas is not None:
|
|
73
76
|
self.failing_replicas = failing_replicas
|
|
77
|
+
if first_job_state_current_release is not None:
|
|
78
|
+
self.first_job_state_current_release = first_job_state_current_release
|
|
74
79
|
if message is not None:
|
|
75
80
|
self.message = message
|
|
76
81
|
if pending_replicas is not None:
|
|
@@ -122,6 +127,27 @@ class V1DeploymentStatus(object):
|
|
|
122
127
|
|
|
123
128
|
self._failing_replicas = failing_replicas
|
|
124
129
|
|
|
130
|
+
@property
|
|
131
|
+
def first_job_state_current_release(self) -> 'str':
|
|
132
|
+
"""Gets the first_job_state_current_release of this V1DeploymentStatus. # noqa: E501
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
:return: The first_job_state_current_release of this V1DeploymentStatus. # noqa: E501
|
|
136
|
+
:rtype: str
|
|
137
|
+
"""
|
|
138
|
+
return self._first_job_state_current_release
|
|
139
|
+
|
|
140
|
+
@first_job_state_current_release.setter
|
|
141
|
+
def first_job_state_current_release(self, first_job_state_current_release: 'str'):
|
|
142
|
+
"""Sets the first_job_state_current_release of this V1DeploymentStatus.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
:param first_job_state_current_release: The first_job_state_current_release of this V1DeploymentStatus. # noqa: E501
|
|
146
|
+
:type: str
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
self._first_job_state_current_release = first_job_state_current_release
|
|
150
|
+
|
|
125
151
|
@property
|
|
126
152
|
def message(self) -> 'str':
|
|
127
153
|
"""Gets the message of this V1DeploymentStatus. # noqa: E501
|