python3Packages.openllm-core: fix optional-dependencies evaluation

Without the change eval fails as:

    $ nix build --no-link -f. python3Packages.openllm-core.optional-dependencies
    error:
           79|   passthru.optional-dependencies =
             |   ^
           80|   let

       error: attribute 'accelerate' missing

From what I see `accelerate` was always missing in `transflrmers` package.
While at it fixed `full` evaluation by disambiguating between input
argument and `passthru` attribute.
This commit is contained in:
Sergei Trofimovich 2023-12-30 20:40:20 +00:00
parent 01962add7e
commit 12a8aa5ac8

View File

@ -70,9 +70,12 @@ buildPythonPackage rec {
transformers
# trl
] ++ transformers.optional-dependencies.torch
++ transformers.optional-dependencies.tokenizers
++ transformers.optional-dependencies.accelerate;
full = with passthru.optional-dependencies; ( vllm ++ bentoml ++ fine-tune );
++ transformers.optional-dependencies.tokenizers;
full = with passthru.optional-dependencies; (
vllm
# use absolute path to disambiguate with derivbation argument
++ passthru.optional-dependencies.bentoml
++ fine-tune );
};
# there is no tests