Commit 89be295e authored by natsukium's avatar natsukium Committed by Yt
Browse files

python310Packages.openllm-core: init at 0.2.27

parent 5d48d462
Loading
Loading
Loading
Loading
+84 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, accelerate
, attrs
, bentoml
, bitsandbytes
, cattrs
, datasets
, hatch-fancy-pypi-readme
, hatch-vcs
, hatchling
, inflection
, mypy-extensions
, orjson
, peft
, ray
, transformers
, typing-extensions
}:

buildPythonPackage rec {
  pname = "openllm-core";
  version = "0.2.27";
  format = "pyproject";

  disabled = pythonOlder "3.8";

  src = fetchFromGitHub {
    owner = "bentoml";
    repo = "OpenLLM";
    rev = "refs/tags/v${version}";
    hash = "sha256-R69Qsx9360pJx+7oyhHdeAXUjTAdevPmaBl9gj+AA8U=";
  };

  sourceRoot = "source/openllm-core";

  nativeBuildInputs = [
    hatch-fancy-pypi-readme
    hatch-vcs
    hatchling
  ];

  propagatedBuildInputs = [
    attrs
    bentoml
    cattrs
    inflection
    mypy-extensions
    orjson
    typing-extensions
  ];

  passthru.optional-dependencies = {
    vllm = [
      ray
      # vllm
    ];
    fine-tune = [
      accelerate
      bitsandbytes
      datasets
      peft
      transformers
      # trl
    ] ++ transformers.optional-dependencies.torch
      ++ transformers.optional-dependencies.tokenizers
      ++ transformers.optional-dependencies.accelerate;
  };

  # there is no tests
  doCheck = false;

  pythonImportsCheck = [ "openllm_core" ];

  meta = with lib; {
    description = "Core components for OpenLLM";
    homepage = "https://github.com/bentoml/OpenLLM/tree/main/openllm-core";
    changelog = "https://github.com/bentoml/OpenLLM/blob/${src.rev}/CHANGELOG.md";
    license = licenses.asl20;
    maintainers = with maintainers; [ natsukium ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -4014,6 +4014,8 @@ self: super: with self; {
    inherit (pkgs.darwin.apple_sdk.frameworks) ApplicationServices OpenGL;
  };

  openllm-core = callPackage ../development/python-modules/openllm-core { };

  openstep-plist = callPackage ../development/python-modules/openstep-plist { };

  glyphslib = callPackage ../development/python-modules/glyphslib { };