trainml 0.5.12__py3-none-any.whl → 0.5.13__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.
@@ -175,7 +175,7 @@ class JobAPIResourceValidationTests:
175
175
  disk_size=10,
176
176
  )
177
177
  assert (
178
- "Invalid Request - None (CPU Only) may be not be combined with other GPU Types"
178
+ "Invalid Request - CPU Only may be not be combined with other GPU Types"
179
179
  in error.value.message
180
180
  )
181
181
 
trainml/__init__.py CHANGED
@@ -13,5 +13,5 @@ logging.basicConfig(
13
13
  logger = logging.getLogger(__name__)
14
14
 
15
15
 
16
- __version__ = "0.5.12"
16
+ __version__ = "0.5.13"
17
17
  __all__ = "TrainML"
@@ -7,6 +7,12 @@ class ProjectDataConnectors(object):
7
7
  self.trainml = trainml
8
8
  self.project_id = project_id
9
9
 
10
+ async def get(self, id, **kwargs):
11
+ resp = await self.trainml._query(
12
+ f"/project/{self.project_id}/data_connectors/{id}", "GET", kwargs
13
+ )
14
+ return ProjectDataConnector(self.trainml, **resp)
15
+
10
16
  async def list(self, **kwargs):
11
17
  resp = await self.trainml._query(
12
18
  f"/project/{self.project_id}/data_connectors", "GET", kwargs
@@ -61,3 +67,13 @@ class ProjectDataConnector:
61
67
 
62
68
  def __bool__(self):
63
69
  return bool(self._id)
70
+
71
+ async def enable(self):
72
+ await self.trainml._query(
73
+ f"/project/{self._project_uuid}/data_connectors/{self._id}/enable", "PATCH"
74
+ )
75
+
76
+ async def disable(self):
77
+ await self.trainml._query(
78
+ f"/project/{self._project_uuid}/data_connectors/{self._id}/disable", "PATCH"
79
+ )
@@ -7,6 +7,12 @@ class ProjectDatastores(object):
7
7
  self.trainml = trainml
8
8
  self.project_id = project_id
9
9
 
10
+ async def get(self, id, **kwargs):
11
+ resp = await self.trainml._query(
12
+ f"/project/{self.project_id}/datastores/{id}", "GET", kwargs
13
+ )
14
+ return ProjectDatastore(self.trainml, **resp)
15
+
10
16
  async def list(self, **kwargs):
11
17
  resp = await self.trainml._query(
12
18
  f"/project/{self.project_id}/datastores", "GET", kwargs
@@ -56,3 +62,13 @@ class ProjectDatastore:
56
62
 
57
63
  def __bool__(self):
58
64
  return bool(self._id)
65
+
66
+ async def enable(self):
67
+ await self.trainml._query(
68
+ f"/project/{self._project_uuid}/datastores/{self._id}/enable", "PATCH"
69
+ )
70
+
71
+ async def disable(self):
72
+ await self.trainml._query(
73
+ f"/project/{self._project_uuid}/datastores/{self._id}/disable", "PATCH"
74
+ )
@@ -7,6 +7,12 @@ class ProjectServices(object):
7
7
  self.trainml = trainml
8
8
  self.project_id = project_id
9
9
 
10
+ async def get(self, id, **kwargs):
11
+ resp = await self.trainml._query(
12
+ f"/project/{self.project_id}/services/{id}", "GET", kwargs
13
+ )
14
+ return ProjectService(self.trainml, **resp)
15
+
10
16
  async def list(self, **kwargs):
11
17
  resp = await self.trainml._query(
12
18
  f"/project/{self.project_id}/services", "GET", kwargs
@@ -61,3 +67,13 @@ class ProjectService:
61
67
 
62
68
  def __bool__(self):
63
69
  return bool(self._id)
70
+
71
+ async def enable(self):
72
+ await self.trainml._query(
73
+ f"/project/{self._project_uuid}/services/{self._id}/enable", "PATCH"
74
+ )
75
+
76
+ async def disable(self):
77
+ await self.trainml._query(
78
+ f"/project/{self._project_uuid}/services/{self._id}/disable", "PATCH"
79
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trainml
3
- Version: 0.5.12
3
+ Version: 0.5.13
4
4
  Summary: trainML client SDK and command line utilities
5
5
  Home-page: https://github.com/trainML/trainml-cli
6
6
  Author: trainML
@@ -8,7 +8,7 @@ tests/integration/test_checkpoints_integration.py,sha256=Giy5Z6WyselfXzskDGR7Z0k
8
8
  tests/integration/test_datasets_integration.py,sha256=zdHOevduuMUWvVxaHBslpmH8AdvPdqEJ95MdqCC5_rw,3499
9
9
  tests/integration/test_environments_integration.py,sha256=0IckhJvQhd8j4Ouiu0hMq2b7iA1dbZpZYmknyfWjsFM,1403
10
10
  tests/integration/test_gpu_types_integration.py,sha256=V2OncokZWWVq_l5FSmKEDM4EsWrmpB-zKiVPt-we0aY,1256
11
- tests/integration/test_jobs_integration.py,sha256=N2peEQGYHteGMd0J7NK4gJaaTyps5jjuiKq2ENnD8SY,25117
11
+ tests/integration/test_jobs_integration.py,sha256=vj-lINOzprUBj61F4i4CBe64MmT0HCDDsPneYsulv3I,25110
12
12
  tests/integration/test_models_integration.py,sha256=u6KVnX-F00TqwiU-gEoZJP1oKfAblqnyRptOc9vNGJ4,2878
13
13
  tests/integration/test_volumes_integration.py,sha256=gOmZpwwFxqeOAVmfKWSTmuyshx8nb2zu_0xv1RUEepM,3270
14
14
  tests/integration/cloudbender/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -76,7 +76,7 @@ tests/unit/projects/test_project_keys_unit.py,sha256=2-w_VwmWxWHoLWBCoBAfg5Wozye
76
76
  tests/unit/projects/test_project_secrets_unit.py,sha256=StVlY-ZR3CKxXAt9NL8hTkXUEdgGESH0m6foEPXKE-4,3276
77
77
  tests/unit/projects/test_project_services_unit.py,sha256=ZK5nz78RAmmaCrAwYBd34t87dh6etU-7snLB_xukZHM,3331
78
78
  tests/unit/projects/test_projects_unit.py,sha256=8rJ40bJ7YszEsoL6D02Muey-sgRjqFmMoR-R3IiP_Ig,3810
79
- trainml/__init__.py,sha256=d6QltDwIOAM07aLFV02nUTwJs2OHntDpB_2JTwimxPM,433
79
+ trainml/__init__.py,sha256=KVgJtJhufpHLxSIxc6VgC9rtBlScxurtZsM8FibfA3o,433
80
80
  trainml/__main__.py,sha256=JgErYkiskih8Y6oRwowALtR-rwQhAAdqOYWjQraRIPI,59
81
81
  trainml/auth.py,sha256=gruZv27nhttrCbhcVQTH9kZkF2uMm1E06SwA_2pQAHQ,26565
82
82
  trainml/checkpoints.py,sha256=Hg3_Si7ohzsv4_8JIjoj9pMRpHNZRWKC5R2gtgmp01s,8790
@@ -126,15 +126,15 @@ trainml/cloudbender/regions.py,sha256=nfSY9fIWp_AaRE_1Y0qwXX6WVSyPKxpji-zUfM3BNU
126
126
  trainml/cloudbender/services.py,sha256=KC3VcyljvnazUUG-Tzwm6Ab6d0--yuccXjOaMgYB5uA,5126
127
127
  trainml/projects/__init__.py,sha256=6NKCcHtQMeGB1IyU-djANphfnDX6MEkrXUM5Fyq9fWg,75
128
128
  trainml/projects/credentials.py,sha256=6WqHy_-SZZwqE4rULLF8gSyeRVmfsUxqZBuCjBXyxKw,2255
129
- trainml/projects/data_connectors.py,sha256=Y8lJNF9K5JZlwfKTtN9gh7eSRAivgiPWe_lx05pGM2U,1662
130
- trainml/projects/datastores.py,sha256=oyRffW8L7Z1tdqspl58Zf1ces0p-Stk0EbnMRaenkUw,1560
129
+ trainml/projects/data_connectors.py,sha256=WZATdUq4vE3x47Ny5HDwPD7lIUx0syjaSE9BmFWNuEg,2216
130
+ trainml/projects/datastores.py,sha256=qocqD5mGfm2V_wh36CEh3oldnIeJg57ppc6CM129Dkk,2095
131
131
  trainml/projects/keys.py,sha256=qcQAdysTbfVW19tzzxZDvBBWjU9DG0dkViLmG_S0SyM,2157
132
132
  trainml/projects/projects.py,sha256=0ZghShqjbs5swfn3BsLrMW2NzrdBXpf_M-nyzwYPjpM,2792
133
133
  trainml/projects/secrets.py,sha256=TIvBd3rAvd4lF3pm5qR98UslHjldzlnzn_n9yvpmLgg,2160
134
- trainml/projects/services.py,sha256=ZP-6CDXktIe6p89Hshgs91HLWXQPNWeU7VFtoKUPHXo,1679
135
- trainml-0.5.12.dist-info/LICENSE,sha256=s0lpBxhSSUEpMavwde-Vb6K_K7xDCTTvSpNznVqVGR0,1069
136
- trainml-0.5.12.dist-info/METADATA,sha256=mSnptclEuyJVSgkesMzkAYxYITGsfkzwZXM-PkyYzPk,7346
137
- trainml-0.5.12.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
138
- trainml-0.5.12.dist-info/entry_points.txt,sha256=OzBDm2wXby1bSGF02jTVxzRFZLejnbFiLHXhKdW3Bds,63
139
- trainml-0.5.12.dist-info/top_level.txt,sha256=Y1kLFRWKUW7RG8BX7cvejHF_yW8wBOaRYF1JQHENY4w,23
140
- trainml-0.5.12.dist-info/RECORD,,
134
+ trainml/projects/services.py,sha256=W2IHgRUT9BemWThsY7uAot2gbmyPaH41WAii-NQ_cT8,2206
135
+ trainml-0.5.13.dist-info/LICENSE,sha256=s0lpBxhSSUEpMavwde-Vb6K_K7xDCTTvSpNznVqVGR0,1069
136
+ trainml-0.5.13.dist-info/METADATA,sha256=8BjIAywdzYBrUOb_k6PkSdc20fFaVW7pUEKiOPqHzf4,7346
137
+ trainml-0.5.13.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
138
+ trainml-0.5.13.dist-info/entry_points.txt,sha256=OzBDm2wXby1bSGF02jTVxzRFZLejnbFiLHXhKdW3Bds,63
139
+ trainml-0.5.13.dist-info/top_level.txt,sha256=Y1kLFRWKUW7RG8BX7cvejHF_yW8wBOaRYF1JQHENY4w,23
140
+ trainml-0.5.13.dist-info/RECORD,,