gmicloud 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {gmicloud-0.1.1 → gmicloud-0.1.2}/PKG-INFO +12 -12
  2. {gmicloud-0.1.1 → gmicloud-0.1.2}/README.md +11 -11
  3. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/__init__.py +2 -4
  4. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_client/_http_client.py +0 -1
  5. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_enums.py +2 -0
  6. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_models.py +6 -5
  7. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/client.py +1 -1
  8. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud.egg-info/PKG-INFO +12 -12
  9. {gmicloud-0.1.1 → gmicloud-0.1.2}/pyproject.toml +1 -1
  10. {gmicloud-0.1.1 → gmicloud-0.1.2}/examples/__init__.py +0 -0
  11. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/__init__.py +0 -0
  12. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_client/__init__.py +0 -0
  13. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_client/_artifact_client.py +0 -0
  14. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_client/_decorator.py +0 -0
  15. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_client/_file_upload_client.py +0 -0
  16. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_client/_iam_client.py +0 -0
  17. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_client/_task_client.py +0 -0
  18. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_config.py +0 -0
  19. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_constants.py +0 -0
  20. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_exceptions.py +0 -0
  21. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_manager/__init__.py +0 -0
  22. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_manager/_artifact_manager.py +0 -0
  23. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/_internal/_manager/_task_manager.py +0 -0
  24. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/tests/__init__.py +0 -0
  25. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/tests/test_artifacts.py +0 -0
  26. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/tests/test_tasks.py +0 -0
  27. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud/utils/uninstall_packages.py +0 -0
  28. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud.egg-info/SOURCES.txt +0 -0
  29. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud.egg-info/dependency_links.txt +0 -0
  30. {gmicloud-0.1.1 → gmicloud-0.1.2}/gmicloud.egg-info/top_level.txt +0 -0
  31. {gmicloud-0.1.1 → gmicloud-0.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gmicloud
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: GMI Cloud Python SDK
5
5
  Author-email: GMI <gmi@gmitec.net>
6
6
  License: MIT
@@ -76,10 +76,10 @@ client = Client()
76
76
 
77
77
  # Schedule and start a task from an artifact template
78
78
  task = client.create_task_from_artifact_template(
79
- "llama31_8b_template_001",
79
+ "qwen_2.5_14b_instruct_template_001",
80
80
  TaskScheduling(
81
81
  scheduling_oneoff=OneOffScheduling(
82
- trigger_timestamp=int(datetime.now().timestamp()) + 60, # Delay by 1 min
82
+ trigger_timestamp=int(datetime.now().timestamp()) + 10, # Delay by 10 seconds
83
83
  min_replicas=1,
84
84
  max_replicas=10,
85
85
  )
@@ -104,7 +104,7 @@ def create_artifact_from_template(client):
104
104
  # List all available templates
105
105
  templates = artifact_manager.get_artifact_templates()
106
106
  for template in templates:
107
- if template.artifact_name == "Llama3.1 8B":
107
+ if template.artifact_template_id == "qwen_2.5_14b_instruct_template_001":
108
108
  return artifact_manager.create_artifact_from_template(
109
109
  artifact_template_id=template.artifact_template_id
110
110
  )
@@ -132,19 +132,19 @@ def create_task_and_start(client, artifact_id):
132
132
  task = task_manager.create_task(Task(
133
133
  config=TaskConfig(
134
134
  ray_task_config=RayTaskConfig(
135
- ray_version="latest-py311-gpu",
135
+ ray_version="2.40.0-py310-gpu",
136
136
  file_path="serve",
137
137
  artifact_id=artifact_id,
138
138
  deployment_name="app",
139
139
  replica_resource=ReplicaResource(
140
- cpu=24,
141
- ram_gb=128,
142
- gpu=2,
140
+ cpu=10,
141
+ ram_gb=100,
142
+ gpu=1,
143
143
  ),
144
144
  ),
145
145
  task_scheduling=TaskScheduling(
146
146
  scheduling_oneoff=OneOffScheduling(
147
- trigger_timestamp=int(datetime.now().timestamp()) + 60,
147
+ trigger_timestamp=int(datetime.now().timestamp()) + 10,
148
148
  min_replicas=1,
149
149
  max_replicas=10,
150
150
  )
@@ -158,7 +158,7 @@ def create_task_and_start(client, artifact_id):
158
158
 
159
159
  ### (c) Query the Model Endpoint
160
160
 
161
- Once the task is ready, use the endpoint for inference:
161
+ Once the task is running, use the endpoint for inference:
162
162
 
163
163
  ```python
164
164
  from examples.completion import call_chat_completion
@@ -198,8 +198,8 @@ password: Optional[str] = ""
198
198
  ## Notes & Troubleshooting
199
199
 
200
200
  Ensure Credentials are Correct: Double-check your environment variables or parameters passed into the Client object.
201
- Artifact Status: It may take a few minutes for an artifact or task to transition to the "ready" state.
202
- Inference Endpoint Readiness: Use the task endpoint only after the task status changes to "ready".
201
+ Artifact Status: It may take a few minutes for an artifact or task to transition to the "running" state.
202
+ Inference Endpoint Readiness: Use the task endpoint only after the task status changes to "running".
203
203
  Default OpenAI Key: By default, the OpenAI API base URL is derived from the endpoint provided by GMI.
204
204
 
205
205
  ## Contributing
@@ -64,10 +64,10 @@ client = Client()
64
64
 
65
65
  # Schedule and start a task from an artifact template
66
66
  task = client.create_task_from_artifact_template(
67
- "llama31_8b_template_001",
67
+ "qwen_2.5_14b_instruct_template_001",
68
68
  TaskScheduling(
69
69
  scheduling_oneoff=OneOffScheduling(
70
- trigger_timestamp=int(datetime.now().timestamp()) + 60, # Delay by 1 min
70
+ trigger_timestamp=int(datetime.now().timestamp()) + 10, # Delay by 10 seconds
71
71
  min_replicas=1,
72
72
  max_replicas=10,
73
73
  )
@@ -92,7 +92,7 @@ def create_artifact_from_template(client):
92
92
  # List all available templates
93
93
  templates = artifact_manager.get_artifact_templates()
94
94
  for template in templates:
95
- if template.artifact_name == "Llama3.1 8B":
95
+ if template.artifact_template_id == "qwen_2.5_14b_instruct_template_001":
96
96
  return artifact_manager.create_artifact_from_template(
97
97
  artifact_template_id=template.artifact_template_id
98
98
  )
@@ -120,19 +120,19 @@ def create_task_and_start(client, artifact_id):
120
120
  task = task_manager.create_task(Task(
121
121
  config=TaskConfig(
122
122
  ray_task_config=RayTaskConfig(
123
- ray_version="latest-py311-gpu",
123
+ ray_version="2.40.0-py310-gpu",
124
124
  file_path="serve",
125
125
  artifact_id=artifact_id,
126
126
  deployment_name="app",
127
127
  replica_resource=ReplicaResource(
128
- cpu=24,
129
- ram_gb=128,
130
- gpu=2,
128
+ cpu=10,
129
+ ram_gb=100,
130
+ gpu=1,
131
131
  ),
132
132
  ),
133
133
  task_scheduling=TaskScheduling(
134
134
  scheduling_oneoff=OneOffScheduling(
135
- trigger_timestamp=int(datetime.now().timestamp()) + 60,
135
+ trigger_timestamp=int(datetime.now().timestamp()) + 10,
136
136
  min_replicas=1,
137
137
  max_replicas=10,
138
138
  )
@@ -146,7 +146,7 @@ def create_task_and_start(client, artifact_id):
146
146
 
147
147
  ### (c) Query the Model Endpoint
148
148
 
149
- Once the task is ready, use the endpoint for inference:
149
+ Once the task is running, use the endpoint for inference:
150
150
 
151
151
  ```python
152
152
  from examples.completion import call_chat_completion
@@ -186,8 +186,8 @@ password: Optional[str] = ""
186
186
  ## Notes & Troubleshooting
187
187
 
188
188
  Ensure Credentials are Correct: Double-check your environment variables or parameters passed into the Client object.
189
- Artifact Status: It may take a few minutes for an artifact or task to transition to the "ready" state.
190
- Inference Endpoint Readiness: Use the task endpoint only after the task status changes to "ready".
189
+ Artifact Status: It may take a few minutes for an artifact or task to transition to the "running" state.
190
+ Inference Endpoint Readiness: Use the task endpoint only after the task status changes to "running".
191
191
  Default OpenAI Key: By default, the OpenAI API base URL is derived from the endpoint provided by GMI.
192
192
 
193
193
  ## Contributing
@@ -5,7 +5,7 @@ from ._internal._models import (
5
5
  Task,
6
6
  TaskOwner,
7
7
  TaskConfig,
8
- TaskInfo,
8
+ EndpointInfo,
9
9
  RayTaskConfig,
10
10
  TaskScheduling,
11
11
  ReplicaResource,
@@ -13,7 +13,6 @@ from ._internal._models import (
13
13
  DailyScheduling,
14
14
  DailyTrigger,
15
15
  ArtifactTemplate,
16
- CreateArtifactFromTemplateResponse
17
16
  )
18
17
  from ._internal._enums import (
19
18
  BuildStatus,
@@ -29,7 +28,7 @@ __all__ = [
29
28
  "Task",
30
29
  "TaskOwner",
31
30
  "TaskConfig",
32
- "TaskInfo",
31
+ "EndpointInfo",
33
32
  "RayTaskConfig",
34
33
  "TaskScheduling",
35
34
  "ReplicaResource",
@@ -39,5 +38,4 @@ __all__ = [
39
38
  "ArtifactTemplate",
40
39
  "BuildStatus",
41
40
  "TaskEndpointStatus",
42
- "CreateArtifactFromTemplateResponse"
43
41
  ]
@@ -60,7 +60,6 @@ class HTTPClient:
60
60
  else:
61
61
  error_message = response.json().get('message', 'Unknown error')
62
62
  raise APIError(f"HTTP Request failed: {error_message}")
63
-
64
63
  # Raise for HTTP errors
65
64
  response.raise_for_status()
66
65
 
@@ -14,6 +14,7 @@ class BuildStatus(str, Enum):
14
14
 
15
15
 
16
16
  class TaskEndpointStatus(str, Enum):
17
+ UNKNOWN = ""
17
18
  PENDING = "pending"
18
19
  DEPLOYING = "deploying"
19
20
  SCALING = "scaling"
@@ -21,3 +22,4 @@ class TaskEndpointStatus(str, Enum):
21
22
  ARCHIVED = "archived"
22
23
  READY = "ready"
23
24
  UNREADY = "unready"
25
+ NEW = "new"
@@ -216,7 +216,7 @@ class RayTaskConfig(BaseModel):
216
216
  file_path: Optional[str] = "" # Path to the task file in storage.
217
217
  deployment_name: Optional[str] = "" # Name of the deployment.
218
218
  replica_resource: Optional[ReplicaResource] = None # Resources allocated for task replicas.
219
- volume_mounts: Optional[VolumeMount] = None # Configuration for mounted volumes.
219
+ volume_mounts: Optional[List[VolumeMount]] = None # Configuration for mounted volumes.
220
220
 
221
221
 
222
222
  class OneOffScheduling(BaseModel):
@@ -265,12 +265,12 @@ class TaskConfig(BaseModel):
265
265
  last_update_timestamp: Optional[int] = 0 # Timestamp when the task was last updated.
266
266
 
267
267
 
268
- class TaskInfo(BaseModel):
268
+ class EndpointInfo(BaseModel):
269
269
  """
270
- Additional information about a task.
270
+ Additional information about the task endpoint.
271
271
  """
272
272
  endpoint_status: Optional[TaskEndpointStatus] = None # Current status of the task (e.g., running, stopped).
273
- endpoint: Optional[str] = "" # API endpoint exposed by the task, if applicable.
273
+ endpoint_url: Optional[str] = "" # URL for accessing the task endpoint.
274
274
 
275
275
 
276
276
  class UserPreference(BaseModel):
@@ -288,7 +288,8 @@ class Task(BaseModel):
288
288
  task_id: Optional[str] = None # Unique identifier for the task.
289
289
  owner: Optional[TaskOwner] = None # Ownership information of the task.
290
290
  config: Optional[TaskConfig] = None # Configuration data for the task.
291
- info: Optional[TaskInfo] = None # Additional information about the task.
291
+ endpoint_info: Optional[EndpointInfo] = None # Additional information about the task endpoint.
292
+ cluster_endpoints: Optional[List[EndpointInfo]] = None # Endpoints for the task cluster.
292
293
  task_status: Optional[str] = "" # Status of the task.
293
294
  readiness_status: Optional[str] = "" # Readiness status of the task.
294
295
  user_preference: Optional[UserPreference] = None # User preference for the task.
@@ -7,7 +7,7 @@ from ._internal._client._iam_client import IAMClient
7
7
  from ._internal._manager._artifact_manager import ArtifactManager
8
8
  from ._internal._manager._task_manager import TaskManager
9
9
  from ._internal._enums import BuildStatus
10
- from ._internal._models import Task, TaskConfig, RayTaskConfig, TaskScheduling, OneOffScheduling, ReplicaResource
10
+ from ._internal._models import Task, TaskConfig, RayTaskConfig, TaskScheduling, ReplicaResource
11
11
 
12
12
 
13
13
  class Client:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gmicloud
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: GMI Cloud Python SDK
5
5
  Author-email: GMI <gmi@gmitec.net>
6
6
  License: MIT
@@ -76,10 +76,10 @@ client = Client()
76
76
 
77
77
  # Schedule and start a task from an artifact template
78
78
  task = client.create_task_from_artifact_template(
79
- "llama31_8b_template_001",
79
+ "qwen_2.5_14b_instruct_template_001",
80
80
  TaskScheduling(
81
81
  scheduling_oneoff=OneOffScheduling(
82
- trigger_timestamp=int(datetime.now().timestamp()) + 60, # Delay by 1 min
82
+ trigger_timestamp=int(datetime.now().timestamp()) + 10, # Delay by 10 seconds
83
83
  min_replicas=1,
84
84
  max_replicas=10,
85
85
  )
@@ -104,7 +104,7 @@ def create_artifact_from_template(client):
104
104
  # List all available templates
105
105
  templates = artifact_manager.get_artifact_templates()
106
106
  for template in templates:
107
- if template.artifact_name == "Llama3.1 8B":
107
+ if template.artifact_template_id == "qwen_2.5_14b_instruct_template_001":
108
108
  return artifact_manager.create_artifact_from_template(
109
109
  artifact_template_id=template.artifact_template_id
110
110
  )
@@ -132,19 +132,19 @@ def create_task_and_start(client, artifact_id):
132
132
  task = task_manager.create_task(Task(
133
133
  config=TaskConfig(
134
134
  ray_task_config=RayTaskConfig(
135
- ray_version="latest-py311-gpu",
135
+ ray_version="2.40.0-py310-gpu",
136
136
  file_path="serve",
137
137
  artifact_id=artifact_id,
138
138
  deployment_name="app",
139
139
  replica_resource=ReplicaResource(
140
- cpu=24,
141
- ram_gb=128,
142
- gpu=2,
140
+ cpu=10,
141
+ ram_gb=100,
142
+ gpu=1,
143
143
  ),
144
144
  ),
145
145
  task_scheduling=TaskScheduling(
146
146
  scheduling_oneoff=OneOffScheduling(
147
- trigger_timestamp=int(datetime.now().timestamp()) + 60,
147
+ trigger_timestamp=int(datetime.now().timestamp()) + 10,
148
148
  min_replicas=1,
149
149
  max_replicas=10,
150
150
  )
@@ -158,7 +158,7 @@ def create_task_and_start(client, artifact_id):
158
158
 
159
159
  ### (c) Query the Model Endpoint
160
160
 
161
- Once the task is ready, use the endpoint for inference:
161
+ Once the task is running, use the endpoint for inference:
162
162
 
163
163
  ```python
164
164
  from examples.completion import call_chat_completion
@@ -198,8 +198,8 @@ password: Optional[str] = ""
198
198
  ## Notes & Troubleshooting
199
199
 
200
200
  Ensure Credentials are Correct: Double-check your environment variables or parameters passed into the Client object.
201
- Artifact Status: It may take a few minutes for an artifact or task to transition to the "ready" state.
202
- Inference Endpoint Readiness: Use the task endpoint only after the task status changes to "ready".
201
+ Artifact Status: It may take a few minutes for an artifact or task to transition to the "running" state.
202
+ Inference Endpoint Readiness: Use the task endpoint only after the task status changes to "running".
203
203
  Default OpenAI Key: By default, the OpenAI API base URL is derived from the endpoint provided by GMI.
204
204
 
205
205
  ## Contributing
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "gmicloud"
7
- version = "0.1.1"
7
+ version = "0.1.2"
8
8
  description = "GMI Cloud Python SDK"
9
9
  authors = [{ name = "GMI", email = "gmi@gmitec.net" }]
10
10
  license = { text = "MIT" }
File without changes
File without changes