2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
setuptools,
|
|
|
|
setuptools-scm,
|
|
|
|
interegular,
|
|
|
|
cloudpickle,
|
2024-09-19 14:19:46 +00:00
|
|
|
datasets,
|
2024-06-05 15:53:02 +00:00
|
|
|
diskcache,
|
|
|
|
joblib,
|
|
|
|
jsonschema,
|
2024-09-19 14:19:46 +00:00
|
|
|
pyairports,
|
|
|
|
pycountry,
|
2024-06-05 15:53:02 +00:00
|
|
|
pydantic,
|
|
|
|
lark,
|
|
|
|
nest-asyncio,
|
|
|
|
numba,
|
|
|
|
scipy,
|
|
|
|
torch,
|
|
|
|
transformers,
|
2024-04-21 15:54:59 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "outlines";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "0.0.46";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "outlines-dev";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-6VH9BcMRVRf2xvLcK3GNA1pGgAOs95UOlFQ6KxHXwKo=";
|
2024-04-21 15:54:59 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
setuptools-scm
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
interegular
|
|
|
|
cloudpickle
|
2024-09-19 14:19:46 +00:00
|
|
|
datasets
|
2024-04-21 15:54:59 +00:00
|
|
|
diskcache
|
|
|
|
joblib
|
|
|
|
jsonschema
|
|
|
|
pydantic
|
|
|
|
lark
|
|
|
|
nest-asyncio
|
|
|
|
numba
|
|
|
|
scipy
|
|
|
|
torch
|
|
|
|
transformers
|
2024-09-19 14:19:46 +00:00
|
|
|
pycountry
|
|
|
|
pyairports
|
2024-04-21 15:54:59 +00:00
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
checkPhase = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
python3 -c 'import outlines'
|
|
|
|
'';
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Structured text generation";
|
|
|
|
homepage = "https://github.com/outlines-dev/outlines";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lach ];
|
|
|
|
};
|
|
|
|
}
|