thestage 0.6.5__py3-none-any.whl → 0.6.7__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.
- thestage/__init__.py +1 -1
- thestage/color_scheme/color_scheme.py +1 -0
- thestage/controllers/base_controller.py +4 -3
- thestage/controllers/config_controller.py +16 -4
- thestage/controllers/container_controller.py +151 -106
- thestage/controllers/instance_controller.py +35 -9
- thestage/controllers/project_controller.py +335 -89
- thestage/entities/container.py +5 -3
- thestage/entities/project_inference_simulator.py +2 -1
- thestage/entities/project_inference_simulator_model.py +2 -2
- thestage/entities/project_task.py +2 -3
- thestage/entities/rented_instance.py +2 -2
- thestage/entities/self_hosted_instance.py +2 -2
- thestage/helpers/error_handler.py +1 -1
- thestage/main.py +1 -1
- thestage/services/clients/git/git_client.py +1 -1
- thestage/services/clients/thestage_api/api_client.py +142 -109
- thestage/services/clients/thestage_api/dtos/base_controller/connect_resolve_response.py +22 -0
- thestage/services/clients/thestage_api/dtos/container_param_request.py +1 -1
- thestage/services/clients/thestage_api/dtos/container_response.py +1 -21
- thestage/services/clients/thestage_api/dtos/docker_container_controller/docker_container_list_request.py +2 -1
- thestage/services/clients/thestage_api/dtos/inference_controller/deploy_inference_model_to_instance_request.py +5 -1
- thestage/services/clients/thestage_api/dtos/inference_controller/deploy_inference_model_to_instance_response.py +2 -1
- thestage/services/clients/thestage_api/dtos/inference_controller/deploy_inference_model_to_sagemaker_request.py +1 -0
- thestage/services/clients/thestage_api/dtos/inference_controller/get_inference_simulator_request.py +2 -1
- thestage/services/clients/thestage_api/dtos/inference_controller/{inference_simulator_list_for_project_request.py → inference_simulator_list_request.py} +3 -2
- thestage/services/clients/thestage_api/dtos/inference_controller/{inference_simulator_list_for_project_response.py → inference_simulator_list_response.py} +1 -1
- thestage/services/clients/thestage_api/dtos/inference_controller/inference_simulator_model_list_for_project_request.py +2 -1
- thestage/services/clients/thestage_api/dtos/instance_rented_response.py +4 -37
- thestage/services/clients/thestage_api/dtos/logging_controller/log_polling_request.py +3 -3
- thestage/services/clients/thestage_api/dtos/logging_controller/user_logs_query_request.py +3 -11
- thestage/services/clients/thestage_api/dtos/project_controller/project_get_deploy_ssh_key_request.py +1 -0
- thestage/services/clients/thestage_api/dtos/project_controller/project_push_inference_simulator_model_request.py +2 -1
- thestage/services/clients/thestage_api/dtos/project_controller/project_run_task_request.py +2 -4
- thestage/services/clients/thestage_api/dtos/project_controller/project_run_task_response.py +3 -0
- thestage/services/clients/thestage_api/dtos/project_controller/project_start_inference_simulator_request.py +5 -3
- thestage/services/clients/thestage_api/dtos/project_response.py +3 -15
- thestage/services/clients/thestage_api/dtos/selfhosted_instance_response.py +2 -20
- thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_key_to_user_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_public_key_to_instance_request.py +4 -2
- thestage/services/clients/thestage_api/dtos/ssh_key_controller/is_user_has_public_ssh_key_response.py +1 -1
- thestage/services/clients/thestage_api/dtos/task_controller/task_list_for_project_request.py +4 -1
- thestage/services/clients/thestage_api/dtos/task_controller/task_view_response.py +0 -2
- thestage/services/config_provider/config_provider.py +2 -2
- thestage/services/connect/connect_service.py +77 -74
- thestage/services/container/container_service.py +120 -41
- thestage/services/container/mapper/container_mapper.py +2 -1
- thestage/services/instance/instance_service.py +13 -20
- thestage/services/instance/mapper/instance_mapper.py +1 -3
- thestage/services/instance/mapper/selfhosted_mapper.py +3 -4
- thestage/services/logging/logging_service.py +45 -48
- thestage/services/project/dto/inference_simulator_dto.py +1 -10
- thestage/services/project/dto/inference_simulator_model_dto.py +2 -10
- thestage/services/project/dto/project_config.py +2 -2
- thestage/services/project/mapper/project_inference_simulator_mapper.py +1 -0
- thestage/services/project/mapper/project_inference_simulator_model_mapper.py +2 -2
- thestage/services/project/mapper/project_task_mapper.py +2 -3
- thestage/services/project/project_service.py +174 -140
- thestage/services/remote_server_service.py +1 -0
- thestage/services/task/dto/task_dto.py +3 -23
- {thestage-0.6.5.dist-info → thestage-0.6.7.dist-info}/METADATA +4 -2
- {thestage-0.6.5.dist-info → thestage-0.6.7.dist-info}/RECORD +65 -74
- {thestage-0.6.5.dist-info → thestage-0.6.7.dist-info}/WHEEL +1 -1
- thestage/services/clients/thestage_api/dtos/cloud_provider_region.py +0 -19
- thestage/services/clients/thestage_api/dtos/docker_container_assigned_device.py +0 -10
- thestage/services/clients/thestage_api/dtos/enums/currency_type.py +0 -10
- thestage/services/clients/thestage_api/dtos/enums/daemon_status.py +0 -9
- thestage/services/clients/thestage_api/dtos/enums/disk_type.py +0 -7
- thestage/services/clients/thestage_api/dtos/enums/drive_type.py +0 -7
- thestage/services/clients/thestage_api/dtos/enums/instance_type.py +0 -7
- thestage/services/clients/thestage_api/dtos/enums/location_region.py +0 -11
- thestage/services/clients/thestage_api/dtos/enums/power_status.py +0 -10
- thestage/services/clients/thestage_api/dtos/price_definition.py +0 -14
- {thestage-0.6.5.dist-info → thestage-0.6.7.dist-info}/entry_points.txt +0 -0
- {thestage-0.6.5.dist-info → thestage-0.6.7.dist-info/licenses}/LICENSE.txt +0 -0
|
@@ -2,12 +2,8 @@ from typing import Optional, List, Dict
|
|
|
2
2
|
|
|
3
3
|
from pydantic import Field, BaseModel, ConfigDict
|
|
4
4
|
|
|
5
|
-
from thestage.services.clients.thestage_api.dtos.docker_container_assigned_device import DockerContainerAssignedDeviceDto
|
|
6
5
|
from thestage.services.clients.thestage_api.dtos.docker_container_mapping import DockerContainerMappingDto
|
|
7
|
-
from thestage.services.clients.thestage_api.dtos.enums.container_pending_action import DockerContainerAction
|
|
8
|
-
from thestage.services.clients.thestage_api.dtos.enums.container_status import DockerContainerStatus
|
|
9
6
|
from thestage.services.clients.thestage_api.dtos.frontend_status import FrontendStatusDto
|
|
10
|
-
from thestage.services.clients.thestage_api.dtos.installed_service import DockerContainerInstalledServicesDto
|
|
11
7
|
from thestage.services.clients.thestage_api.dtos.instance_rented_response import InstanceRentedDto
|
|
12
8
|
from thestage.services.clients.thestage_api.dtos.project_response import ProjectDto
|
|
13
9
|
from thestage.services.clients.thestage_api.dtos.selfhosted_instance_response import SelfHostedInstanceDto
|
|
@@ -18,30 +14,18 @@ from thestage.services.clients.thestage_api.dtos.pagination_data import Paginati
|
|
|
18
14
|
class DockerContainerDto(BaseModel):
|
|
19
15
|
model_config = ConfigDict(use_enum_values=True)
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
instance_rented_id: Optional[int] = Field(None, alias='instanceRentedId')
|
|
23
|
-
selfhosted_instance_id: Optional[int] = Field(None, alias='selfhostedInstanceId')
|
|
17
|
+
public_id: Optional[str] = Field(None, alias='publicId')
|
|
24
18
|
instance_rented: Optional[InstanceRentedDto] = Field(None, alias='instanceRented')
|
|
25
19
|
selfhosted_instance: Optional[SelfHostedInstanceDto] = Field(None, alias='selfhostedInstance')
|
|
26
|
-
|
|
27
|
-
project_id: Optional[int] = Field(None, alias='projectId')
|
|
28
20
|
project: Optional[ProjectDto] = Field(None, alias='project')
|
|
29
|
-
|
|
30
|
-
is_default: Optional[bool] = Field(None, alias='isDefault')
|
|
31
21
|
system_name: Optional[str] = Field(None, alias='systemName')
|
|
32
22
|
title: Optional[str] = Field(None, alias='title')
|
|
33
23
|
slug: Optional[str] = Field(None, alias='slug')
|
|
34
24
|
docker_image: Optional[str] = Field(None, alias='dockerImage')
|
|
35
|
-
assigned_devices: Optional[DockerContainerAssignedDeviceDto] = Field(None, alias='assignedDevices')
|
|
36
25
|
mappings: Optional[DockerContainerMappingDto] = Field(None, alias='mappings')
|
|
37
26
|
|
|
38
27
|
frontend_status: Optional[FrontendStatusDto] = Field(None, alias='frontendStatus')
|
|
39
28
|
|
|
40
|
-
pending_action: Optional[DockerContainerAction] = Field(None, alias='pendingAction')
|
|
41
|
-
installed_services: Optional[DockerContainerInstalledServicesDto] = Field(None, alias='installedServices')
|
|
42
|
-
created_at: Optional[str] = Field(None, alias='createdAt')
|
|
43
|
-
updated_at: Optional[str] = Field(None, alias='updatedAt')
|
|
44
|
-
|
|
45
29
|
|
|
46
30
|
class DockerContainerPaginated(BaseModel):
|
|
47
31
|
model_config = ConfigDict(use_enum_values=True)
|
|
@@ -52,10 +36,6 @@ class DockerContainerPaginated(BaseModel):
|
|
|
52
36
|
total_pages: Optional[int] = Field(None, alias='totalPages')
|
|
53
37
|
pagination_data: Optional[PaginationData] = Field(None, alias='paginationData')
|
|
54
38
|
|
|
55
|
-
#
|
|
56
|
-
# class DockerContainerListResponse(TheStageBasePaginatedResponse):
|
|
57
|
-
# paginated_list: Optional[DockerContainerPaginated] = Field(None, alias='paginatedList')
|
|
58
|
-
|
|
59
39
|
|
|
60
40
|
class DockerContainerViewResponse(TheStageBaseResponse):
|
|
61
41
|
docker_container: Optional[DockerContainerDto] = Field(None, alias='dockerContainer')
|
|
@@ -10,4 +10,5 @@ class DockerContainerListRequest(BaseModel):
|
|
|
10
10
|
|
|
11
11
|
entityFilterRequest: EntityFilterRequest = Field(None, alias='entityFilterRequest')
|
|
12
12
|
statuses: Optional[List[str]] = Field(None, alias='statuses')
|
|
13
|
-
|
|
13
|
+
projectPublicId: Optional[str] = Field(None, alias='projectPublicId')
|
|
14
|
+
projectSlug: Optional[str] = Field(None, alias='projectSlug')
|
|
@@ -8,7 +8,11 @@ from thestage.services.clients.thestage_api.dtos.entity_filter_request import En
|
|
|
8
8
|
class DeployInferenceModelToInstanceRequest(BaseModel):
|
|
9
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
10
10
|
|
|
11
|
+
modelPublicId: Optional[str] = Field(None, alias='modelPublicId')
|
|
11
12
|
modelSlug: Optional[str] = Field(None, alias='modelSlug')
|
|
13
|
+
|
|
14
|
+
instanceRentedPublicId: Optional[str] = Field(None, alias='instanceRentedPublicId')
|
|
12
15
|
instanceRentedSlug: Optional[str] = Field(None, alias='instanceRentedSlug')
|
|
16
|
+
|
|
17
|
+
selfhostedInstancePublicId: Optional[str] = Field(None, alias='selfhostedInstancePublicId')
|
|
13
18
|
selfhostedInstanceSlug: Optional[str] = Field(None, alias='selfhostedInstanceSlug')
|
|
14
|
-
inferenceSimulatorSlug: Optional[str] = Field(None, alias='inferenceSimulatorSlug')
|
|
@@ -8,6 +8,7 @@ from thestage.services.project.dto.inference_simulator_model_dto import Inferenc
|
|
|
8
8
|
|
|
9
9
|
class DeployInferenceModelToInstanceResponse(TheStageBaseResponse):
|
|
10
10
|
model_config = ConfigDict(use_enum_values=True)
|
|
11
|
-
|
|
11
|
+
|
|
12
|
+
inferenceSimulatorPublicId: Optional[str] = Field(None, alias='inferenceSimulatorPublicId')
|
|
12
13
|
|
|
13
14
|
|
|
@@ -8,5 +8,6 @@ from thestage.services.clients.thestage_api.dtos.entity_filter_request import En
|
|
|
8
8
|
class DeployInferenceModelToSagemakerRequest(BaseModel):
|
|
9
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
10
10
|
|
|
11
|
+
modelPublicId: Optional[str] = Field(None, alias='modelPublicId')
|
|
11
12
|
modelSlug: Optional[str] = Field(None, alias='modelSlug')
|
|
12
13
|
arn: Optional[str] = Field(None, alias='arn')
|
thestage/services/clients/thestage_api/dtos/inference_controller/get_inference_simulator_request.py
CHANGED
|
@@ -8,4 +8,5 @@ from thestage.services.clients.thestage_api.dtos.entity_filter_request import En
|
|
|
8
8
|
class GetInferenceSimulatorRequest(BaseModel):
|
|
9
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
publicId: Optional[str] = Field(None, alias='publicId')
|
|
12
|
+
slug: Optional[str] = Field(None, alias='slug')
|
|
@@ -5,10 +5,11 @@ from pydantic import Field, ConfigDict, BaseModel
|
|
|
5
5
|
from thestage.services.clients.thestage_api.dtos.entity_filter_request import EntityFilterRequest
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
class
|
|
8
|
+
class InferenceSimulatorListRequest(BaseModel):
|
|
9
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
10
10
|
|
|
11
11
|
entityFilterRequest: EntityFilterRequest = Field(None, alias='entityFilterRequest')
|
|
12
|
-
|
|
12
|
+
projectPublicId: Optional[str] = Field(None, alias='projectPublicId')
|
|
13
|
+
projectSlug: Optional[str] = Field(None, alias='projectSlug')
|
|
13
14
|
statuses: Optional[List[str]] = Field(None, alias='statuses')
|
|
14
15
|
|
|
@@ -6,7 +6,7 @@ from thestage.services.clients.thestage_api.dtos.paginated_entity_list import Pa
|
|
|
6
6
|
from thestage.services.project.dto.inference_simulator_dto import InferenceSimulatorDto
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
class
|
|
9
|
+
class InferenceSimulatorListResponse(TheStageBaseResponse):
|
|
10
10
|
model_config = ConfigDict(use_enum_values=True)
|
|
11
11
|
|
|
12
12
|
inferenceSimulators: PaginatedEntityList[InferenceSimulatorDto] = Field(None, alias='inferenceSimulators')
|
|
@@ -9,5 +9,6 @@ class InferenceSimulatorModelListForProjectRequest(BaseModel):
|
|
|
9
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
10
10
|
|
|
11
11
|
entityFilterRequest: EntityFilterRequest = Field(None, alias='entityFilterRequest')
|
|
12
|
-
|
|
12
|
+
projectPublicId: Optional[str] = Field(None, alias='projectPublicId')
|
|
13
|
+
projectSlug: Optional[str] = Field(None, alias='projectSlug')
|
|
13
14
|
statuses: Optional[List[str]] = None
|
|
@@ -1,58 +1,25 @@
|
|
|
1
|
-
from
|
|
2
|
-
from typing import Optional, List, Dict
|
|
1
|
+
from typing import Optional, Dict
|
|
3
2
|
|
|
4
3
|
from pydantic import Field, BaseModel, ConfigDict
|
|
5
4
|
|
|
6
|
-
from thestage.services.clients.thestage_api.dtos.enums.daemon_status import DaemonStatus
|
|
7
5
|
from thestage.services.clients.thestage_api.dtos.frontend_status import FrontendStatusDto
|
|
8
|
-
from thestage.services.clients.thestage_api.dtos.instance_detected_gpus import InstanceDetectedGpusDto
|
|
9
|
-
from thestage.services.clients.thestage_api.dtos.enums.instance_type import InstanceTypeEnumDto
|
|
10
6
|
from thestage.services.clients.thestage_api.dtos.base_response import TheStageBasePaginatedResponse
|
|
11
7
|
from thestage.services.clients.thestage_api.dtos.paginated_entity_list import PaginatedEntityList
|
|
12
|
-
from thestage.services.clients.thestage_api.dtos.cloud_provider_region import CloudProviderRegionDto
|
|
13
|
-
from thestage.services.clients.thestage_api.dtos.enums.disk_type import DiskTypeEnumDto
|
|
14
8
|
from thestage.services.clients.thestage_api.dtos.enums.gpu_name import InstanceGpuType
|
|
15
|
-
from thestage.services.clients.thestage_api.dtos.enums.power_status import PowerStatusEnumDto
|
|
16
|
-
from thestage.services.clients.thestage_api.dtos.enums.instance_rented_status import InstanceRentedBusinessStatus
|
|
17
|
-
from thestage.services.clients.thestage_api.dtos.price_definition import PriceDefinitionDto
|
|
18
9
|
from thestage.services.clients.thestage_api.dtos.enums.cpu_type import InstanceCpuType
|
|
19
10
|
|
|
20
11
|
|
|
21
12
|
class InstanceRentedDto(BaseModel):
|
|
22
13
|
model_config = ConfigDict(use_enum_values=True)
|
|
23
14
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
total_money_spent: Optional[List[PriceDefinitionDto]] = Field(default_factory=list, alias='totalMoneySpent')
|
|
27
|
-
client_id: Optional[int] = Field(None, alias='clientId')
|
|
28
|
-
instance_type: Optional[InstanceTypeEnumDto] = Field(InstanceTypeEnumDto.UNKNOWN, alias='instanceType', validate_default=True)
|
|
29
|
-
provider_id: Optional[str] = Field(None, alias='providerId')
|
|
30
|
-
cloud_provider_region_id: Optional[int] = Field(None, alias='cloudProviderRegionId')
|
|
31
|
-
cloud_provider_region: Optional[CloudProviderRegionDto] = Field(None, alias='cloudProviderRegion')
|
|
15
|
+
public_id: Optional[str] = Field(None, alias='publicId')
|
|
16
|
+
slug: Optional[str] = Field(None, alias='slug')
|
|
32
17
|
cpu_type: Optional[InstanceCpuType] = Field(InstanceCpuType.UNKNOWN, alias='cpuType')
|
|
33
|
-
cpu_name: Optional[str] = Field(None, alias='cpuName')
|
|
34
18
|
cpu_cores: Optional[int] = Field(None, alias='cpuCores')
|
|
35
|
-
gpu_type: Optional[InstanceGpuType] = Field(
|
|
36
|
-
gpu_name: Optional[str] = Field(None, alias='gpuName')
|
|
37
|
-
gpu_memory_gb: Optional[int] = Field(None, alias='gpuMemoryGb')
|
|
38
|
-
gpu_count: Optional[int] = Field(None, alias='gpuCount')
|
|
39
|
-
disk_type: Optional[DiskTypeEnumDto] = Field(DiskTypeEnumDto.UNKNOWN, alias='diskType')
|
|
40
|
-
disk_size_gb: Optional[int] = Field(None, alias='diskSizeGb')
|
|
41
|
-
ram_size_gb: Optional[int] = Field(None, alias='ramSizeGb')
|
|
42
|
-
average_renting_time_minutes: Optional[int] = Field(None, alias='averageRentingTimeMinutes')
|
|
43
|
-
|
|
44
|
-
business_status: InstanceRentedBusinessStatus = Field(InstanceRentedBusinessStatus.UNKNOWN, alias='businessStatus')
|
|
19
|
+
gpu_type: Optional[InstanceGpuType] = Field(InstanceGpuType.UNKNOWN, alias='gpuType')
|
|
45
20
|
frontend_status: Optional[FrontendStatusDto] = Field(None, alias='frontendStatus')
|
|
46
|
-
|
|
47
|
-
slug: Optional[str] = Field(None, alias='slug')
|
|
48
|
-
title: Optional[str] = Field(None, alias='title')
|
|
49
|
-
power_status: PowerStatusEnumDto = Field(PowerStatusEnumDto.UNKNOWN, alias='powerStatus')
|
|
50
|
-
created_at: Optional[datetime] = Field(None, alias='createdAt')
|
|
51
|
-
updated_at: Optional[datetime] = Field(None, alias='updatedAt')
|
|
52
21
|
ip_address: Optional[str] = Field(None, alias='ipAddress')
|
|
53
22
|
host_username: Optional[str] = Field(None, alias='hostUsername')
|
|
54
|
-
detected_gpus: Optional[InstanceDetectedGpusDto] = Field(None, alias='detectedGpus')
|
|
55
|
-
daemon_status: Optional[DaemonStatus] = Field(DaemonStatus.UNKNOWN, alias='daemonStatus')
|
|
56
23
|
|
|
57
24
|
|
|
58
25
|
class InstanceRentedListResponse(TheStageBasePaginatedResponse):
|
|
@@ -6,8 +6,8 @@ from pydantic import Field, ConfigDict, BaseModel
|
|
|
6
6
|
class LogPollingRequest(BaseModel):
|
|
7
7
|
model_config = ConfigDict(use_enum_values=True)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
taskPublicId: Optional[str] = Field(None, alias='taskPublicId')
|
|
10
|
+
inferenceSimulatorPublicId: Optional[str] = Field(None, alias='inferenceSimulatorPublicId')
|
|
11
11
|
lastLogId: Optional[str] = Field(None, alias='lastLogId')
|
|
12
|
-
|
|
12
|
+
dockerContainerPublicId: Optional[str] = Field(None, alias='dockerContainerPublicId')
|
|
13
13
|
lastLogTimestamp: Optional[str] = Field(None, alias='lastLogTimestamp')
|
|
@@ -6,16 +6,8 @@ from pydantic import Field, ConfigDict, BaseModel
|
|
|
6
6
|
class UserLogsQueryRequest(BaseModel):
|
|
7
7
|
model_config = ConfigDict(use_enum_values=True)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
instanceId: Optional[int] = Field(None, alias='instanceId')
|
|
13
|
-
instanceType: Optional[str] = Field(None, alias='instanceType') # ENUM
|
|
14
|
-
taskId: Optional[int] = Field(None, alias='taskId')
|
|
15
|
-
inferenceSimulatorId: Optional[int] = Field(None, alias='inferenceSimulatorId')
|
|
16
|
-
fromTimestamp: Optional[str] = Field(None, alias='fromTimestamp')
|
|
17
|
-
toTimestamp: Optional[str] = Field(None, alias='toTimestamp')
|
|
18
|
-
logType: Optional[str] = Field(None, alias='logType') # ENUM
|
|
19
|
-
offset: Optional[int] = Field(None, alias='offset')
|
|
9
|
+
containerPublicId: Optional[str] = Field(None, alias='containerPublicId')
|
|
10
|
+
taskPublicId: Optional[str] = Field(None, alias='taskPublicId')
|
|
11
|
+
inferenceSimulatorPublicId: Optional[str] = Field(None, alias='inferenceSimulatorPublicId')
|
|
20
12
|
limit: Optional[int] = Field(None, alias='limit')
|
|
21
13
|
ascendingOrder: Optional[bool] = Field(None, alias='ascendingOrder')
|
|
@@ -6,4 +6,5 @@ from pydantic import Field, ConfigDict, BaseModel
|
|
|
6
6
|
class ProjectPushInferenceSimulatorModelRequest(BaseModel):
|
|
7
7
|
model_config = ConfigDict(use_enum_values=True)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
inferenceSimulatorPublicId: Optional[str] = Field(None, alias='inferenceSimulatorPublicId')
|
|
10
|
+
inferenceSimulatorSlug: Optional[str] = Field(None, alias='inferenceSimulatorSlug')
|
|
@@ -6,10 +6,8 @@ from pydantic import Field, ConfigDict, BaseModel
|
|
|
6
6
|
class ProjectRunTaskRequest(BaseModel):
|
|
7
7
|
model_config = ConfigDict(use_enum_values=True)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
selfhostedInstanceSlug: Optional[str] = Field(None, alias='selfhostedInstanceSlug')
|
|
12
|
-
dockerContainerSlug: Optional[str] = Field(None, alias='dockerContainerSlug')
|
|
9
|
+
projectPublicId: str = Field(None, alias='projectPublicId')
|
|
10
|
+
dockerContainerPublicId: str = Field(None, alias='dockerContainerPublicId')
|
|
13
11
|
commitHash: Optional[str] = Field(None, alias='commitHash')
|
|
14
12
|
runCommand: str = Field(None, alias='runCommand')
|
|
15
13
|
taskTitle: Optional[str] = Field(None, alias='taskTitle')
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional, List
|
|
2
|
+
|
|
1
3
|
from pydantic import Field, ConfigDict
|
|
2
4
|
|
|
3
5
|
from thestage.services.clients.thestage_api.dtos.base_response import TheStageBaseResponse
|
|
@@ -8,3 +10,4 @@ class ProjectRunTaskResponse(TheStageBaseResponse):
|
|
|
8
10
|
model_config = ConfigDict(use_enum_values=True)
|
|
9
11
|
|
|
10
12
|
task: TaskDto = Field(None, alias='task')
|
|
13
|
+
tasksInQueue: Optional[List[TaskDto]] = Field(None, alias='tasksInQueue')
|
|
@@ -6,9 +6,11 @@ from pydantic import Field, ConfigDict, BaseModel
|
|
|
6
6
|
class ProjectStartInferenceSimulatorRequest(BaseModel):
|
|
7
7
|
model_config = ConfigDict(use_enum_values=True)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
projectPublicId: str = Field(None, alias='projectPublicId')
|
|
10
|
+
instanceRentedPublicId: Optional[str] = Field(None, alias='instanceRentedPublicId')
|
|
11
|
+
instanceRentedSlug: Optional[str] = Field(None, alias='instanceRentedSlug')
|
|
12
|
+
selfhostedInstancePublicId: Optional[str] = Field(None, alias='selfhostedInstancePublicId')
|
|
13
|
+
selfhostedInstanceSlug: Optional[str] = Field(None, alias='selfhostedInstanceSlug')
|
|
12
14
|
commitHash: Optional[str] = Field(None, alias='commitHash')
|
|
13
15
|
inferenceDir: Optional[str] = Field(None, alias='inferenceDir')
|
|
14
16
|
isSkipInstallation: Optional[bool] = Field(False, alias='isSkipInstallation')
|
|
@@ -3,29 +3,17 @@ from typing import Optional, List
|
|
|
3
3
|
from pydantic import Field, BaseModel, ConfigDict
|
|
4
4
|
|
|
5
5
|
from thestage.services.clients.thestage_api.dtos.base_response import TheStageBaseResponse
|
|
6
|
-
from thestage.services.clients.thestage_api.dtos.selfhosted_instance_response import SelfHostedInstanceDto
|
|
7
|
-
from thestage.services.clients.thestage_api.dtos.instance_rented_response import InstanceRentedDto
|
|
8
6
|
|
|
9
7
|
|
|
10
8
|
class ProjectDto(BaseModel):
|
|
11
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
client_id: Optional[int] = Field(None, alias='сlientId')
|
|
15
|
-
ssh_key_deploy_id: Optional[int] = Field(None, alias='sshKeyDeployId')
|
|
16
|
-
name: Optional[str] = Field(None, alias='name')
|
|
11
|
+
public_id: Optional[str] = Field(None, alias='publicId')
|
|
17
12
|
slug: Optional[str] = Field(None, alias='slug')
|
|
18
|
-
description: Optional[str] = Field(None, alias='description')
|
|
19
|
-
github_username: Optional[str] = Field(None, alias='githubCollaboratorUsername')
|
|
20
|
-
last_commit_hash: Optional[str] = Field(None, alias='lastCommitHash')
|
|
21
|
-
last_commit_description: Optional[str] = Field(None, alias='lastCommitDescription')
|
|
22
13
|
git_repository_url: Optional[str] = Field(None, alias='gitRepositoryUrl')
|
|
23
14
|
git_repository_name: Optional[str] = Field(None, alias='gitRepositoryName')
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
last_task_run_date: Optional[str] = Field(None, alias='lastTaskRunDate')
|
|
27
|
-
created_at: Optional[str] = Field(None, alias='createdAt')
|
|
28
|
-
updated_at: Optional[str] = Field(None, alias='updatedAt')
|
|
15
|
+
last_commit_hash: Optional[str] = Field(None, alias='lastCommitHash')
|
|
16
|
+
last_commit_description: Optional[str] = Field(None, alias='lastCommitDescription')
|
|
29
17
|
|
|
30
18
|
|
|
31
19
|
class ProjectViewResponse(TheStageBaseResponse):
|
|
@@ -1,43 +1,25 @@
|
|
|
1
1
|
from datetime import datetime
|
|
2
|
-
from typing import Optional,
|
|
2
|
+
from typing import Optional, Dict
|
|
3
3
|
|
|
4
4
|
from pydantic import Field, BaseModel, ConfigDict
|
|
5
5
|
|
|
6
6
|
from thestage.services.clients.thestage_api.dtos.base_response import TheStageBasePaginatedResponse
|
|
7
7
|
from thestage.services.clients.thestage_api.dtos.frontend_status import FrontendStatusDto
|
|
8
8
|
from thestage.services.clients.thestage_api.dtos.paginated_entity_list import PaginatedEntityList
|
|
9
|
-
from thestage.services.clients.thestage_api.dtos.pagination_data import PaginationData
|
|
10
9
|
from thestage.services.clients.thestage_api.dtos.instance_detected_gpus import InstanceDetectedGpusDto
|
|
11
|
-
from thestage.services.clients.thestage_api.dtos.enums.instance_type import InstanceTypeEnumDto
|
|
12
|
-
from thestage.services.clients.thestage_api.dtos.enums.selfhosted_status import SelfhostedBusinessStatus
|
|
13
10
|
from thestage.services.clients.thestage_api.dtos.enums.cpu_type import InstanceCpuType
|
|
14
11
|
|
|
15
12
|
|
|
16
13
|
class SelfHostedInstanceDto(BaseModel):
|
|
17
14
|
model_config = ConfigDict(use_enum_values=True)
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
id: Optional[int] = Field(None, alias='id')
|
|
21
|
-
ram_size_gb: Optional[int] = Field(None, alias='ramSizeGb')
|
|
22
|
-
client_id: Optional[int] = Field(None, alias='clientId')
|
|
16
|
+
public_id: Optional[str] = Field(None, alias='publicId')
|
|
23
17
|
slug: Optional[str] = Field(None, alias='slug')
|
|
24
|
-
title: Optional[str] = Field(None, alias='title')
|
|
25
18
|
cpu_type: Optional[InstanceCpuType] = Field(InstanceCpuType.UNKNOWN, alias='cpuType')
|
|
26
|
-
cpu_name: Optional[str] = Field(None, alias='cpuName')
|
|
27
19
|
cpu_cores: Optional[int] = Field(None, alias='cpuCores')
|
|
28
|
-
gpu_count: Optional[int] = Field(None, alias='gpuCount')
|
|
29
20
|
detected_gpus: Optional[InstanceDetectedGpusDto] = Field(None, alias='detectedGpus')
|
|
30
|
-
hardware_profile_id: Optional[str] = Field(None, alias='hardwareProfileId')
|
|
31
|
-
disk_size_gb: Optional[int] = Field(None, alias='diskSizeGb')
|
|
32
|
-
|
|
33
21
|
frontend_status: Optional[FrontendStatusDto] = Field(None, alias='frontendStatus')
|
|
34
|
-
business_status: SelfhostedBusinessStatus = Field(SelfhostedBusinessStatus.UNKNOWN, alias='businessStatus')
|
|
35
|
-
|
|
36
|
-
updated_at: Optional[datetime] = Field(None, alias='updatedAt')
|
|
37
|
-
created_at: Optional[datetime] = Field(None, alias='createdAt')
|
|
38
22
|
ip_address: Optional[str] = Field(None, alias='ipAddress')
|
|
39
|
-
# not present now
|
|
40
|
-
host_username: Optional[str] = Field(None, alias='hostUsername')
|
|
41
23
|
|
|
42
24
|
|
|
43
25
|
class SelfHostedInstanceListResponse(TheStageBasePaginatedResponse):
|
thestage/services/clients/thestage_api/dtos/ssh_key_controller/add_ssh_key_to_user_response.py
CHANGED
|
@@ -9,4 +9,4 @@ from thestage.services.task.dto.task_dto import TaskDto
|
|
|
9
9
|
class AddSshKeyToUserResponse(TheStageBaseResponse):
|
|
10
10
|
model_config = ConfigDict(use_enum_values=True)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
sshKeyPairPublicId: Optional[str] = Field(None, alias='sshKeyPairPublicId')
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from pydantic import Field, ConfigDict, BaseModel
|
|
2
4
|
|
|
3
5
|
|
|
4
6
|
class AddSshPublicKeyToInstanceRequest(BaseModel):
|
|
5
7
|
model_config = ConfigDict(use_enum_values=True)
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
+
instanceRentedPublicId: str = Field(None, alias='instanceRentedPublicId')
|
|
10
|
+
sshPublicKeyPublicId: str = Field(None, alias='sshPublicKeyPublicId')
|
|
@@ -9,4 +9,4 @@ class IsUserHasSshPublicKeyResponse(TheStageBaseResponse):
|
|
|
9
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
10
10
|
|
|
11
11
|
isUserHasPublicKey: bool = Field(None, alias='isUserHasPublicKey')
|
|
12
|
-
|
|
12
|
+
sshKeyPairPublicId: Optional[str] = Field(None, alias='sshKeyPairPublicId')
|
thestage/services/clients/thestage_api/dtos/task_controller/task_list_for_project_request.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
1
3
|
from pydantic import Field, ConfigDict, BaseModel
|
|
2
4
|
|
|
3
5
|
from thestage.services.clients.thestage_api.dtos.entity_filter_request import EntityFilterRequest
|
|
@@ -7,4 +9,5 @@ class TaskListForProjectRequest(BaseModel):
|
|
|
7
9
|
model_config = ConfigDict(use_enum_values=True)
|
|
8
10
|
|
|
9
11
|
entityFilterRequest: EntityFilterRequest = Field(None, alias='entityFilterRequest')
|
|
10
|
-
|
|
12
|
+
projectPublicId: Optional[str] = Field(None, alias='projectPublicId')
|
|
13
|
+
projectSlug: Optional[str] = Field(None, alias='projectSlug')
|
|
@@ -8,5 +8,3 @@ from thestage.services.task.dto.task_dto import TaskDto
|
|
|
8
8
|
|
|
9
9
|
class TaskViewResponse(TheStageBaseResponse):
|
|
10
10
|
task: Optional[TaskDto] = Field(None, alias='task')
|
|
11
|
-
task_view_url: Optional[str] = Field(None, alias='websiteTaskViewUrl')
|
|
12
|
-
task_output_url: Optional[str] = Field(None, alias='websiteTaskOutputUrl')
|
|
@@ -76,11 +76,11 @@ class ConfigProvider:
|
|
|
76
76
|
self.__save_config_file(data=project_config.model_dump(), file_path=project_data_filepath)
|
|
77
77
|
|
|
78
78
|
|
|
79
|
-
def save_project_deploy_ssh_key(self, deploy_ssh_key: str,
|
|
79
|
+
def save_project_deploy_ssh_key(self, deploy_ssh_key: str, project_public_id: str) -> str:
|
|
80
80
|
deploy_key_dirpath = self.get_global_config_path().joinpath('project_deploy_keys')
|
|
81
81
|
self._file_system_service.create_if_not_exists_dir(deploy_key_dirpath)
|
|
82
82
|
|
|
83
|
-
deploy_key_filepath = deploy_key_dirpath.joinpath(f'
|
|
83
|
+
deploy_key_filepath = deploy_key_dirpath.joinpath(f'project_deploy_key__{project_public_id}')
|
|
84
84
|
self._file_system_service.create_if_not_exists_file(deploy_key_filepath)
|
|
85
85
|
|
|
86
86
|
text_file = open(deploy_key_filepath, "w")
|