Something went wrong. Try again.
What happens if I push all of nixpkgs
Something went wrong. Try again.
5.3 kB · 203 lines
Nix
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204{ lib, buildPythonPackage, fetchFromGitHub,
# build-system setuptools, setuptools-scm,
# dependencies airportsdata, cloudpickle, datasets, diskcache, genson, interegular, iso3166, jinja2, jsonschema, lark, nest-asyncio, numpy, outlines-core, pycountry, pydantic, referencing, requests, torch, transformers,
# tests anthropic, google-genai, jax, llama-cpp-python, ollama, openai, pytest-asyncio, pytest-mock, pytestCheckHook, tensorflow,}:
buildPythonPackage rec { pname = "outlines"; version = "1.2.3"; pyproject = true;
src = fetchFromGitHub { owner = "outlines-dev"; repo = "outlines"; tag = version; hash = "sha256-t1YSkFC56De9HkdDJN9WIpKDdHxZRfGRbFOtAiJxKUI="; };
build-system = [ setuptools setuptools-scm ];
dependencies = [ airportsdata cloudpickle datasets diskcache genson interegular iso3166 jinja2 jsonschema lark nest-asyncio numpy outlines-core pycountry pydantic referencing requests torch transformers ];
pythonImportsCheck = [ "outlines" ];
nativeCheckInputs = [ anthropic google-genai jax llama-cpp-python ollama openai pytest-asyncio pytest-mock pytestCheckHook tensorflow ];
pytestFlagsArray = [ # FutureWarning: functools.partial will be a method descriptor in future Python versions; wrap it in enum.member() if you want to preserve the old behavior "-Wignore::FutureWarning" ];
disabledTests = [ # Try to dowload models from Hugging Face Hub "test_application_callable_call" "test_application_generator_reuse" "test_application_template_call" "test_application_template_error" "test_generator_black_box_async_processor" "test_generator_black_box_sync_processor" "test_generator_init_multiple_output_type" "test_generator_steerable_output_type" "test_generator_steerable_processor" "test_llamacpp_type_adapter_format_output_type" "test_steerable_generator_call" "test_steerable_generator_init_cfg_output_type" "test_steerable_generator_init_invalid_output_type" "test_steerable_generator_init_other_output_type" "test_steerable_generator_init_valid_processor" "test_steerable_generator_stream" "test_transformer_tokenizer_convert_token_to_string" "test_transformer_tokenizer_decode" "test_transformer_tokenizer_encode" "test_transformer_tokenizer_eq" "test_transformer_tokenizer_getstate_setstate" "test_transformer_tokenizer_hash" "test_transformer_tokenizer_init"
# TypeError: "Could not resolve authentication method. # Expected either api_key or auth_token to be set. # Or for one of the `X-Api-Key` or `Authorization` headers to be explicitly omitted. "test_anthopic_streaming" "test_anthropic_chat" "test_anthropic_simple_call" "test_anthropic_simple_vision"
# ConnectionError: Failed to connect to Ollama. "test_ollama_async_chat" "test_ollama_async_direct" "test_ollama_async_json" "test_ollama_async_simple" "test_ollama_async_simple_vision" "test_ollama_async_stream" "test_ollama_async_stream_json" "test_ollama_chat" "test_ollama_direct" "test_ollama_json" "test_ollama_simple" "test_ollama_simple_vision" "test_ollama_stream" "test_ollama_stream_json"
# openai.APIConnectionError: Connection error. "test_openai_async_chat" "test_openai_async_direct_call" "test_openai_async_simple_call" "test_openai_async_simple_call_multiple_samples" "test_openai_async_simple_json_schema" "test_openai_async_simple_pydantic" "test_openai_async_simple_pydantic_refusal" "test_openai_async_simple_vision" "test_openai_async_simple_vision_pydantic" "test_openai_async_streaming" "test_openai_chat" "test_openai_direct_call" "test_openai_simple_call" "test_openai_simple_call_multiple_samples" "test_openai_simple_json_schema" "test_openai_simple_pydantic" "test_openai_simple_pydantic_refusal" "test_openai_simple_vision" "test_openai_simple_vision_pydantic" "test_openai_streaming" ];
disabledTestPaths = [ # Try to dowload models from Hugging Face Hub "tests/backends/test_backends.py" "tests/backends/test_llguidance.py" "tests/backends/test_outlines_core.py" "tests/backends/test_xgrammar.py" "tests/models/test_llamacpp.py" "tests/models/test_llamacpp_tokenizer.py" "tests/models/test_transformers.py" "tests/models/test_transformers_multimodal.py" "tests/models/test_transformers_multimodal_type_adapter.py" "tests/models/test_transformers_type_adapter.py"
# Requires unpackaged dottxt "tests/models/test_dottxt.py"
# ValueError: Missing key inputs argument! To use the Google AI API, provide (`api_key`) arguments. "tests/models/test_gemini.py" ];
meta = { description = "Structured text generation"; homepage = "https://github.com/outlines-dev/outlines"; changelog = "https://github.com/dottxt-ai/outlines/releases/tag/${version}"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ lach ]; };}