dayhoff-tools 1.13.3__tar.gz → 1.13.5__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.
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/PKG-INFO +1 -1
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/api_client.py +13 -2
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/engine_commands.py +42 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/pyproject.toml +1 -1
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/README.md +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/__init__.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/chemistry/standardizer.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/chemistry/utils.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/__init__.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/cloud_commands.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/__init__.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/engine_core.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/engine_lifecycle.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/engine_maintenance.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/engine_management.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/shared.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/studio_commands.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/__init__.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/auth.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/engine-studio-cli.md +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/progress.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/cli-simulators.md +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/demo.sh +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/engine_list_simulator.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/engine_status_simulator.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/idle_status_simulator.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/simulator_utils.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/studio_list_simulator.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/studio_status_simulator.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/studio_commands.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/main.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/swarm_commands.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/utility_commands.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/deployment/base.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/deployment/deploy_aws.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/deployment/deploy_gcp.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/deployment/deploy_utils.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/deployment/job_runner.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/deployment/processors.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/deployment/swarm.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/embedders.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/fasta.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/file_ops.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/h5.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/intake/gcp.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/intake/gtdb.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/intake/kegg.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/intake/mmseqs.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/intake/structure.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/intake/uniprot.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/logs.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/sqlite.py +0 -0
- {dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/warehouse.py +0 -0
{dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/api_client.py
RENAMED
|
@@ -116,11 +116,22 @@ class StudioManagerClient:
|
|
|
116
116
|
Response JSON
|
|
117
117
|
|
|
118
118
|
Raises:
|
|
119
|
-
|
|
119
|
+
RuntimeError: If request fails with error message from API
|
|
120
120
|
"""
|
|
121
121
|
url = f"{self.api_url}{path}"
|
|
122
122
|
response = requests.request(method, url, **kwargs)
|
|
123
|
-
|
|
123
|
+
|
|
124
|
+
# Parse error body if request failed
|
|
125
|
+
if not response.ok:
|
|
126
|
+
try:
|
|
127
|
+
error_body = response.json()
|
|
128
|
+
error_message = error_body.get("error", response.text)
|
|
129
|
+
except Exception:
|
|
130
|
+
error_message = response.text or f"HTTP {response.status_code}"
|
|
131
|
+
|
|
132
|
+
# Raise exception with the actual error message from API
|
|
133
|
+
raise RuntimeError(error_message)
|
|
134
|
+
|
|
124
135
|
return response.json()
|
|
125
136
|
|
|
126
137
|
# Engine operations
|
{dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/engine_commands.py
RENAMED
|
@@ -212,6 +212,48 @@ def launch_engine(
|
|
|
212
212
|
click.echo(f" dh engine status {name}")
|
|
213
213
|
|
|
214
214
|
except Exception as e:
|
|
215
|
+
error_msg = str(e)
|
|
216
|
+
|
|
217
|
+
# Check for quota/limit errors
|
|
218
|
+
if "VcpuLimitExceeded" in error_msg or "vCPU limit" in error_msg:
|
|
219
|
+
click.echo(f"✗ Failed to launch engine: vCPU quota exceeded", err=True)
|
|
220
|
+
click.echo("", err=True)
|
|
221
|
+
click.echo(f"The {env} AWS account has insufficient vCPU quota for {engine_type} instances.", err=True)
|
|
222
|
+
click.echo("", err=True)
|
|
223
|
+
click.echo("Solutions:", err=True)
|
|
224
|
+
click.echo(" 1. Use a different instance type (e.g., --type cpu)", err=True)
|
|
225
|
+
click.echo(" 2. Request a quota increase:", err=True)
|
|
226
|
+
click.echo(" • AWS Console → Service Quotas → Amazon EC2", err=True)
|
|
227
|
+
click.echo(" • Find quota for the instance family", err=True)
|
|
228
|
+
click.echo(" • Request increase (typically approved within 24h)", err=True)
|
|
229
|
+
click.echo("", err=True)
|
|
230
|
+
click.echo("For testing infrastructure, use CPU instances instead of GPU.", err=True)
|
|
231
|
+
raise click.Abort()
|
|
232
|
+
|
|
233
|
+
# Check for insufficient capacity errors
|
|
234
|
+
if "InsufficientInstanceCapacity" in error_msg:
|
|
235
|
+
click.echo(f"✗ Failed to launch engine: insufficient EC2 capacity", err=True)
|
|
236
|
+
click.echo("", err=True)
|
|
237
|
+
click.echo(f"AWS does not have available {engine_type} capacity in your region/AZ.", err=True)
|
|
238
|
+
click.echo("", err=True)
|
|
239
|
+
click.echo("Solutions:", err=True)
|
|
240
|
+
click.echo(" 1. Try again in a few minutes (capacity fluctuates)", err=True)
|
|
241
|
+
click.echo(" 2. Use a different instance type", err=True)
|
|
242
|
+
click.echo(" 3. Contact AWS support for capacity reservations", err=True)
|
|
243
|
+
raise click.Abort()
|
|
244
|
+
|
|
245
|
+
# Check for instance limit errors
|
|
246
|
+
if "InstanceLimitExceeded" in error_msg or "instance limit" in error_msg.lower():
|
|
247
|
+
click.echo(f"✗ Failed to launch engine: instance limit exceeded", err=True)
|
|
248
|
+
click.echo("", err=True)
|
|
249
|
+
click.echo(f"You have reached the maximum number of running instances in {env}.", err=True)
|
|
250
|
+
click.echo("", err=True)
|
|
251
|
+
click.echo("Solutions:", err=True)
|
|
252
|
+
click.echo(" 1. Terminate unused engines: dh engine2 list --env {env}", err=True)
|
|
253
|
+
click.echo(" 2. Request a limit increase via AWS Service Quotas", err=True)
|
|
254
|
+
raise click.Abort()
|
|
255
|
+
|
|
256
|
+
# Generic error
|
|
215
257
|
click.echo(f"✗ Failed to launch engine: {e}", err=True)
|
|
216
258
|
raise click.Abort()
|
|
217
259
|
|
|
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "dayhoff-tools"
|
|
8
|
-
version = "1.13.
|
|
8
|
+
version = "1.13.5"
|
|
9
9
|
description = "Common tools for all the repos at Dayhoff Labs"
|
|
10
10
|
authors = [
|
|
11
11
|
{name = "Daniel Martin-Alarcon", email = "dma@dayhofflabs.com"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/engine_maintenance.py
RENAMED
|
File without changes
|
{dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engine1/engine_management.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/engine-studio-cli.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/simulators/demo.sh
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dayhoff_tools-1.13.3 → dayhoff_tools-1.13.5}/dayhoff_tools/cli/engines_studios/studio_commands.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|