dh-cli 0.2.4__tar.gz → 0.2.6__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.
Files changed (40) hide show
  1. {dh_cli-0.2.4 → dh_cli-0.2.6}/PKG-INFO +1 -1
  2. {dh_cli-0.2.4 → dh_cli-0.2.6}/pyproject.toml +1 -1
  3. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/aws_batch.py +38 -2
  4. {dh_cli-0.2.4 → dh_cli-0.2.6}/.gitignore +0 -0
  5. {dh_cli-0.2.4 → dh_cli-0.2.6}/LICENSE +0 -0
  6. {dh_cli-0.2.4 → dh_cli-0.2.6}/README.md +0 -0
  7. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/__init__.py +0 -0
  8. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/__init__.py +0 -0
  9. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/__init__.py +0 -0
  10. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/boltz.py +0 -0
  11. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/cancel.py +0 -0
  12. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/clean.py +0 -0
  13. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/embed_t5.py +0 -0
  14. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/finalize.py +0 -0
  15. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/list_jobs.py +0 -0
  16. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/local.py +0 -0
  17. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/logs.py +0 -0
  18. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/retry.py +0 -0
  19. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/status.py +0 -0
  20. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/submit.py +0 -0
  21. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/train.py +0 -0
  22. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/commands/wait_for.py +0 -0
  23. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/fasta_utils.py +0 -0
  24. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/h5_utils.py +0 -0
  25. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/job_id.py +0 -0
  26. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/manifest.py +0 -0
  27. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/batch/s3_transport.py +0 -0
  28. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/cloud_commands.py +0 -0
  29. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/codeartifact.py +0 -0
  30. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/engines_studios/__init__.py +0 -0
  31. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/engines_studios/api_client.py +0 -0
  32. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/engines_studios/auth.py +0 -0
  33. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/engines_studios/engine_commands.py +0 -0
  34. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/engines_studios/progress.py +0 -0
  35. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/engines_studios/ssh_config.py +0 -0
  36. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/engines_studios/studio_commands.py +0 -0
  37. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/github_commands.py +0 -0
  38. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/main.py +0 -0
  39. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/utility_commands.py +0 -0
  40. {dh_cli-0.2.4 → dh_cli-0.2.6}/src/dh_cli/warehouse.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dh-cli
3
- Version: 0.2.4
3
+ Version: 0.2.6
4
4
  Summary: Dayhoff Labs developer CLI
5
5
  Author-email: Dayhoff Labs <dev@dayhofflabs.com>
6
6
  License: # PolyForm Noncommercial License 1.0.0
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "dh-cli"
7
- version = "0.2.4"
7
+ version = "0.2.6"
8
8
  description = "Dayhoff Labs developer CLI"
9
9
  requires-python = ">=3.11"
10
10
  readme = "README.md"
@@ -105,6 +105,11 @@ class BatchClient:
105
105
  BatchError: If submission fails
106
106
  """
107
107
  try:
108
+ if image_override:
109
+ job_definition = self._register_image_override(
110
+ job_definition, image_override
111
+ )
112
+
108
113
  submit_args: dict[str, Any] = {
109
114
  "jobName": job_name,
110
115
  "jobDefinition": job_definition,
@@ -124,8 +129,6 @@ class BatchClient:
124
129
  resource_requirements.append({"type": "GPU", "value": str(gpus)})
125
130
 
126
131
  container_overrides: dict[str, Any] = {}
127
- if image_override:
128
- container_overrides["image"] = image_override
129
132
  if environment:
130
133
  container_overrides["environment"] = [
131
134
  {"name": k, "value": v} for k, v in environment.items()
@@ -156,6 +159,39 @@ class BatchClient:
156
159
  except ClientError as e:
157
160
  raise BatchError(f"Failed to submit job: {e}")
158
161
 
162
+ def _register_image_override(
163
+ self, base_definition: str, image: str
164
+ ) -> str:
165
+ """Register a new revision of a job definition with a custom image.
166
+
167
+ AWS Batch containerOverrides doesn't support an image field, so we
168
+ create a new revision of the base definition with only the image
169
+ changed, preserving all other containerProperties (roles, volumes, etc.).
170
+
171
+ Returns the ARN of the new revision.
172
+ """
173
+ resp = self.batch.describe_job_definitions(
174
+ jobDefinitionName=base_definition, status="ACTIVE"
175
+ )
176
+ definitions = resp.get("jobDefinitions", [])
177
+ if not definitions:
178
+ raise BatchError(
179
+ f"Job definition not found: {base_definition}"
180
+ )
181
+
182
+ latest = sorted(definitions, key=lambda d: d["revision"])[-1]
183
+ container_props = latest["containerProperties"].copy()
184
+ container_props["image"] = image
185
+
186
+ reg_resp = self.batch.register_job_definition(
187
+ jobDefinitionName=base_definition,
188
+ type=latest.get("type", "container"),
189
+ containerProperties=container_props,
190
+ )
191
+ arn = reg_resp["jobDefinitionArn"]
192
+ logger.info(f"Registered job definition {arn} with image {image}")
193
+ return arn
194
+
159
195
  def submit_array_job_with_indices(
160
196
  self,
161
197
  job_name: str,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes