trainml 0.5.15__py3-none-any.whl → 0.5.17__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.
- tests/unit/projects/test_projects_unit.py +1 -1
- trainml/__init__.py +1 -1
- trainml/cloudbender/services.py +12 -2
- trainml/projects/projects.py +2 -2
- {trainml-0.5.15.dist-info → trainml-0.5.17.dist-info}/METADATA +1 -1
- {trainml-0.5.15.dist-info → trainml-0.5.17.dist-info}/RECORD +10 -10
- {trainml-0.5.15.dist-info → trainml-0.5.17.dist-info}/LICENSE +0 -0
- {trainml-0.5.15.dist-info → trainml-0.5.17.dist-info}/WHEEL +0 -0
- {trainml-0.5.15.dist-info → trainml-0.5.17.dist-info}/entry_points.txt +0 -0
- {trainml-0.5.15.dist-info → trainml-0.5.17.dist-info}/top_level.txt +0 -0
|
@@ -75,7 +75,7 @@ class ProjectsTests:
|
|
|
75
75
|
requested_config = dict(
|
|
76
76
|
name="new project",
|
|
77
77
|
)
|
|
78
|
-
expected_payload = dict(name="new project"
|
|
78
|
+
expected_payload = dict(name="new project")
|
|
79
79
|
api_response = {
|
|
80
80
|
"id": "project-id-1",
|
|
81
81
|
"name": "new project",
|
trainml/__init__.py
CHANGED
trainml/cloudbender/services.py
CHANGED
|
@@ -2,6 +2,7 @@ import json
|
|
|
2
2
|
import logging
|
|
3
3
|
import asyncio
|
|
4
4
|
import math
|
|
5
|
+
from enum import Enum
|
|
5
6
|
|
|
6
7
|
from trainml.exceptions import (
|
|
7
8
|
ApiError,
|
|
@@ -9,6 +10,14 @@ from trainml.exceptions import (
|
|
|
9
10
|
TrainMLException,
|
|
10
11
|
)
|
|
11
12
|
|
|
13
|
+
class SERVICE_CERT_ALGORITHMS(str, Enum):
|
|
14
|
+
RSA_2048 = 'rsa2048'
|
|
15
|
+
RSA_4096 = 'rsa4096'
|
|
16
|
+
ED25519 = 'ed25519'
|
|
17
|
+
P256 = 'p256'
|
|
18
|
+
P384 ='p384'
|
|
19
|
+
P521='p521'
|
|
20
|
+
|
|
12
21
|
|
|
13
22
|
class Services(object):
|
|
14
23
|
def __init__(self, trainml):
|
|
@@ -178,11 +187,12 @@ class Service:
|
|
|
178
187
|
|
|
179
188
|
raise TrainMLException(f"Timeout waiting for {status}")
|
|
180
189
|
|
|
181
|
-
async def generate_certificate(self, **kwargs):
|
|
190
|
+
async def generate_certificate(self, algorithm=SERVICE_CERT_ALGORITHMS.ED25519.value, **kwargs):
|
|
182
191
|
resp = await self.trainml._query(
|
|
183
192
|
f"/provider/{self._provider_uuid}/region/{self._region_uuid}/service/{self._id}/certificate",
|
|
184
193
|
"POST",
|
|
185
|
-
kwargs
|
|
194
|
+
kwargs,
|
|
195
|
+
dict(algorithm=algorithm)
|
|
186
196
|
)
|
|
187
197
|
self.__init__(self.trainml, **resp)
|
|
188
198
|
return self
|
trainml/projects/projects.py
CHANGED
|
@@ -27,10 +27,10 @@ class Projects(object):
|
|
|
27
27
|
projects = [Project(self.trainml, **project) for project in resp]
|
|
28
28
|
return projects
|
|
29
29
|
|
|
30
|
-
async def create(self, name,
|
|
30
|
+
async def create(self, name, **kwargs):
|
|
31
31
|
data = dict(
|
|
32
32
|
name=name,
|
|
33
|
-
|
|
33
|
+
**kwargs
|
|
34
34
|
)
|
|
35
35
|
payload = {k: v for k, v in data.items() if v is not None}
|
|
36
36
|
logging.info(f"Creating Project {name}")
|
|
@@ -77,8 +77,8 @@ tests/unit/projects/test_project_datastores_unit.py,sha256=kcoaSs54gGqJ9gwPMpP6K
|
|
|
77
77
|
tests/unit/projects/test_project_members_unit.py,sha256=C5N6jzT7zM3eL3_bXEddddBHPFJ3617T0lYluBjMy78,3466
|
|
78
78
|
tests/unit/projects/test_project_secrets_unit.py,sha256=StVlY-ZR3CKxXAt9NL8hTkXUEdgGESH0m6foEPXKE-4,3276
|
|
79
79
|
tests/unit/projects/test_project_services_unit.py,sha256=ZK5nz78RAmmaCrAwYBd34t87dh6etU-7snLB_xukZHM,3331
|
|
80
|
-
tests/unit/projects/test_projects_unit.py,sha256=
|
|
81
|
-
trainml/__init__.py,sha256=
|
|
80
|
+
tests/unit/projects/test_projects_unit.py,sha256=S4ydA9JLgGzFwaY4b30YJF0Pl6Iog4ZdzQmHpLy_UEA,3786
|
|
81
|
+
trainml/__init__.py,sha256=an9i7gL01ZrVyaS0RF03wAeRJuWpgA1MgE8-tcwrH1c,433
|
|
82
82
|
trainml/__main__.py,sha256=JgErYkiskih8Y6oRwowALtR-rwQhAAdqOYWjQraRIPI,59
|
|
83
83
|
trainml/auth.py,sha256=clbx5S5prJ3u62aEESdBXIHF_HmreQ-L1ShxcyWQNDs,26565
|
|
84
84
|
trainml/checkpoints.py,sha256=Hg3_Si7ohzsv4_8JIjoj9pMRpHNZRWKC5R2gtgmp01s,8790
|
|
@@ -124,18 +124,18 @@ trainml/cloudbender/devices.py,sha256=QORNmKdLJoqGZmeWXRnivC1JmNBIw-ebvf4bsoem3r
|
|
|
124
124
|
trainml/cloudbender/nodes.py,sha256=U2sTIL2fuBVsNFPsJrvB2JbBcuLULF1-AwJ4dp5ChmM,5924
|
|
125
125
|
trainml/cloudbender/providers.py,sha256=22ymUl1KLC8UlyoWMsIrOKhUDOwnhklhHQ3EZ_V6eWA,3738
|
|
126
126
|
trainml/cloudbender/regions.py,sha256=nfSY9fIWp_AaRE_1Y0qwXX6WVSyPKxpji-zUfM3BNUo,5157
|
|
127
|
-
trainml/cloudbender/services.py,sha256=
|
|
127
|
+
trainml/cloudbender/services.py,sha256=j--8V_JtzhOrWDFXcuyQCZoSdxYKaNtpxTV9qTsva5E,6051
|
|
128
128
|
trainml/projects/__init__.py,sha256=6NKCcHtQMeGB1IyU-djANphfnDX6MEkrXUM5Fyq9fWg,75
|
|
129
129
|
trainml/projects/credentials.py,sha256=6WqHy_-SZZwqE4rULLF8gSyeRVmfsUxqZBuCjBXyxKw,2255
|
|
130
130
|
trainml/projects/data_connectors.py,sha256=WZATdUq4vE3x47Ny5HDwPD7lIUx0syjaSE9BmFWNuEg,2216
|
|
131
131
|
trainml/projects/datastores.py,sha256=qocqD5mGfm2V_wh36CEh3oldnIeJg57ppc6CM129Dkk,2095
|
|
132
132
|
trainml/projects/members.py,sha256=7fptZ2leIQEUiRtvd3z15RTOJyPafzc5wwQLNxICElQ,2826
|
|
133
|
-
trainml/projects/projects.py,sha256=
|
|
133
|
+
trainml/projects/projects.py,sha256=0GIKLV1ZTP_LY9bvXKwiDe_I10YkVAhDUlc4AbdDFVM,2840
|
|
134
134
|
trainml/projects/secrets.py,sha256=TIvBd3rAvd4lF3pm5qR98UslHjldzlnzn_n9yvpmLgg,2160
|
|
135
135
|
trainml/projects/services.py,sha256=rI-uFmojqOTNLbqBeX6gaSwMkI6LKzRuJthQCH0A2h4,2771
|
|
136
|
-
trainml-0.5.
|
|
137
|
-
trainml-0.5.
|
|
138
|
-
trainml-0.5.
|
|
139
|
-
trainml-0.5.
|
|
140
|
-
trainml-0.5.
|
|
141
|
-
trainml-0.5.
|
|
136
|
+
trainml-0.5.17.dist-info/LICENSE,sha256=s0lpBxhSSUEpMavwde-Vb6K_K7xDCTTvSpNznVqVGR0,1069
|
|
137
|
+
trainml-0.5.17.dist-info/METADATA,sha256=MQaZfpWnJ7BtkOW4AEAk28YuwWgcpIrsTJgr0G1buLE,7346
|
|
138
|
+
trainml-0.5.17.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
|
|
139
|
+
trainml-0.5.17.dist-info/entry_points.txt,sha256=OzBDm2wXby1bSGF02jTVxzRFZLejnbFiLHXhKdW3Bds,63
|
|
140
|
+
trainml-0.5.17.dist-info/top_level.txt,sha256=Y1kLFRWKUW7RG8BX7cvejHF_yW8wBOaRYF1JQHENY4w,23
|
|
141
|
+
trainml-0.5.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|