Core concepts¶
Which method should I use?¶
| Your goal | Method | You provide |
|---|---|---|
| Train a detector, CNN, or transformer from scratch | client.pretrain() |
architecture, kind, data, optional init, config, tokenizer |
| Adapt an existing LLM or vision-language model | client.finetune() |
model, training_mode, data, optional task |
| Run a model without changing its weights | client.generate() |
model, prompts or an image manifest |
| Score a text model on a benchmark or your own questions | client.evaluate() |
model or a finished LoRA source_job_id, plus tasks or data |
Jobs¶
Jobs run asynchronously on the DataSpires GPU cluster.
| Lifecycle | Submit, then wait or poll with list_jobs() |
| Outputs | job.download() or client.download_model() |
| GPU | One per job. Omit it to run on DataSpires' own V100 32GB, or pass gpu_type= or offering= from client.gpus(). See Choosing a GPU. |
| Price | Per GPU-hour, locked when you submit. You pay for the time the job runs. |
| Maximum duration | Set per workspace or cohort. Pass time_limit="HH:MM:SS" within that limit. |
Create a job with pretrain(), finetune(), generate(), or evaluate(), then call job.run().
With wait=True the call blocks until the job finishes; with wait=False it returns
immediately so you can poll later (see Long-running jobs).
status¶
Every call reports a job's progress in a status field.
| Returned by | Values |
|---|---|
job.run() |
submitted, completed, failed, timeout, cancelled |
client.list_jobs(), client.get_job_status() |
The same values, plus queued and running |
result = job.run(wait=True)
print(result["status"])
for entry in client.list_jobs():
print(entry["job_id"], entry["status"])
A queued job from get_job_status() also has a message that says what it is waiting
for: a free GPU, or credits.