trainwave-cli 0.1.2__tar.gz → 0.1.4__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: trainwave-cli
3
- Version: 0.1.2
3
+ Version: 0.1.4
4
4
  Summary:
5
5
  Author: Johan Backman
6
6
  Author-email: johan@trainwave.ai
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "trainwave-cli"
3
- version = "0.1.2"
3
+ version = "0.1.4"
4
4
  description = ""
5
5
  authors = ["Johan Backman <johan@trainwave.ai>"]
6
6
  readme = "README.md"
@@ -35,6 +35,7 @@ class Job:
35
35
  project: str
36
36
  upload_url: str
37
37
  cloud_offer: CloudOffer
38
+ cost_per_hour: float
38
39
 
39
40
 
40
41
  @dataclass(frozen=True)
@@ -45,7 +45,7 @@ async def launch( # noqa
45
45
  cpus: Annotated[int, typer.Option()] = 0,
46
46
  gpus: Annotated[int, typer.Option()] = 0,
47
47
  gpu_type: Annotated[str, typer.Option()] = "",
48
- compliance_soc2: Annotated[bool, typer.Option()] = False,
48
+ compliance_soc2: Annotated[bool, typer.Option()] = None,
49
49
  ) -> None:
50
50
  api_client = Api(config.api_key, config.endpoint, project)
51
51
  # Interpolate environe variables
@@ -69,8 +69,9 @@ async def launch( # noqa
69
69
  "gpus": gpus,
70
70
  "gpu_type": gpu_type,
71
71
  "env_vars": env_vars,
72
- "compliance_soc2": compliance_soc2,
73
72
  }
73
+ if compliance_soc2 is not None:
74
+ conf["compliance_soc2"] = compliance_soc2
74
75
 
75
76
  if expires != "":
76
77
  expires_time = pytimeparse.parse(expires)
@@ -111,6 +112,7 @@ async def launch( # noqa
111
112
  "value": [truncate_string(str(co[k]), 50) for k in tab_keys],
112
113
  }
113
114
  logger.info("\nMatched machine\n" + tabulate(tab_values, headers="keys") + "\n")
115
+ logger.info(f"Cost per hour for this job: ${job.cost_per_hour:.2f}")
114
116
  logger.info(f"Job created: {job.rid} ({job.id})")
115
117
  except Exception as e:
116
118
  traceback.print_exc()
File without changes