Hub Python Library documentation
Managing your Space runtime
Managing your Space runtime
Check the HfApi documentation page for the reference of methods to manage Space runtime on the Hub.
Data structures
SpaceRuntime
class huggingface_hub.SpaceRuntime
< source >( data: typing.Dict )
Parameters
-
stage (
str) — Current stage of the space. Example: RUNNING. -
hardware (
strorNone) — Current hardware of the space. Example: “cpu-basic”. Can beNoneif Space isBUILDINGfor the first time. -
requested_hardware (
strorNone) — Requested hardware. Can be different thanhardwareespecially if the request has just been made. Example: “t4-medium”. Can beNoneif no hardware has been requested yet. -
raw (
dict) — Raw response from the server. Contains more information about the Space runtime like number of replicas, number of cpu, memory size,…
Contains information about the current runtime of a Space.
SpaceHardware
class huggingface_hub.SpaceHardware
< source >( value names = None module = None qualname = None type = None start = 1 )
Enumeration of hardwares available to run your Space on the Hub.
Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceInfo.ts#L73 (private url).
SpaceStage
class huggingface_hub.SpaceStage
< source >( value names = None module = None qualname = None type = None start = 1 )
Enumeration of possible stage of a Space on the Hub.
Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceInfo.ts#L61 (private url).