Skip to content

Release/v0.3.1#74

Merged
lchoquel merged 8 commits intomainfrom
release/v0.3.1
Jun 10, 2025
Merged

Release/v0.3.1#74
lchoquel merged 8 commits intomainfrom
release/v0.3.1

Conversation

@lchoquel
Copy link
Copy Markdown
Member

Added

  • New pytest marker dry_runnable for tests that can run without inference.
  • Enhanced make targets with dry-run capabilities for improved test coverage:
    • make test-xdist (or make t): Runs all non-inference tests plus inference tests that support dry-runs - fast and resource-efficient
    • make test-inference (or make ti): Runs tests requiring actual inference, with actual inference (slow and costly)
  • Parallel test execution using pytest-xdist (-n auto) enabled for:
    • GitHub Actions workflows
    • Codex test targets

Changed

  • Domain validation is now less restrictive in pipeline TOML: the definition attribute is now Optional

lchoquel and others added 8 commits June 9, 2025 14:42
### Highlight

- Structured input specs as dicts: required_variable → concept_code
- Static validation of inputs for inference pipes: PipeLLM, PipeOcr and PipeImgGen: you can now catch mistakes in your pipelines without running any operation
    - `static_validation_config` to decide how to react to errors, kind of like pyright settings: for each type of error you can choose `raise`, `log` or `ignore` , with a general default of course
- Dry run validation catches errors in pipelines by running them without any inference, so it’s fast, costs nothing and works without internet, which makes it suitable for validating pipelines (like a linter) and this can even be used by agents like Cursor and Codex (more on that soon)
    - Dry run pipes without inference
    - `dry_run_config` to enable/disable jinja2 rendering during dry run
    - Added dependency to polyfactory for mock pydantic model generation
    - Improved Error handling for bad inputs during `run_pipe`, which works in dry run too, that's the purpose

### Tests

- Added pytest option `-pipe-run-mode` to `shared_pytest_plugins.py`, values `live` or `dry`, **default = `dry`**
- Made all the test_pipe apply pipe_run_mode
- Introduced a new pytest marker `pipelex_api`, applied to client methods instead of inference, llm etc.
- Added target `make test-pipelex-api` aka `make ta` to run just the client methods

### Refactor

- New way (simpler and way more elegant) to wrap inference worker methods (llm, image gen, ocr): instead of the `job_func` decorators, it uses a base method that calls a private abstract method implemented by each worker, and does stuff before and after

### Fixes

- Fixed logged error regarding pipe stack and PipeParallel
- Restored pipe tracker functionality, which no longer crashes when using stuff attributes as inputs
### 📝 Description
- Remove smelly validation of None PipeOcr fields

### 🔄 Type of Change
- [X] 🐛 Bug fix
- [ ] ✨ New feature
- [ ] 💥 Breaking change
- [ ] 📚 Documentation update
- [ ] 🧹 Code refactor
- [ ] ⚡ Performance improvement
- [ ] ✅ Test update
### 🔗 Related Issues

### 📝 Description
- Added pytest marker `dry_runable`
- Added `make` targets more powerful thanks to dry run: more test coverage by dry running pipes without inference
- Added "-n auto" to gha and codex test targets in order to use pytest-xdist and be faster by using multiple CPUs

### 🔄 Type of Change
- [ ] 🐛 Bug fix
- [X] ✨ New feature
- [ ] 💥 Breaking change
- [ ] 📚 Documentation update
- [ ] 🧹 Code refactor
- [ ] ⚡ Performance improvement
- [X] ✅ Test update
### 📝 Description

* Be more lax on having domain definition: it's now Optional

### 🔄 Type of Change
- [ ] 🐛 Bug fix
- [X] ✨ New feature
- [ ] 💥 Breaking change
- [ ] 📚 Documentation update
- [ ] 🧹 Code refactor
- [ ] ⚡ Performance improvement
- [ ] ✅ Test update

### 🧪 Tests

* tests/test_pipelines/failure_modes.toml has no domain definition set, and it's OK
@lchoquel lchoquel requested a review from thomashebrard June 10, 2025 13:58
Copy link
Copy Markdown
Member

@thomashebrard thomashebrard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@lchoquel lchoquel merged commit 08e00ab into main Jun 10, 2025
15 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 10, 2025
@lchoquel lchoquel deleted the release/v0.3.1 branch June 13, 2025 15:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants