wisent-compute 0.4.332__tar.gz → 0.4.334__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 (99) hide show
  1. {wisent_compute-0.4.332/wisent_compute.egg-info → wisent_compute-0.4.334}/PKG-INFO +1 -1
  2. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/pyproject.toml +1 -1
  3. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/host_health_beacon.sh +1 -1
  4. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/templates/wisent-host-health.service.tmpl +0 -1
  5. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/disk/staging.py +30 -0
  6. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/version_check.py +14 -8
  7. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local_agent.py +2 -7
  8. {wisent_compute-0.4.332 → wisent_compute-0.4.334/wisent_compute.egg-info}/PKG-INFO +1 -1
  9. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/LICENSE +0 -0
  10. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/README.md +0 -0
  11. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/setup.cfg +0 -0
  12. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/__init__.py +0 -0
  13. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/_catalog/__init__.py +0 -0
  14. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/_catalog/gpu_sku.py +0 -0
  15. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/cli.py +0 -0
  16. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/cloud_function/__init__.py +0 -0
  17. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/cloud_function/main.py +0 -0
  18. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/config.py +0 -0
  19. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/coordinator.py +0 -0
  20. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/coverage/__init__.py +0 -0
  21. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/coverage/cli.py +0 -0
  22. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/coverage/failures.py +0 -0
  23. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/dashboard.py +0 -0
  24. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/dashboard_summary/__init__.py +0 -0
  25. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/dashboard_summary/status_view.py +0 -0
  26. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/__init__.py +0 -0
  27. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/bootstrap.py +0 -0
  28. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/local_install.py +0 -0
  29. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/pre_start_cleanup.sh +0 -0
  30. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/templates/wisent-agent.service.tmpl +0 -0
  31. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/templates/wisent-host-health.timer.tmpl +0 -0
  32. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/templates/wisent-upgrade.service.tmpl +0 -0
  33. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/deploy/templates/wisent-upgrade.timer.tmpl +0 -0
  34. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/failure_fixer/__init__.py +0 -0
  35. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/failure_fixer/cli.py +0 -0
  36. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/models.py +0 -0
  37. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/__init__.py +0 -0
  38. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/alerts.py +0 -0
  39. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/billing.py +0 -0
  40. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/heartbeat_guard.py +0 -0
  41. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/monitor.py +0 -0
  42. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/reap/__init__.py +0 -0
  43. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/reap/helpers.py +0 -0
  44. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/monitor/reap/run_reaper.py +0 -0
  45. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/profiles/__init__.py +0 -0
  46. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/profiles/ai_toolkit_zimage.json +0 -0
  47. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/__init__.py +0 -0
  48. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/aws.py +0 -0
  49. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/azure.py +0 -0
  50. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/azure_helpers/__init__.py +0 -0
  51. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/azure_helpers/network.py +0 -0
  52. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/base.py +0 -0
  53. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/gcp/__init__.py +0 -0
  54. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/gcp/stockout.py +0 -0
  55. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/__init__.py +0 -0
  56. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/disk/__init__.py +0 -0
  57. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/disk/gate.py +0 -0
  58. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/gcp_self.py +0 -0
  59. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/helpers/__init__.py +0 -0
  60. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/helpers/gpu_probe.py +0 -0
  61. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/hf_rate.py +0 -0
  62. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/local/slots.py +0 -0
  63. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/vast/__init__.py +0 -0
  64. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/providers/vast/_auth.py +0 -0
  65. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/__init__.py +0 -0
  66. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/azure_blob.py +0 -0
  67. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/capacity.py +0 -0
  68. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/listing/__init__.py +0 -0
  69. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/migrations.py +0 -0
  70. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/runs/__init__.py +0 -0
  71. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/storage.py +0 -0
  72. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/submit.py +0 -0
  73. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/tracking/__init__.py +0 -0
  74. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/queue/tracking/tombstone.py +0 -0
  75. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/__init__.py +0 -0
  76. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/cost.py +0 -0
  77. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/dispatch/__init__.py +0 -0
  78. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/dispatch/agent.py +0 -0
  79. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/dispatch/quota_replies.py +0 -0
  80. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/dispatch/quota_request.py +0 -0
  81. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/dispatch/quota_skus.py +0 -0
  82. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/makespan/__init__.py +0 -0
  83. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/makespan/_history.py +0 -0
  84. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/quota.py +0 -0
  85. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/scheduler.py +0 -0
  86. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/scheduler/skip_done.py +0 -0
  87. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/sizing/__init__.py +0 -0
  88. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/targets/__init__.py +0 -0
  89. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/targets/registry.example.json +0 -0
  90. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/templates/__init__.py +0 -0
  91. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/templates/startup_cpu.sh +0 -0
  92. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/templates/startup_gpu.sh +0 -0
  93. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/templates/startup_gpu_agent.sh +0 -0
  94. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute/templates/startup_gpu_agent_azure.sh +0 -0
  95. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute.egg-info/SOURCES.txt +0 -0
  96. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute.egg-info/dependency_links.txt +0 -0
  97. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute.egg-info/entry_points.txt +0 -0
  98. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute.egg-info/requires.txt +0 -0
  99. {wisent_compute-0.4.332 → wisent_compute-0.4.334}/wisent_compute.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wisent-compute
