SDK Reference
Reference documentation for the public lium.sdk Python API.
Install the SDK with:
pip install lium.io
Client
- Lium - Clean Unix-style SDK for Lium.
- AlphaQuote - USD -> alpha quote from GET /balance/convert/alpha.
- AlphaSubnet - One subnet whose alpha Lium accepts as payment (GET /balance/alpha/subnets).
- AlphaSubnets - The accepted-subnet set from GET /balance/alpha/subnets.
- pod_ssh_command - The pod's ssh command for a shell, with the host-key options and without a key.
Api Keys
Models
- ExecutorInfo
- PodInfo
- Template - Template information.
- BackupConfig - Backup configuration information.
- BackupLog - Backup log information.
- RestoreLog - Restore log information.
- VolumeInfo - Volume information.
- SSHKey - Public SSH key registered for the current user.
- GpuStats - One GPU's utilization as reported by nvidia-smi on the pod.
- ApiKeyScope - One row of GET /keys/scopes: what a scope lets a key do, in the server's words.
- ApiKeyInfo - An API key row as GET /keys / POST /keys describe it.
- ApiKeyRefusal - One row of GET /keys/{id}/refusals (server support pending): a request the key's budget.
- RentResult - What Lium.rent() chose and, unless it was a dry run, rented.
- Cluster - The pods of one multi-node rental, in node-rank order.
- ClusterOffer - A group of free nodes on one RDMA fabric that can be rented as a single multi-node job.
Configuration
Jobs
- Job - A command started in the background on a pod.
Exceptions
- LiumError - Base exception for Lium SDK.
- LiumAuthError - Authentication error.
- LiumRateLimitError - Rate limit exceeded.
- LiumServerError - Server error.
- LiumNotFoundError - Resource not found (404).
- LiumPermissionError - The account is not allowed to do this (403).
- PodStartError - A pod reached a state from which it will never become ready.
- LiumHostKeyError - A pod presented an SSH host key that differs from the pinned one.
- LiumInsufficientBalanceError - The account cannot pay for this (403 with a balance reason).
- LiumScopeError - The API key lacks the scope the route needs (403 API key '<name>' does not have the '<scope>' scope).
- LiumBudgetExceededError - The API key's budget refused the request (402, error.code APIKEYBUDGETEXCEEDED).
- RemoteExecutionError - A function offloaded with @lium.machine did not return a result from the pod.
- ClusterNotListedError - The cluster rent may have gone through, but the pod listing did not show a whole.
- LiumSessionError - A browser session (lium workspaces login / LIUMSESSIONTOKEN) is missing or refused.
Result Codec
- ResultEncodingError - The function's result holds a value that does not travel back from the pod.
Decorators
- machine - Decorator to execute a function on a remote Lium machine.