trainml 0.5.1__py3-none-any.whl → 0.5.2__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.
@@ -191,8 +191,7 @@ class JobAPIResourceValidationTests:
191
191
  disk_size=10,
192
192
  )
193
193
  assert (
194
- "Invalid Request - CPU Count must be a multiple of 4"
195
- in error.value.message
194
+ "Invalid Request - CPU Count must be a multiple of 4" in error.value.message
196
195
  )
197
196
 
198
197
  async def test_invalid_gpu_count_for_cpu(self, trainml):
@@ -431,7 +430,7 @@ class JobIOTests:
431
430
  source_uri="git@github.com:trainML/environment-tests.git",
432
431
  )
433
432
  await model.wait_for("ready", 300)
434
- assert model.size >= 500000
433
+ assert model.size >= 200000
435
434
 
436
435
  job = await trainml.jobs.create(
437
436
  "CLI Automated Tests - Training With trainML Model Output",
@@ -588,10 +587,7 @@ class JobTypeTests:
588
587
  sys.stderr.write(captured.err)
589
588
  assert "Epoch 1/2" in captured.out
590
589
  assert "Epoch 2/2" in captured.out
591
- assert (
592
- "Uploading s3://trainml-example/output/resnet_cifar10"
593
- in captured.out
594
- )
590
+ assert "Uploading s3://trainml-example/output/resnet_cifar10" in captured.out
595
591
  assert (
596
592
  "upload: ./model.ckpt-0002.data-00000-of-00001 to s3://trainml-example/output/resnet_cifar10/model.ckpt-0002.data-00000-of-00001"
597
593
  in captured.out
trainml/__init__.py CHANGED
@@ -13,5 +13,5 @@ logging.basicConfig(
13
13
  logger = logging.getLogger(__name__)
14
14
 
15
15
 
16
- __version__ = "0.5.1"
16
+ __version__ = "0.5.2"
17
17
  __all__ = "TrainML"
trainml/cli/dataset.py CHANGED
@@ -252,9 +252,7 @@ def rename(config, dataset, name):
252
252
  DATASET may be specified by name or ID, but ID is preferred.
253
253
  """
254
254
  try:
255
- dataset = config.trainml.run(
256
- config.trainml.client.datasets.get(dataset)
257
- )
255
+ dataset = config.trainml.run(config.trainml.client.datasets.get(dataset))
258
256
  if dataset is None:
259
257
  raise click.UsageError("Cannot find specified dataset.")
260
258
  except:
trainml/cli/job/create.py CHANGED
@@ -683,7 +683,7 @@ def training(
683
683
  config.trainml.client.jobs.create(
684
684
  name=name,
685
685
  type="training",
686
- gpu_type=gpu_type,
686
+ gpu_types=gpu_type,
687
687
  cpu_count=cpu_count,
688
688
  disk_size=disk_size,
689
689
  workers=[command for command in commands],
@@ -1021,7 +1021,7 @@ def inference(
1021
1021
  config.trainml.client.jobs.create(
1022
1022
  name=name,
1023
1023
  type="inference",
1024
- gpu_type=gpu_type,
1024
+ gpu_types=gpu_type,
1025
1025
  cpu_count=cpu_count,
1026
1026
  disk_size=disk_size,
1027
1027
  workers=[command],
@@ -1330,7 +1330,7 @@ def endpoint(
1330
1330
  config.trainml.client.jobs.create(
1331
1331
  name=name,
1332
1332
  type="endpoint",
1333
- gpu_type=gpu_type,
1333
+ gpu_types=gpu_type,
1334
1334
  cpu_count=cpu_count,
1335
1335
  disk_size=disk_size,
1336
1336
  endpoint=dict(routes=routes),
trainml/datasets.py CHANGED
@@ -37,8 +37,7 @@ class Datasets(object):
37
37
  source_type=source_type,
38
38
  source_uri=source_uri,
39
39
  source_options=kwargs.get("source_options"),
40
- project_uuid=kwargs.get("project_uuid")
41
- or self.trainml.active_project,
40
+ project_uuid=kwargs.get("project_uuid") or self.trainml.active_project,
42
41
  )
43
42
  payload = {k: v for k, v in data.items() if v is not None}
44
43
  logging.info(f"Creating Dataset {name}")
@@ -119,9 +118,7 @@ class Dataset:
119
118
  entity_type="dataset",
120
119
  project_uuid=self._dataset.get("project_uuid"),
121
120
  cidr=self._dataset.get("vpn").get("cidr"),
122
- ssh_port=self._dataset.get("vpn")
123
- .get("client")
124
- .get("ssh_port"),
121
+ ssh_port=self._dataset.get("vpn").get("client").get("ssh_port"),
125
122
  input_path=self._dataset.get("source_uri")
126
123
  if self.status in ["new", "downloading"]
127
124
  else None,
@@ -191,9 +188,7 @@ class Dataset:
191
188
  if msg_handler:
192
189
  msg_handler(data)
193
190
  else:
194
- timestamp = datetime.fromtimestamp(
195
- int(data.get("time")) / 1000
196
- )
191
+ timestamp = datetime.fromtimestamp(int(data.get("time")) / 1000)
197
192
  print(
198
193
  f"{timestamp.strftime('%m/%d/%Y, %H:%M:%S')}: {data.get('msg').rstrip()}"
199
194
  )
@@ -230,9 +225,7 @@ class Dataset:
230
225
  return
231
226
  POLL_INTERVAL_MIN = 5
232
227
  POLL_INTERVAL_MAX = 60
233
- POLL_INTERVAL = max(
234
- min(timeout / 60, POLL_INTERVAL_MAX), POLL_INTERVAL_MIN
235
- )
228
+ POLL_INTERVAL = max(min(timeout / 60, POLL_INTERVAL_MAX), POLL_INTERVAL_MIN)
236
229
  retry_count = math.ceil(timeout / POLL_INTERVAL)
237
230
  count = 0
238
231
  while count < retry_count:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trainml
3
- Version: 0.5.1
3
+ Version: 0.5.2
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=Ev-GxXiBupOi3KduYoEMhb2
8
8
  tests/integration/test_datasets_integration.py,sha256=jskX8y9moLvAkZLcQL4iSBrUXSGGuWJ95Vw1JuxxwD8,3424
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=t29P_0PZ02-Q0PYTuNidtdBtwOd0a4BzXA1BfK8HwYM,23390
11
+ tests/integration/test_jobs_integration.py,sha256=0fMg7kOjQMotEo40XnerAamqhhRbb4pz0ZhmvVrwlb0,23342
12
12
  tests/integration/test_models_integration.py,sha256=xJPq_3m0Cf1liMH8e49ON_L3MO5XcPtJIz_MD9plkyU,2848
13
13
  tests/integration/test_projects_integration.py,sha256=_tmMRFFBe29WaWWuEy3_0j7SKyJc_60JS99hgJUHTG4,1492
14
14
  tests/integration/test_providers_integration.py,sha256=bBVvlSDLCnofSaD36OB21KlinEKeK04gPB--bbHJiP0,1419
@@ -52,12 +52,12 @@ tests/unit/cloudbender/test_nodes_unit.py,sha256=BDpfJXCBNNpLt5rhJMk2BVXDQ_4QSmx
52
52
  tests/unit/cloudbender/test_providers_unit.py,sha256=OgxifgC1IqLH8DNMKXy1Ne9_7a75ea6kHEOfRSRoQuQ,4373
53
53
  tests/unit/cloudbender/test_regions_unit.py,sha256=BbJICLIQmlotpA1UmLD0KTW_H9g2UW0J8ZYzQk1_Xjc,6299
54
54
  tests/unit/cloudbender/test_reservations_unit.py,sha256=nWEZ_p9EF2C49nbgL7Dt4NG2Irmyt94ZqJJQDyNfGFI,5624
55
- trainml/__init__.py,sha256=h4BeL02NVFF0n43SUBLYYeohKlt89pEwAJC0EyPMNo4,432
55
+ trainml/__init__.py,sha256=PACqklwvG2CiPJqOAaEZLAgJyM6nllgNp0p12pqDYUc,432
56
56
  trainml/__main__.py,sha256=JgErYkiskih8Y6oRwowALtR-rwQhAAdqOYWjQraRIPI,59
57
57
  trainml/auth.py,sha256=gruZv27nhttrCbhcVQTH9kZkF2uMm1E06SwA_2pQAHQ,26565
58
58
  trainml/checkpoints.py,sha256=726yaeTHzIPvkQ-BhqmvJ6u0s1Oh732N6UAFbuWEv0Q,8274
59
59
  trainml/connections.py,sha256=h-S1NZbOkaXpIlpRStA6q-3eXc_OMlFWOLzF8R9SVG8,20029
60
- trainml/datasets.py,sha256=E6wZbZQUxKnID5o9wGOL3XyWYl6SLU9s1BFhHcCMe9A,8049
60
+ trainml/datasets.py,sha256=5zhxpmK12aA7iXp4n-8bD00Tie7bi3LU0tPNJKdnZlY,7935
61
61
  trainml/environments.py,sha256=OH4o08zXZ7IJ2CiA1rPnys2Fl45r8qvQHfM2mCBRAIc,1507
62
62
  trainml/exceptions.py,sha256=hhR78fI8rbU3fWQ-kUsgxOLyYP8D2bQcjLjrskqPG0Q,3724
63
63
  trainml/gpu_types.py,sha256=mm-dwfYc02192bmYPIJmzesndyBcoOdkKYBaYZXOUwU,1901
@@ -69,7 +69,7 @@ trainml/trainml.py,sha256=OrDXkJiStA_fTkwl0HX529n-cPCQUTVfdMOX-w0u1Oo,11045
69
69
  trainml/cli/__init__.py,sha256=-lA19Djkvqr1I-5PWoONgzHia-Lkg0J45dzt7qbetD8,4338
70
70
  trainml/cli/checkpoint.py,sha256=8Rh4bmFwJ4DKlIjHK-FLTeRynABqKCgIUGRtbQhAsX4,7170
71
71
  trainml/cli/connection.py,sha256=ELV6bPL30dzttFNxDU7Fb74R8oPL_E70k7TcJEzbwtQ,1700
72
- trainml/cli/dataset.py,sha256=joVsNxnCw23s1T6rTJMJeYRFHM-EIWmKFMsB7YyY1zs,6893
72
+ trainml/cli/dataset.py,sha256=Pc00M6t7hGoRzCxznmmkijsWhG4PhIfG7UkrwtwykTY,6871
73
73
  trainml/cli/environment.py,sha256=dfm_T8OlCM5M8dLyOQBapJl3eFuVIku2P4JO6V0cYVQ,1019
74
74
  trainml/cli/gpu.py,sha256=CMcQyl2qbUgc2bc-gvUVT6X7bq2-sgiCHl3hyZ6kFWM,883
75
75
  trainml/cli/job.py,sha256=Xh_542a2rjAjhXyq8WG9ZEySboq_MmFQ7sCqYJYRXcM,4302
@@ -84,7 +84,7 @@ trainml/cli/cloudbender/provider.py,sha256=oFjZWKfFQjNY7OtDu7nUdfv-RTmQc_Huuug96
84
84
  trainml/cli/cloudbender/region.py,sha256=X6-FYOb-pGpOEazn-NbsYSwa9ergB7FGATFkTe4a8Pk,2892
85
85
  trainml/cli/cloudbender/reservation.py,sha256=z2oMYwp-w_Keo1DepKUtuRnwiGz2VscVHDYWEFap1gs,3569
86
86
  trainml/cli/job/__init__.py,sha256=ljY-ELeXhXQ7txASbJEKGBom7OXfNyy7sWILz3nxRAE,6545
87
- trainml/cli/job/create.py,sha256=eaHOLRT0_ujp_xuMjWlR5GcSPpJ9x5AoS_Vdn6b55hU,34652
87
+ trainml/cli/job/create.py,sha256=QDxHTSpiAjdnmGxUhBASwSNbL1pYqGoCV12UnB-c4N4,34655
88
88
  trainml/cloudbender/__init__.py,sha256=iE29obtC0_9f0IhRvHQcG5aY58fVhVYipTakpjAhdss,64
89
89
  trainml/cloudbender/cloudbender.py,sha256=rAc93mtMaa3tWLi-NT4tiqO664MCPkhlGG9oNYSmimQ,634
90
90
  trainml/cloudbender/datastores.py,sha256=biVGifedc3r1DcuxsfCQh-f1Tw4HcJMMJfdgHxPfkKM,3506
@@ -94,9 +94,9 @@ trainml/cloudbender/nodes.py,sha256=7HV2VLmxiUcJ-Kc6AAXS3M8C_XO-HKmaVgJpPdVnBQk,
94
94
  trainml/cloudbender/providers.py,sha256=-gkdiTu6Ah2znUuyyc3ZuRALagW8s1-OgqVjtlvc1AU,2036
95
95
  trainml/cloudbender/regions.py,sha256=Aqc_MeLVAeEv21e-lR5u8x1eintqUhZT2DBiQG3AcEE,3570
96
96
  trainml/cloudbender/reservations.py,sha256=rOrGXWIUHON4ad2aufEcvK4Yv_Mv3dDoScUtLJE8LWw,3586
97
- trainml-0.5.1.dist-info/LICENSE,sha256=s0lpBxhSSUEpMavwde-Vb6K_K7xDCTTvSpNznVqVGR0,1069
98
- trainml-0.5.1.dist-info/METADATA,sha256=U_VMwMRjTL0sEefG7o2pS8FNna52-bqDEj9lXzwSOME,7345
99
- trainml-0.5.1.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
100
- trainml-0.5.1.dist-info/entry_points.txt,sha256=OzBDm2wXby1bSGF02jTVxzRFZLejnbFiLHXhKdW3Bds,63
101
- trainml-0.5.1.dist-info/top_level.txt,sha256=Y1kLFRWKUW7RG8BX7cvejHF_yW8wBOaRYF1JQHENY4w,23
102
- trainml-0.5.1.dist-info/RECORD,,
97
+ trainml-0.5.2.dist-info/LICENSE,sha256=s0lpBxhSSUEpMavwde-Vb6K_K7xDCTTvSpNznVqVGR0,1069
98
+ trainml-0.5.2.dist-info/METADATA,sha256=RGNR1MBae8_fsnjuBRWPTi0d2fGR7ctzdSP5YOwC2Og,7345
99
+ trainml-0.5.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
100
+ trainml-0.5.2.dist-info/entry_points.txt,sha256=OzBDm2wXby1bSGF02jTVxzRFZLejnbFiLHXhKdW3Bds,63
101
+ trainml-0.5.2.dist-info/top_level.txt,sha256=Y1kLFRWKUW7RG8BX7cvejHF_yW8wBOaRYF1JQHENY4w,23
102
+ trainml-0.5.2.dist-info/RECORD,,