3
- Version: 0.4.332
3
+ Version: 0.4.334
4
4
  Summary: Job queue and compute management for Wisent GPU workloads
5
5
  Requires-Python: >=3.10
6
6
  License-File: LICENSE
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wisent-compute"
7
- version = "0.4.332"
7
+ version = "0.4.334"
8
8
  description = "Job queue and compute management for Wisent GPU workloads"
9
9
  requires-python = ">=3.10"
10
10
  dependencies = [
@@ -115,7 +115,7 @@ done
115
115
  # Only computed when disk is tight (>80%); avoids running du on every
116
116
  # beacon tick on a healthy host.
117
117
  top_consumers='[]'
118
- if [ "${disk_pct:-0}" -ge 80 ]; then
118
+ if [ "${disk_pct:-0}" -ge 80 ] || [ "${disk_avail_gb:-999999}" -lt 30 ]; then
119
119
  top_consumers=$(
120
120
  {
121
121
  /usr/bin/du -h --max-depth=1 "$HOME_DIR" 2>/dev/null
@@ -10,5 +10,4 @@ Environment=PATH={PATH}
10
10
  Environment=GOOGLE_APPLICATION_CREDENTIALS={ADC_PATH}
11
11
  Environment=GOOGLE_CLOUD_PROJECT={GCP_PROJECT}
12
12
  Environment=WC_HEALTH_UNITS=wisent-agent.service
13
- ExecStartPre=-/bin/sh -c 'BEACON=$(/usr/bin/python3 -c "import wisent_compute, os; print(os.path.join(os.path.dirname(wisent_compute.__file__), \"deploy\", \"host_health_beacon.sh\"))" 2>/dev/null); [ -n "$BEACON" ] && [ -f "$BEACON" ] && /bin/cp "$BEACON" {HOME}/host_health_beacon.sh || true'
14
13
  ExecStart=/bin/bash {HOME}/host_health_beacon.sh
@@ -179,3 +179,33 @@ def setup_agent_staging(log_fn) -> str | None:
179
179
  f"{target} (disk-backed, {free_gb:.0f}G free)"
180
180
  )
181
181
  return target
182
+
183
+
184
+ def _flush_staging_child(path: str) -> None:
185
+ from wisent.core.reading.modules.utilities.data.sources.hf.hf_writers import (
186
+ flush_staging_dir,
187
+ )
188
+ flush_staging_dir(path)
189
+
190
+
191
+ def flush_fleet_staging(path: str, log_fn, timeout_s: int = 300) -> bool:
192
+ """Flush agent-wide HF staging without wedging the agent loop forever."""
193
+ if not os.path.isdir(path) or not any(os.scandir(path)):
194
+ return False
195
+ import multiprocessing as mp
196
+
197
+ proc = mp.Process(target=_flush_staging_child, args=(path,))
198
+ proc.start()
199
+ proc.join(timeout_s)
200
+ if proc.is_alive():
201
+ proc.terminate()
202
+ proc.join(10)
203
+ log_fn(f"fleet staging flush timed out after {timeout_s}s; keeping staging dir")
204
+ return False
205
+ if proc.exitcode != 0:
206
+ log_fn(f"fleet staging flush failed rc={proc.exitcode}; keeping staging dir")
207
+ return False
208
+ shutil.rmtree(path)
209
+ os.makedirs(path, exist_ok=True)
210
+ log_fn("flushed fleet staging dir to HF (1 commit)")
211
+ return True
@@ -44,10 +44,13 @@ def _pypi_latest(pkg: str) -> str | None:
44
44
  cached = _CACHE.get(pkg)
45
45
  if cached and (time.time() - cached[0]) < _CACHE_TTL_SECONDS:
46
46
  return cached[1]
47
- with urllib.request.urlopen(
48
- f"https://pypi.org/pypi/{pkg}/json",
49
- ) as resp:
50
- data = json.loads(resp.read())
47
+ try:
48
+ with urllib.request.urlopen(
49
+ f"https://pypi.org/pypi/{pkg}/json", timeout=20,
50
+ ) as resp:
51
+ data = json.loads(resp.read())
52
+ except Exception:
53
+ return None
51
54
  releases = data.get("releases") or {}
52
55
  if not releases:
53
56
  return None
@@ -82,10 +85,13 @@ def wisent_import_ok() -> tuple[bool, str]:
82
85
  claiming jobs that will fail their first `python -m wisent...` line.
83
86
  """
84
87
  import subprocess, sys
85
- res = subprocess.run(
86
- [sys.executable, "-c", "import wisent; import wisent_compute"],
87
- capture_output=True, text=True,
88
- )
88
+ try:
89
+ res = subprocess.run(
90
+ [sys.executable, "-c", "import wisent; import wisent_compute"],
91
+ capture_output=True, text=True, timeout=60,
92
+ )
93
+ except subprocess.TimeoutExpired:
94
+ return False, "import wisent/wisent_compute timed out after 60s"
89
95
  if res.returncode == 0:
90
96
  return True, ""
91
97
  return False, (res.stderr or res.stdout or "(no output)").strip()[:400]
@@ -30,7 +30,7 @@ from .local.helpers import (
30
30
  _staging_size_gb,
31
31
  _vast_has_renter,
32
32
  )
33
- from .local.disk.staging import setup_agent_staging
33
+ from .local.disk.staging import flush_fleet_staging, setup_agent_staging
34
34
 
35
35
 
36
36
  POLL_INTERVAL = 10
@@ -153,12 +153,7 @@ def run_agent(gpu_type: str = "", idle_shutdown: bool = False, kind: str = "loca
153
153
  except Exception:
154
154
  pass
155
155
  if time.time() - last_fleet_flush > FLEET_FLUSH_INTERVAL or _staging_size_gb(fleet_staging) > 5:
156
- from wisent.core.reading.modules.utilities.data.sources.hf.hf_writers import flush_staging_dir
157
- if os.path.isdir(fleet_staging) and any(os.scandir(fleet_staging)):
158
- flush_staging_dir(fleet_staging)
159
- shutil.rmtree(fleet_staging)
160
- os.makedirs(fleet_staging, exist_ok=True)
161
- _log("flushed fleet staging dir to HF (1 commit)")
156
+ flush_fleet_staging(fleet_staging, _log)
162
157
  last_fleet_flush = time.time()
163
158
  t = lookup_self(hostname, source="auto")
164
159
  if t and t.kind == "local":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wisent-compute
3
- Version: 0.4.332
3
+ Version: 0.4.334
4
4
  Summary: Job queue and compute management for Wisent GPU workloads
5
5
  Requires-Python: >=3.10
6
6
  License-File: LICENSE