vast-ai/vast-cli / vastai
vastai
FlaggedVast.ai CLI to manage GPU instances, volumes, serverless endpoints, and billing.
serverless/client/worker.py
View on GitHubfrom dataclasses import dataclass
from typing import Any, Dict, List, Tuple, Optional
@dataclass
class Worker:
id: int
status: str
cur_load: float
new_load: float
cur_load_rolling_avg: float
cur_perf: float
perf: float
measured_perf: float
dlperf: float
reliability: float
reqs_working: int
disk_usage: float
loaded_at: float
started_at: float
@staticmethod
def from_dict(d: Dict[str, Any]) -> "Worker":
# Be resilient to missing / extra fields
status = d.get("status") or "UNKNOWN"
return Worker(
id=int(d.get("id")),
status=status,
cur_load=float(d.get("cur_load", 0.0)),
new_load=float(d.get("new_load", 0.0)),
cur_load_rolling_avg=float(d.get("cur_load_rolling_avg", 0.0)),
cur_perf=float(d.get("cur_perf", 0.0)),
perf=float(d.get("perf", 0.0)),
measured_perf=float(d.get("measured_perf", 0.0)),
dlperf=float(d.get("dlperf", 0.0)),
reliability=float(d.get("reliability", 0.0)),
reqs_working=int(d.get("reqs_working", 0)),
disk_usage=float(d.get("disk_usage", 0.0)),
loaded_at=float(d.get("loaded_at", 0.0)),
started_at=float(d.get("started_at", 0.0)),
)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |