From 441ff011acdde6773c5f83ad336dd120f44ea148 Mon Sep 17 00:00:00 2001 From: Hadrien Mary Date: Fri, 17 Jan 2025 15:50:19 -0500 Subject: [PATCH] add outlines-core --- recipes/outlines-core/recipe.yaml | 81 +++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 recipes/outlines-core/recipe.yaml diff --git a/recipes/outlines-core/recipe.yaml b/recipes/outlines-core/recipe.yaml new file mode 100644 index 0000000000000..19005544561a7 --- /dev/null +++ b/recipes/outlines-core/recipe.yaml @@ -0,0 +1,81 @@ +context: + name: outlines-core + version: 0.1.27 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://pypi.org/packages/source/${{ name[0] }}/${{ name }}/outlines_core-${{ version }}.tar.gz + sha256: 594d35c616a90a5da1d172406c8c56ba8a72192964a5f51bb012a3d6710efd22 + +build: + number: 0 + script: + - cargo-bundle-licenses --format yaml --output THIRDPARTY.yml + - ${{ PYTHON }} -m pip install . -vv --no-deps --no-build-isolation + +requirements: + build: + - if: build_platform != target_platform + then: + - python + - cross-python_${{ target_platform }} + - setuptools >=45 + - setuptools-scm >=6.2 + - setuptools-rust + - openssl + + - ${{ compiler('rust') }} + - ${{ compiler('cxx') }} + - ${{ stdlib("c") }} + - cargo-bundle-licenses + - pkg-config + host: + - python + - setuptools >=45 + - setuptools-scm >=6.2 + - setuptools-rust + - pip + - openssl + run: + - python + - interegular + - jsonschema + +tests: + - python: + imports: + - outlines_core + pip_check: true + - requirements: + run: + - pytest + - pytest-benchmark + - pytest-mock + - scipy + - numpy + - pytorch + - pydantic + - transformers + - datasets + - sentencepiece + files: + source: + - tests/ + # NOTE: remove test_serialization.py since it imports the tests folder + # which is a bad practice and raise an error here. + script: pytest -vvv tests/ --ignore=tests/fsm/test_serialization.py + +about: + summary: Structured Text Generation in Rust + license: Apache-2.0 + license_file: + - THIRDPARTY.yml + - LICENSE + homepage: https://github.com/dottxt-ai/outlines-core + +extra: + recipe-maintainers: + - hadim