Buckets:
Space 런타임 관리[[managing-your-space-runtime]]
Hub의 Space를 관리하는 메소드에 대한 자세한 설명은 HfApi페이지를 확인하세요.
- Space 복제: duplicate_space()
- 현재 런타임 가져오기: get_space_runtime()
- 보안 관리: add_space_secret() 및 delete_space_secret()
- 하드웨어 관리: request_space_hardware()
- 상태 관리: pause_space(), restart_space(), set_space_sleep_time()
데이터 구조[[data-structures]]
SpaceRuntime[[huggingface_hub.SpaceRuntime]][[huggingface_hub.SpaceRuntime]]
- 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 fromhardwareespecially if the request has just been made. Example: "t4-medium". Can beNoneif no hardware has been requested yet. - sleep_time (
intorNone) -- Number of seconds the Space will be kept alive after the last request. By default (if value isNone), the Space will never go to sleep if it's running on an upgraded hardware, while it will go to sleep after 48 hours on a free 'cpu-basic' hardware. For more details, see https://huggingface.co/docs/hub/spaces-gpus#sleep-time. - volumes (
list[Volume]orNone) -- List of volumes mounted in the Space. Each volume is aVolumeobject describing its type, source, mount path, and optional settings.Noneif no volumes are attached. - 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[[huggingface_hub.SpaceHardware]][[huggingface_hub.SpaceHardware]]
Enumeration of hardwares available to run your Space on the Hub.
Value can be compared to a string:
assert SpaceHardware.CPU_BASIC == "cpu-basic"
Taken from https://github.com/huggingface-internal/moon-landing/blob/main/server/repo_types/SpaceHardwareFlavor.ts (private url).
SpaceStage[[huggingface_hub.SpaceStage]][[huggingface_hub.SpaceStage]]
Enumeration of possible stage of a Space on the Hub.
Value can be compared to a string:
assert SpaceStage.BUILDING == "BUILDING"
Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceInfo.ts#L61 (private url).
SpaceStorage[[huggingface_hub.SpaceStorage]][[huggingface_hub.SpaceStorage]]
Enumeration of persistent storage available for your Space on the Hub.
Value can be compared to a string:
assert SpaceStorage.SMALL == "small"
Taken from https://github.com/huggingface/moon-landing/blob/main/server/repo_types/SpaceHardwareFlavor.ts#L24 (private url).
SpaceVariable[[huggingface_hub.SpaceVariable]][[huggingface_hub.SpaceVariable]]
- key (
str) -- Variable key. Example:"MODEL_REPO_ID" - value (
str) -- Variable value. Example:"the_model_repo_id". - description (
stror None) -- Description of the variable. Example:"Model Repo ID of the implemented model". - updatedAt (
datetimeor None) -- datetime of the last update of the variable (if the variable has been updated at least once).
Contains information about the current variables of a Space.
Xet Storage Details
- Size:
- 4.32 kB
- Xet hash:
- 3a7fc4c8a9fa495c0f63ef7ebbe0029fa76ed01f0fcbb9055338556221999442
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.