Unverified Commit 475a497c authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

open-webui: Add missing datasets dependency for local "transformers" text-to-speech (TTS) (#509699)

parents 02f7109e b13c4240
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -110,6 +110,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
      chardet
      chromadb
      cryptography
      datasets_3
      ddgs
      docx2txt
      einops
+85 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  # build-system
  setuptools,

  # dependencies
  dill,
  filelock,
  fsspec,
  httpx,
  huggingface-hub,
  multiprocess,
  numpy,
  pandas,
  pyarrow,
  pyyaml,
  requests,
  tqdm,
  xxhash,
}:
buildPythonPackage (finalAttrs: {
  pname = "datasets";
  version = "3.6.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "huggingface";
    repo = "datasets";
    tag = finalAttrs.version;
    hash = "sha256-/xhu0cDKfCEwrp9IzKd0+AeQky1198f9sba/pdutvAk=";
  };

  build-system = [
    setuptools
  ];

  dependencies = [
    dill
    filelock
    fsspec
    httpx
    huggingface-hub
    multiprocess
    numpy
    pandas
    pyarrow
    pyyaml
    requests
    tqdm
    xxhash
  ]
  ++ fsspec.optional-dependencies.http;

  pythonRelaxDeps = [
    # https://github.com/huggingface/datasets/blob/a256b85cbc67aa3f0e75d32d6586afc507cf535b/setup.py#L117
    # "pin until dill has official support for determinism"
    "dill"
    # https://github.com/huggingface/datasets/blob/4.5.0/setup.py#L127
    "multiprocess"
    # https://github.com/huggingface/datasets/blob/4.5.0/setup.py#L130
    "fsspec"
  ];

  # Tests require pervasive internet access
  doCheck = false;

  # Module import will attempt to create a cache directory
  postFixup = "export HF_MODULES_CACHE=$TMPDIR";

  pythonImportsCheck = [ "datasets" ];

  meta = {
    description = "Open-access datasets and evaluation metrics for natural language processing";
    mainProgram = "datasets-cli";
    homepage = "https://github.com/huggingface/datasets";
    changelog = "https://github.com/huggingface/datasets/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [
      osbm
      malteneuss
    ];
  };
})
+4 −4
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@
  tqdm,
  xxhash,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
  pname = "datasets";
  version = "4.5.0";
  pyproject = true;
@@ -28,7 +28,7 @@ buildPythonPackage rec {
  src = fetchFromGitHub {
    owner = "huggingface";
    repo = "datasets";
    tag = version;
    tag = finalAttrs.version;
    hash = "sha256-K8JqIbYz3ZfT1t1h5dRGCo9kBQp0E+kElqzaw2InaOI=";
  };

@@ -75,8 +75,8 @@ buildPythonPackage rec {
    description = "Open-access datasets and evaluation metrics for natural language processing";
    mainProgram = "datasets-cli";
    homepage = "https://github.com/huggingface/datasets";
    changelog = "https://github.com/huggingface/datasets/releases/tag/${src.tag}";
    changelog = "https://github.com/huggingface/datasets/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ osbm ];
  };
}
})
+2 −0
Original line number Diff line number Diff line
@@ -3634,6 +3634,8 @@ self: super: with self; {
  datasets = callPackage ../development/python-modules/datasets { };
  datasets_3 = callPackage ../development/python-modules/datasets/3.nix { };
  datasette = callPackage ../development/python-modules/datasette { };
  datasette-publish-fly = callPackage ../development/python-modules/datasette-publish-fly { };