协作头脑风暴
brainstorming
在实现前澄清需求、探索设计选择,并形成清晰的开发方向。
hosted-compute-and-integrations【开发与工程】Routes hosted Jobs and Sandboxes, Space runtime configuration, OAuth and webhooks, framework/model integration, repository cards, tensor serialization, and TensorBoard logging workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this route when a task mentions Hugging Face Jobs, scheduled Jobs, a Sandbox or SandboxPool, Space hardware/storage/secrets/variables, OAuth, WebhooksServer, model-framework integration, model/dataset/Space cards, DDUF, sharded checkpoints, safetensors, or TensorBoard traces.
ModelHubMixin, PyTorchModelHubMixin, local save/load, cards,
model-index metadata, and the local-versus-Hub TensorBoard writer boundary.Run the safe local integration fixture with
scripts/local_integration_smoke.py
before attempting any hosted operation. It creates a temporary model/card,
sharded checkpoint, DDUF archive, and mocked configuration recovery; it does
not contact the Hub or change a remote resource.
run_job, scheduled-Job creation or
triggering, Sandbox.create, SandboxPool warm-up, Space creation/upload,
Space hardware/storage/secret/variable changes, webhook registration, card
publishing, push_to_hub, and HFSummaryWriter are credentialed or
side-effecting. Treat GPU/paid flavors, storage, and long-running processes
as potentially billable. Use mocks or local fixtures until the user has
explicitly authorized a real target.huggingface_hub version.env/variables and
sensitive values in encrypted Job/Space secrets where supported. Never print
secret values or forward an HF token unless it is an explicit requirement.SCHEDULING and
RUNNING to COMPLETED, CANCELED, ERROR, or DELETED; wait_for_job
returns failed final info rather than raising for a failed Job. Spaces may
remain in build/start stages and need wait_for_space; inspect the returned
stage and logs before retrying. A scheduled Job's immediate trigger does not
alter its schedule.HfApi methods with autospecced mocks and feed
staged JobInfo/SpaceRuntime results. Assert invalid configuration causes
zero client calls, then assert the corrected plan calls only the mocks.For a normal install, check only what the requested route needs:
python -c "import huggingface_hub; print(huggingface_hub.__version__)"
# Add torch and safetensors for serialization; add gradio for WebhooksServer;
# add the oauth extra for OAuth; add tensorboard or tensorboardX for logging.
Do not run the following during safe verification: hosted Job/Sandbox creation,
SandboxPool construction with warm-up, Space or endpoint resource changes,
secret writes/deletes, webhook create/update/delete, card/mixin uploads,
push_to_hub, live OAuth callbacks, HFSummaryWriter against a real repo, or
remote validation/downloads. Mock the client boundary and use local fixtures;
see troubleshooting.md when a live check is
explicitly authorized.