Datasets:
|
Download code/migration_notes.md from kavyabhand/spacerot: direct link, hf CLI and curl.
- Browser
- Download file 3.34 kB
-
https://huggingface.co/datasets/kavyabhand/spacerot/resolve/main/code/migration_notes.md
- Command line
-
hf download hf://datasets/kavyabhand/spacerot/code/migration_notes.md
-
curl -L -o migration_notes.md https://huggingface.co/datasets/kavyabhand/spacerot/resolve/main/code/migration_notes.md
3.34 kB
Common reasons Spaces that used to work now fail on rebuild. Spaces reinstalls unpinned dependencies at their latest versions on every rebuild, so old code meets new libraries.
gradio
- 4.0 removed
gr.inputs.*/gr.outputs.*(usegr.Textbox,gr.Image, ...),.style(...),gr.Box(usegr.Group),gr.Variable(usegr.State),gr.Image(source=..., tool=...)(nowsources=[...]). launch(enable_queue=...)andInterface(enable_queue=...)were removed; call.queue()instead.queue(concurrency_count=N)was removed in 4.0; usequeue(default_concurrency_limit=N).Interface(allow_flagging=...)was renamedflagging_modein 5.0.gr.update(...)in place ofgr.Component.update(...)(the classmethod.updatewas removed in 4.0).- 6.0 moved app-level options such as
cssfrom theBlocks/Interfaceconstructor tolaunch()(gradio prints a UserWarning naming them), andallow_flaggingis no longer accepted. Check the warning text in the log. - Spaces whose README pins the newest
sdk_versionget gradio 6 even if the code was written for 3.x. - In 5.x,
gr.Chatbotdefaults changed; tuple-format history is deprecated in favour oftype="messages". - Old gradio 3.x pins can break against newer
huggingface_hub,httpx(0.28 removedproxies=),pydantic2,fastapi/starlette, orjinja2. Either pin those transitive packages or bumpsdk_version. - gradio's
audioop: Python 3.13 removed the stdlibaudioopmodule; pydub falls back topyaudioop. Fix: addaudioop-ltsto requirements (providesaudioopon 3.13+) or pinpython_version: "3.10".
huggingface_hub
- 1.0 removed
cached_download(usehf_hub_download),HfFolder(useget_token/login),Repository(useHfApi.upload_*/snapshot_download),InferenceApi(useInferenceClient), and theuse_auth_token=argument (usetoken=). Libraries that import these (old diffusers, old gradio, old sentence-transformers) need upgrading orhuggingface_hub<1.0pinned.
torch / torchvision
- torch 2.6 made
torch.load(weights_only=True)the default; old checkpoints raiseUnpicklingError/WeightsUnpickler error. For a checkpoint the Space author trusts, passweights_only=False, or pintorch<2.6. - torchvision 0.17 removed
torchvision.transforms.functional_tensor(breaksbasicsr, used by GFPGAN / Real-ESRGAN). Patch the import totorchvision.transforms.functionalor pintorchvision<0.17.
numpy
- numpy 2 breaks extensions compiled against numpy 1 (
numpy.core.multiarray failed to import,numpy.dtype size changed,_ARRAY_API not found). Pinnumpy<2unless the extensions are upgraded. np.float,np.int,np.bool,np.objectwere removed in 1.24; use the builtins.
others
datasets3/4 removedLargeListre-exports and changed loading scripts (trust_remote_code).openai1.0 removedopenai.ChatCompletion/openai.Completion(use the client object).transformersdrops long-deprecated modules and kwargs; pin to the version era of the code if it fails on import.setuptools80+ no longer providespkg_resourcesin some setups; pinsetuptools<81ifpkg_resourcesis missing.tomli: Python 3.11+ hastomllib; on 3.10tomlimust be installed explicitly if a package expects it.