Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
506 commits
Select commit Hold shift + click to select a range
c49bcd9
Modify TransformersMultiModalTypeAdapter to make it more flexible
RobinPicard Mar 11, 2025
d0b9be1
Update the README
rlouf Feb 23, 2025
48a3311
Misc type fixes
rlouf Feb 23, 2025
d0f78d7
Use fixture to instantiate `Gemini` model
rlouf Feb 24, 2025
820660b
Handle `Gemini` output types solely in `GeminiTypeAdapter`
rlouf Feb 23, 2025
7f155d6
Handle `Dottxt` output types in `DottxtTypeAdapter`
rlouf Feb 25, 2025
b072209
Simplify handling model inputs in `AnthropicTypeAdapter`
rlouf Feb 25, 2025
003a820
Handle `OpenAI` output types in `OpenAITypeHandler`
rlouf Feb 25, 2025
ab72637
Handle `Ollama` output types in `OllamaTypeAdapter`
rlouf Feb 27, 2025
525df5a
Convert Python types to `Term`s
rlouf Feb 25, 2025
87cf4f3
Use jsonschema to validate JSON schemas passed by the user
RobinPicard Mar 5, 2025
ba93829
Turn CFG into a Term
RobinPicard Mar 5, 2025
ebdb6f3
Add support for json mode
RobinPicard Mar 5, 2025
59d8708
Add support for callables and for callables in enums
RobinPicard Mar 5, 2025
e590b9d
Add support for Interegular FSM
RobinPicard Mar 5, 2025
3e9804b
Add support for genSON
RobinPicard Mar 5, 2025
e29b118
Fix error with strings in python_types_to_terms
RobinPicard Mar 5, 2025
654fe28
Add support for basic type instances
RobinPicard Mar 5, 2025
23a56cc
Update the Generator to use native types
RobinPicard Mar 5, 2025
77d2e5a
Create unit tests for python_types_to_terms
RobinPicard Mar 5, 2025
69783b3
Remove the Outlines types Choice, JsonType and List
RobinPicard Mar 6, 2025
8ce2967
Create type utils functions
RobinPicard Mar 11, 2025
f76adf4
Fix python version incompatibility issues
RobinPicard Mar 11, 2025
6a6a357
Fix function get_enum_from_literal
RobinPicard Mar 12, 2025
b7860af
Move json_schema from fsm to types
RobinPicard Mar 12, 2025
d9aaf4f
Make Generator accept logits processors as output paramater + test it
RobinPicard Mar 13, 2025
2c5edef
Delete tests/generate and move the content to tests/test_cache.py
RobinPicard Mar 13, 2025
26b3488
Create the Application class
RobinPicard Mar 16, 2025
209f0ca
Remove the Function class
RobinPicard Mar 16, 2025
5bd6592
Add from_file class methods to CFG and JsonSchema
RobinPicard Mar 17, 2025
32a46fe
Run coverage check on target branch instead of always main
RobinPicard Mar 18, 2025
c474aad
Add caching to the function cached_create_states_mapping
RobinPicard Mar 18, 2025
ffe1b90
Create the TensorAdapter classes
RobinPicard Mar 24, 2025
d1c143c
Modify the logits processors to use the tensor adapters
RobinPicard Mar 24, 2025
9401569
Modify models and generators to implement the use of tensor adapters
RobinPicard Mar 24, 2025
6794eb6
Add coverage exclusion for mlx, vllm and serve
RobinPicard Mar 25, 2025
1e60375
Fix issue in Templates, change from_str to from_string
RobinPicard Mar 25, 2025
f54479d
Modify the OpenAI model to handle multiple sample
RobinPicard Mar 25, 2025
88ef134
Restore the load_lora method to LlamaCpp with a warning
RobinPicard Mar 31, 2025
719df7f
Fix error in the generate_stream method of MLXLM
RobinPicard Mar 31, 2025
b3711dd
Restore the load_lora method to VLLM with a warning
RobinPicard Mar 31, 2025
4418153
Small fixes in the Transformers model
RobinPicard Mar 31, 2025
fb26934
Add a whitespace_pattern to JsonSchema
RobinPicard Mar 31, 2025
4cf766a
Restore the base, function and samplers files in v0_legacy
RobinPicard Mar 31, 2025
94dc81a
Restore the v0 models' loading functions and update the OpenAI model
RobinPicard Mar 31, 2025
fb68b2b
Restore the generate functions
RobinPicard Mar 31, 2025
2764241
Include legacy code in the root level __init__
RobinPicard Mar 31, 2025
c54fd9a
Add tests for v0 legacy code
RobinPicard Mar 31, 2025
2985a59
Remove the call methods from the sampler objects and simplify tests
RobinPicard Apr 8, 2025
41aedb7
Modify warning messages for v0 legacy functions
RobinPicard Apr 8, 2025
2ad12c4
Add more tests to increase test coverage
RobinPicard Apr 8, 2025
58dbe5d
Update the exmaples scripts to use the v1 interface
RobinPicard Apr 10, 2025
5b35e06
Add examples' prompt files to load the prompt templates from file
RobinPicard Apr 10, 2025
0beeb6f
Update the cookbooks to use v1 interface
RobinPicard Apr 11, 2025
7669cc2
Replace parse_raw by model_validate_json
RobinPicard Apr 14, 2025
d43129f
Fix errors in the mlx tensor adapter
RobinPicard Apr 14, 2025
3a3c286
Update the README
rlouf Apr 12, 2025
e496f86
Update README.md
rlouf Apr 17, 2025
35abef0
Update the README
rlouf Apr 12, 2025
1208a2e
Fix version mismatch numpy
RobinPicard Apr 26, 2025
9f6e917
Rename VLLM to VLLMOffline and create server-based VLLM/AsyncVLLM
RobinPicard Apr 26, 2025
f17800d
Create the migration guide to v1
RobinPicard Apr 16, 2025
b2d3e00
Create the TGI model
RobinPicard Apr 30, 2025
1d2394b
Create the SgLang model
RobinPicard Apr 30, 2025
e31f0f5
Add commercial info to the v1 docs
cpfiffer Apr 24, 2025
ef12a82
Change the deprecation warning of v0 from v1.5.0 to v.1.1.0
RobinPicard May 9, 2025
f5795f4
Remove the serve module
RobinPicard May 9, 2025
f26d805
parent 93d1e077201e46a46d18c881f0108427241afa27
cpfiffer May 8, 2025
5b9faf1
Fix whitespace
cpfiffer May 12, 2025
7b6ca4d
Modify Application's call method to include inference kwargs
RobinPicard May 15, 2025
1cda909
Update the Gemini model to use their new sdk
RobinPicard May 16, 2025
9c69621
Standardize the use of the model_name argument
RobinPicard May 16, 2025
0be7d8b
Add script to autogenerate API reference with mkdocs
RobinPicard May 22, 2025
fee8a23
Update the utility features section of the documentation
RobinPicard May 26, 2025
962a847
Update the advanced features documentation
RobinPicard May 26, 2025
884e983
Remove forgottenly committed print statement
RobinPicard May 26, 2025
a993210
Rename SgLang into SGLang
RobinPicard May 26, 2025
5bf0f93
Improve type hints and docstrings for the processors module
RobinPicard May 26, 2025
333f705
Improve docstrings and type hinting in the types module
RobinPicard May 26, 2025
d83c1bf
Improve docstrings and type hinting in model implementations
RobinPicard May 27, 2025
891108e
Improve docstrings and type hinting in model base and generator
RobinPicard May 27, 2025
7eb1f36
Various docstrings and type hints improvements
RobinPicard May 27, 2025
eb6efb2
Add the section for output types in the features documentation
RobinPicard May 27, 2025
9fd653d
Update the model documentation in the Features section
RobinPicard May 30, 2025
8ca7588
Update the features documentation section's index page
RobinPicard Jun 2, 2025
39b20b7
Align examples lists in documentation
RobinPicard Jun 2, 2025
4a28911
Update the guides in the documentation
RobinPicard Jun 2, 2025
b2aeda5
Modify the documentation home page
RobinPicard Jun 2, 2025
96fbfa6
Use the examples from old_docs in docs and delete old_docs
RobinPicard Jun 8, 2025
fc7ea9b
Restore deprecated regex DSL functions with a warning
RobinPicard Jun 6, 2025
74c187c
Correct the docs logo aspect ratio
cpfiffer Jun 13, 2025
f273c6e
Add guide for OpenAI-compatible models
rlouf Jun 16, 2025
f9abff4
Modify VLLMOffline to rely on vLLM's GuidedDecodingParams argument
RobinPicard Jun 17, 2025
58473e8
Create optional dependencies for the models
RobinPicard Jun 17, 2025
4959875
Fix failing tests transformers
RobinPicard Jun 17, 2025
73962b8
Improve the documentation index
rlouf Jun 7, 2025
2aeed06
Add missing plugins to the requirements-doc
RobinPicard Jun 18, 2025
d631de9
Merge v1.0 into main (#1621)
rlouf Jun 18, 2025
810818e
Fix broken links in the README (#1625)
RobinPicard Jun 19, 2025
8b2227e
Fix the broken links in the home page of the documentation (#1628)
RobinPicard Jun 19, 2025
111667c
Fix typos across the codebase (#1631)
sukrucildirr Jun 19, 2025
adf546d
Document vLLM async support
rlouf Jun 19, 2025
0b57415
Document TGI async support
rlouf Jun 19, 2025
bdc5a97
Document SGLang async support
rlouf Jun 19, 2025
cb89400
Style the code blocks
rlouf Jun 19, 2025
1b90c21
Change line heights and section styling
rlouf Jun 19, 2025
8b023d8
Add guide on deployment with FastAPI
rlouf Jun 19, 2025
a2e7d5f
Update the styling of the docs
rlouf Jun 19, 2025
bf86aec
Delete LICENSE from the guide
rlouf Jun 20, 2025
17ce00f
s/bash/shell in code blocks
rlouf Jun 20, 2025
62b2648
Fix typos
rlouf Jun 20, 2025
2e06e7f
Fix typos in getting started guide (#1644)
ganglike248 Jun 22, 2025
ce1d490
Remove the CI Docker build action
rlouf Jun 21, 2025
068e892
Move the VLM guide to guides/
rlouf Jun 21, 2025
a97696f
Fix example typo in README
rlouf Jun 23, 2025
f1e3e13
Add testing and documentation for vision input for VLLM model (#1648)
RobinPicard Jun 23, 2025
e47df45
Add support for vision input for the Ollama model (#1647)
RobinPicard Jun 23, 2025
4dd7802
Add setup example for local server (#1646)
rlouf Jun 23, 2025
eae004c
Add IPv4, UUID4, and Hex String Types (#1655)
jacobmarks Jun 26, 2025
9c3c9bf
Fix the FastAPI example
rlouf Jun 26, 2025
6edb724
Add llm.txt file
rlouf Jun 26, 2025
4a03f51
Fix nightly tests (remove Slack alert causing troubles)
RobinPicard Jun 26, 2025
696d89c
Fix error with additionalProperties for the OpenAI model
RobinPicard Jun 30, 2025
61ac54c
Create the AsyncOllama model
RobinPicard Jul 1, 2025
1f6e250
Add tests for AsyncOllama
RobinPicard Jul 1, 2025
d2e4a5b
Add documentation for AsyncOllama
RobinPicard Jul 1, 2025
ca461c6
Add the output_type Choice
RobinPicard Jul 1, 2025
27c8291
Add tests for the Choice output_type
RobinPicard Jul 1, 2025
991adef
Add documentation for the Choice output_type
RobinPicard Jul 1, 2025
7a25481
Add the ensure_ascii parameter to JsonSchema
RobinPicard Jul 1, 2025
c350ddc
Add a batch method to models
RobinPicard Jul 2, 2025
0b3deed
Add tests for the batch method of models
RobinPicard Jul 2, 2025
bc334e6
Add documentation for the batch method of models
RobinPicard Jul 3, 2025
0a979b3
Fix error with the tokonzer inferenace arg in Transformers
RobinPicard Jul 4, 2025
479a861
Create the inputs module and modify the treatment of multimodal input…
RobinPicard Jul 5, 2025
999a611
Create the Chat model input
RobinPicard Jul 9, 2025
bb21050
Add the Chat input to Anthropic
RobinPicard Jul 9, 2025
1b7d51f
Add the Chat input to Gemini
RobinPicard Jul 9, 2025
f1a558b
Add the Chat input to Llamacpp
RobinPicard Jul 9, 2025
84dab11
Add the Chat input to Ollama
RobinPicard Jul 9, 2025
6516f3c
Add the Chat input to OpenAI
RobinPicard Jul 9, 2025
c104bae
Add the Chat input to SGLang
RobinPicard Jul 9, 2025
db9e9fd
Add the Chat input to Transformers
RobinPicard Jul 10, 2025
df88a3f
Add the Chat input to VLLM
RobinPicard Jul 10, 2025
8c343ba
Add the Chat input to VLLMOffline
RobinPicard Jul 10, 2025
3ac645a
Misc doc fixes
RobinPicard Jul 10, 2025
ffcd625
Remove deprecated features from v0
RobinPicard Jul 10, 2025
f3b3f3d
Remove the tests related to the v0 deprecated features
RobinPicard Jul 10, 2025
07ebb56
Remove documentation and misc related to v0 deprecated features
RobinPicard Jul 10, 2025
1e8022e
Set add_generation_template to True in chat formatting for Transformers
RobinPicard Jul 11, 2025
00b2a27
Update index.md
laitifranz Jul 11, 2025
222ca17
Update getting_started.md to fix class import from Transformer library
laitifranz Jul 14, 2025
e12442f
Fix: JSON schema union types (type arrays) fail with 'type must be a …
brightlikethelight Jul 19, 2025
ad7aa7b
Update docs with OpenRouter guide (#1691)
Oni-giri Jul 19, 2025
665f11a
Fix broken wheel builds caused by ambiguous packaging instructions (#…
neilmehta24 Jul 19, 2025
ba0505d
Create the backends module and add backends for xgrammar and llguidance
RobinPicard Jul 22, 2025
d01013d
Add tests for the backends
RobinPicard Jul 22, 2025
df9bce9
Document the use of the backends
RobinPicard Jul 22, 2025
c1a3ab8
Add the logits processor reset to handle multiple generations
RobinPicard Jul 25, 2025
f062dc5
import fix in base.py
Jul 30, 2025
7bc2005
Delete CFGGuide and CFGLogitsProcessor
RobinPicard Jul 29, 2025
4e66c52
Delete benchmarks
RobinPicard Jul 29, 2025
16853c6
Delete the fsm module and the FSM output type
RobinPicard Jul 29, 2025
947c904
Upgrade outlines_core to 0.2.11 and update its logits processor/backend
RobinPicard Jul 29, 2025
b81c918
Create our own logits processor for Xgrammar, add support for mlx
RobinPicard Aug 1, 2025
a04b941
Turn tokens into strings before building the Outlines-Core Vocabulary
RobinPicard Aug 4, 2025
a8464ac
Fix bug in outlines_core for transformers about token-str conversion
RobinPicard Aug 8, 2025
446700e
Fix a bug regarding the eos_token in the LlamaCpp tokenizer
RobinPicard Aug 7, 2025
8cecc55
Fix bug related to the device of the bitmasks and logits for torch
RobinPicard Aug 7, 2025
b3fba13
Create AsyncOpenAI model
RobinPicard Aug 11, 2025
647223e
Fix a bug in OutlinesCoreLogitsProcessor about advancing when in fina…
RobinPicard Aug 14, 2025
c0aeb4a
Update coverage check in GH actions, require 100% for all files
RobinPicard Aug 14, 2025
6ae9c28
Deprecate jax and tensorflow, remove unused files
RobinPicard Aug 14, 2025
778cd10
Fix coverage issues, improve testing logits processors
RobinPicard Aug 14, 2025
5f2649f
Update workflow to test API models, use manual trigger
RobinPicard Aug 22, 2025
6469218
fix typings: add explicit package and root level exports
the-vampiire Aug 20, 2025
7b6334c
fix (types): remove unused imports
the-vampiire Aug 22, 2025
e8444e8
fix (docs): docs building due to export changes
the-vampiire Aug 22, 2025
bebca54
fix (typings): remove model_list export
the-vampiire Aug 23, 2025
bac26f2
Remove redundant parameter api models tests workflows
RobinPicard Aug 25, 2025
1804c67
Remove the benchmarks workflow
RobinPicard Aug 25, 2025
1249181
Update vLLM model references and API key usage in documentation
laitifranz Aug 30, 2025
92eb8e0
Fix trailing-whitespace
laitifranz Aug 30, 2025
039f250
Fix the image download issue in the tests by creating an image ourselves
RobinPicard Sep 1, 2025
ef0a2d4
Reduce the number of mandatory dependencies + update uv.lock
RobinPicard Sep 1, 2025
849a969
Remove tests for flax and tensorflow for the transformers model
RobinPicard Sep 1, 2025
6533d5d
Add support for the Chat input to the MLXLM model
RobinPicard Sep 1, 2025
96ea070
Update uv.lock
RobinPicard Sep 2, 2025
f9e0a15
Add setuptools to the list of transformers dependencies
RobinPicard Sep 2, 2025
f12bb75
Update the output_type formatting of the llamacpp model
RobinPicard Sep 15, 2025
3826310
Fix correct handling of chat multimodal inputs in TransformersMultiMo…
laitifranz Aug 14, 2025
32ccbc1
Handle empty assets cases where onyl text is provided to MLLMs
laitifranz Aug 16, 2025
350b196
Remove deprecated function and update test accordingly since Outlines…
laitifranz Aug 22, 2025
eafa8c4
Update docstring with OpenAI’s multi-modal chat format support, and u…
laitifranz Aug 23, 2025
95dd983
Clarify docstring for Chat class
laitifranz Aug 23, 2025
b124475
Enhance asset handling in format_chat_input method to validate asset …
laitifranz Aug 23, 2025
1bf51e8
Update tests for transformers MultiModal to the multimodal chat format
laitifranz Aug 23, 2025
64e0709
Update transformers multimodal docs to reflect new changes with Chat …
laitifranz Aug 23, 2025
c860b88
Use consistent string quoting for SUPPORTED_ASSETS to avoid Python f-…
laitifranz Aug 23, 2025
1ef8f5c
Add tests for handling empty assets and invalid content types in tran…
laitifranz Aug 23, 2025
a14151f
Removing SUPPORTED_ASSETS constant for clarity and to avoid pre-commi…
laitifranz Aug 23, 2025
79e2332
Apply pre-commit suggestions: trim trailing whitespace
laitifranz Aug 23, 2025
dedd1b9
Remove or from Chat docstring for better readability
laitifranz Aug 26, 2025
edcff4f
Update format_chat_input for Chat class to support list of string + a…
laitifranz Aug 27, 2025
68d17fd
Reintroduce test for list of string+assets
laitifranz Aug 27, 2025
5673580
Reintroduce test for list of string+assets and add new tests for miss…
laitifranz Aug 27, 2025
3180cba
Add example for using list of string + assets with Chat class
laitifranz Aug 27, 2025
6d87de7
Add tests for invalid content types and for unsupported asset types
laitifranz Aug 27, 2025
91ae7fa
Migrate multimodal type adapter tests to use AutoProcessor for a MM s…
laitifranz Aug 27, 2025
6bec76f
Added validation for items with multiple keys
laitifranz Aug 27, 2025
99093e0
Add tests for mutiple assets usage in multimodal chat template format
laitifranz Aug 27, 2025
d975d13
Update text input prompt to align with author's preference
laitifranz Sep 12, 2025
2a19bdd
Add batch generation to the MLXLM model
RobinPicard Sep 23, 2025
87ee5c9
Add Mistral AI integration (models, tests, docs)
yasteven Sep 27, 2025
9dd1412
Another pass to address the issues rasied in PR 1755
yasteven Sep 30, 2025
9367ccd
Make cosmethic changes to the Mistral model
RobinPicard Oct 2, 2025
62be0f2
Add design partner CTA
rlouf Oct 6, 2025
605fe14
Remove json schema union types workaround
RobinPicard Sep 24, 2025
9c5ef8f
Create the json schema conversion methods
RobinPicard Sep 26, 2025
2c8c9d7
Use the JsonSchema conversion methods in models
RobinPicard Sep 26, 2025
e72ec50
Fix dependencies installation instructions
RobinPicard Oct 3, 2025
1a8d2c0
Add Mistral to the list of available models in the doc
RobinPicard Oct 3, 2025
b393c88
Add design partner CTA in docs
rlouf Oct 6, 2025
c81e06e
Add the device_dtype init parameter to the transformers model
RobinPicard Sep 26, 2025
ffe92a7
Update the test workflows in the CI to use uv instead of pip
RobinPicard Oct 8, 2025
ca0cf18
Update the uv lock
RobinPicard Oct 8, 2025
87234d2
Fix error in the batch method of the MLXLM model
RobinPicard Oct 25, 2025
0f9f05f
fix: Refactor sampling parameters in VLLMOffline to use StructuredOut…
Ki-Seki Nov 20, 2025
9f909bd
Add SamplingParams to model response example
Ki-Seki Nov 20, 2025
e12c995
fix: Add SamplingParams to model response examples
Ki-Seki Nov 20, 2025
c9dd296
Draft
RobinPicard Nov 24, 2025
1e1c917
Use positional unpacking for mlx_lm.load() tuple
Anri-Lombard Nov 28, 2025
be1c25f
Remove todos
Anri-Lombard Dec 1, 2025
2fa3777
fix: correct chat format usage
Ki-Seki Dec 3, 2025
f9c72dd
Add AsyncOllama to __all__ exports
Anri-Lombard Dec 5, 2025
96c3c40
feat: add chat template checking func
Ki-Seki Dec 2, 2025
baba491
fix: Best-effort use of chat completion for VLLMOffline
Ki-Seki Dec 2, 2025
9e762ca
fix: Best-effort use of chat completion for Transformers
Ki-Seki Dec 2, 2025
16e3b01
fix: Best-effort use of chat completion for mlxlm
Ki-Seki Dec 2, 2025
6892803
fix: Best-effort use of chat completion for LlamaCpp
Ki-Seki Dec 2, 2025
afabd98
test: Add some initial tests
Ki-Seki Dec 2, 2025
42c7842
fix: update stream tests to handle potential empty chunks
Ki-Seki Dec 3, 2025
cc4a06e
fix: add chat_mode parameter to LlamaCpp and from_llamacpp for better…
Ki-Seki Dec 3, 2025
6357411
fix: remove TODO comments for adding tests in LlamaCpp class methods
Ki-Seki Dec 3, 2025
3a24576
fix: improve error handling for unexpected prompt types and update st…
Ki-Seki Dec 3, 2025
d4a73ba
test: simplify some tests
Ki-Seki Dec 4, 2025
272ee0a
fix: add tests for _check_hf_chat_template function in tokenizer module
Ki-Seki Dec 4, 2025
6557b3d
fix: remove unused AnyTokenizer import from vllm_offline.py
Ki-Seki Dec 4, 2025
37ba815
fix: correct typo
Ki-Seki Dec 4, 2025
b98ee31
fix: move tokenizer imports to the appropriate location in vllm_offli…
Ki-Seki Dec 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "dottxt-ai",
"image": "mcr.microsoft.com/devcontainers/python:3.12",
"runArgs": [
"--device=nvidia.com/gpu=all"
],
"hostRequirements": {
"gpu": "optional"
},
"features": {
"ghcr.io/devcontainers/features/conda:1": {},
"ghcr.io/devcontainers/features/nvidia-cuda:1": {
"installCudnn": true,
"installToolkit": true,
"cudaVersion": "12.4"
},
"ghcr.io/devcontainers/features/rust:1": {}
}
}
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yaml]
indent_size = 2
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ body:
label: "Outlines/Python version information:"
description: |
Please run the following code and paste the output here.
python -c "from outlines import _version; print(_version.__version__)"
python -c "import sys; print('Python', sys.version)"
pip freeze
python -c "from outlines import _version; print(_version.__version__)";
python -c "import sys; print('Python', sys.version)";
pip freeze;
value: |
Version information
<details>
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
contact_links:
- name: 🤔 Questions & Help
url: https://github.com/outlines-dev/outlines/discussions/new
url: https://github.com/dottxt-ai/outlines/discussions/new
about: "If you have a question about how to use Outlines, please start a discussion."
27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

34 changes: 0 additions & 34 deletions .github/ISSUE_TEMPLATE/improvement.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ A few important guidelines and requirements before we can merge your PR:
Consider opening a **Draft PR** if your work is still in progress but you would
like some feedback from other contributors.

[issues]: https://github.com/outlines-dev/outlines/issues
[issues]: https://github.com/dottxt-ai/outlines/issues
[git-guidelines]: https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[docstring-guidelines]: https://numpydoc.readthedocs.io/en/latest/format.html
57 changes: 0 additions & 57 deletions .github/workflows/asv_benchmark_pr.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/build_documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build the documentation
on:
pull_request:
branches: [main]
workflow_dispatch:

jobs:
build:
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/publish_documentation.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Publish the documentation

on:
workflow_dispatch:
push:
branches:
- main
release:
types:
- created

permissions:
contents: write
Expand All @@ -13,6 +17,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.x
Expand All @@ -24,7 +30,24 @@ jobs:
restore-keys: |
mkdocs-material-
- run: pip install -r requirements-doc.txt
- name: Build documentation
- run: mkdocs build

- name: Set up Git
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.github.com

- name: Publish Tag as latest
env:
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
if: github.event_name == 'release'
run: |
mike deploy --push --update-aliases ${{ github.ref_name }} latest
mike set-default --push latest

- name: Publish main as unstable
env:
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
run: mkdocs gh-deploy --force
if: github.event_name == 'push'
run: |
mike deploy --push --update-aliases ${{ github.ref_name }} unstable
36 changes: 0 additions & 36 deletions .github/workflows/release_docker.yml

This file was deleted.

49 changes: 30 additions & 19 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Tests

on:
pull_request:
branches: [main]
branches: [main,v1.0]
push:
branches: [main]

Expand All @@ -22,26 +22,45 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.10"]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Ollama
run: |
curl -fsSL https://ollama.com/install.sh | sh
ollama --version
ollama pull tinyllama
- name: Set up test environment
run: |
python -m pip install --upgrade pip
pip install .[test]
pip install uv
uv sync --no-group test-gpu --extra test
- name: Create matrix id
id: matrix-id
env:
MATRIX_CONTEXT: ${{ toJson(matrix) }}
run: |
echo $MATRIX_CONTEXT
export MATRIX_ID=`echo $MATRIX_CONTEXT | md5sum | cut -c 1-32`
echo $MATRIX_ID
echo "::set-output name=id::$MATRIX_ID"
- name: Run tests
run: |
pytest --cov=outlines
rm -f .coverage*
uv run coverage erase
uv run python -m coverage run --branch --source=outlines --parallel-mode -m pytest -x -m 'not api_call'
- name: Upload coverage data
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: coverage-data
path: .coverage*
path: .coverage.*
if-no-files-found: ignore
include-hidden-files: true
overwrite: true

coverage:
name: Combine & check coverage.
Expand All @@ -62,31 +81,23 @@ jobs:
run: |
pip install --upgrade "coverage[toml]>=5.1" diff-cover

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: coverage-data

- name: Fetch master for coverage diff
run: |
git fetch --no-tags --prune origin main

- name: Combine coverage & fail if it's <100%.
run: |
# Combine coverage files (not needed now, but maybe later)
# python -m coverage combine

# Produce an html report with absolute coverage information
python -m coverage combine
python -m coverage html --skip-covered --skip-empty

# Report relative coverage and write to the workflow's summary
python -m coverage xml
diff-cover coverage.xml --markdown-report=coverage.md --fail-under=100 || (cat coverage.md >> $GITHUB_STEP_SUMMARY && exit 1)
python -m coverage report --fail-under=100 || (python -m coverage report && exit 1)

- name: Upload HTML report if check failed.
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: html-report
path: htmlcov
overwrite: true
if: ${{ failure() }}

build-wheel:
Expand Down
Loading