python312Packages.huggingface-hub: add optional-dependencies

This commit is contained in:
Gaetan Lepage
2025-04-01 00:21:55 +02:00
parent 559834db9f
commit 0d415c8307
@@ -14,6 +14,27 @@
requests,
tqdm,
typing-extensions,
# optional-dependencies
# cli
inquirerpy,
# inference
aiohttp,
# torch
torch,
safetensors,
# hf_transfer
hf-transfer,
# fastai
toml,
fastai,
fastcore,
# tensorflow
tensorflow,
pydot,
graphviz,
# tensorflow-testing
keras,
}:
buildPythonPackage rec {
@@ -40,6 +61,42 @@ buildPythonPackage rec {
typing-extensions
];
optional-dependencies = {
all = [
];
cli = [
inquirerpy
];
inference = [
aiohttp
];
torch = [
torch
safetensors
] ++ safetensors.optional-dependencies.torch;
hf_transfer = [
hf-transfer
];
fastai = [
toml
fastai
fastcore
];
tensorflow = [
tensorflow
pydot
graphviz
];
tensorflow-testing = [
tensorflow
keras
];
hf_xet = [
# hf-xet
];
};
# Tests require network access.
doCheck = false;