Unverified Commit ac5783dd authored by codgician's avatar codgician
Browse files

python3Packages.colbert-ai: 0.2.21 -> 0.2.22

parent 3f52f993
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -23,26 +23,15 @@

buildPythonPackage rec {
  pname = "colbert-ai";
  version = "0.2.21";
  version = "0.2.22";
  pyproject = true;

  src = fetchPypi {
    inherit version;
    pname = "colbert_ai";
    hash = "sha256-qNb9tOInLysI7Tf45QlgchYNhBXR5AWFdRiYt35iW6s=";
    hash = "sha256-AK/P711xXw06cGvpDStbdKK7fEAgc4B861UVwAJqiIY=";
  };

  # ImportError: cannot import name 'AdamW' from 'transformers'
  # https://github.com/stanford-futuredata/ColBERT/pull/390
  postPatch = ''
    substituteInPlace colbert/training/training.py \
      --replace-fail \
      "from transformers import AdamW, get_linear_schedule_with_warmup" \
      "from transformers import get_linear_schedule_with_warmup; from torch.optim import AdamW"
  '';

  pythonRemoveDeps = [ "git-python" ];

  build-system = [
    setuptools
  ];