Enhance engine creation API, update README#6874
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors and expands the getitune engine-creation entry point to support creating engines from model names and recipe YAMLs (in addition to model instances / weight paths), centralizes recipe-discovery utilities under getitune.utils, and updates user-facing documentation accordingly.
Changes:
- Added
getitune.engine.utils.create_engine()with recipe/model-name resolution and backend dispatch via the recipe’sbackendfield; re-exported it fromgetitune.engine. - Updated Lightning/Utralytics/OpenVINO engines to align with the enhanced creation API (
from_config,datanaming, optional work_dir handling). - Updated tests and docs to import recipe utilities from
getitune.utilsand refreshed the library README with the new API guidance.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| library/tests/unit/backend/lightning/utils/test_imports.py | Updates imports to use getitune.utils. |
| library/tests/unit/backend/lightning/utils/test_api.py | Updates imports to use getitune.utils. |
| library/tests/unit/backend/lightning/test_engine.py | Updates API calls to use data= instead of data_root=. |
| library/tests/perf_v2/benchmark.py | Updates RECIPE_PATH import and data= argument naming. |
| library/tests/integration/conftest.py | Updates get_getitune_root_path import to getitune.utils. |
| library/tests/integration/api/test_xai.py | Updates Lightning engine creation to use data=. |
| library/tests/integration/api/test_engine.py | Updates Lightning engine creation to use data=. |
| library/src/getitune/utils/recipes.py | Refreshes header/docstrings; keeps recipe discovery utilities. |
| library/src/getitune/utils/init.py | Re-exports RECIPE_PATH, get_getitune_root_path, list_models. |
| library/src/getitune/tools/auto_configurator.py | Switches recipe utilities import to getitune.utils. |
| library/src/getitune/models/init.py | Makes Ultralytics model exports optional (ImportError-guarded). |
| library/src/getitune/engine/utils/create.py | New: implements enhanced create_engine (model-name + recipe support). |
| library/src/getitune/engine/utils/init.py | Exposes create_engine from the engine utils package. |
| library/src/getitune/engine/engine.py | Adds a base Engine.from_config() API hook (default: NotImplemented). |
| library/src/getitune/engine/init.py | Re-exports create_engine from getitune.engine.utils. |
| library/src/getitune/cli/cli.py | Updates CLI “find” path to import list_models from getitune.utils. |
| library/src/getitune/benchmark/manifest.py | Updates RECIPE_PATH import to getitune.utils. |
| library/src/getitune/benchmark/experiment.py | Updates Lightning engine creation to use data=. |
| library/src/getitune/backend/ultralytics/tools/configurator.py | Avoids runtime circular import; makes work_dir optional. |
| library/src/getitune/backend/ultralytics/engine.py | Adds from_config() for Ultralytics recipes; makes work_dir optional. |
| library/src/getitune/backend/openvino/engine.py | Adds from_config() that explicitly raises NotImplementedError. |
| library/src/getitune/backend/lightning/engine.py | Renames data_root → data and refactors from_config() argument routing. |
| library/src/getitune/backend/lightning/cli/init.py | Deleted (utility exports moved to getitune.utils). |
| library/README.md | Updates installation + API docs for enhanced engine creation. |
| library/docs/source/guide/tutorials/base/how_to_train/semantic_segmentation.rst | Updates list_models import to getitune.utils. |
| library/docs/source/guide/tutorials/base/how_to_train/instance_segmentation.rst | Updates list_models import to getitune.utils. |
| library/docs/source/guide/tutorials/base/how_to_train/detection.rst | Updates list_models import to getitune.utils. |
| library/docs/source/guide/tutorials/base/how_to_train/classification.rst | Updates list_models import to getitune.utils. |
| library/docs/source/guide/get_started/api_tutorial.rst | Updates list_models import to getitune.utils. |
📊 Test coverage report
|
🐳 Docker image sizes
|
|
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
AlbertvanHouten
previously approved these changes
Jun 22, 2026
…d add PyPI warnings for YOLO26 models
This reverts commit d78c605.
…ltralytics is source-only - Fix --extra-index-url quoting for pip install commands - Add pip install examples for XPU, CUDA, and CPU backends - Inline source-install commands (with Ultralytics) under Ultralytics warning - Link to library README for full installation details (including uv) - Fix library README: remove misleading PyPI warning, Ultralytics in source only
…dge-platform/training_extensions into kprokofi/enhance-api-docs
…pi-docs # Conflicts: # README.md
…clean structure - Replace old Quick start with getitune content with enhanced version - Remove duplicate Quick Start/Docker section added during merge resolution - Keep community user list from develop under Who uses Geti? - Preserve Migrating from Geti 2.x and Documentation sections
AlbertvanHouten
previously approved these changes
Jun 22, 2026
…clean structure - Replace old Quick start with getitune content with enhanced version - Remove duplicate Quick Start/Docker section added during merge resolution - Keep community user list from develop under Who uses Geti? - Preserve Migrating from Geti 2.x and Documentation sections
AlbertvanHouten
previously approved these changes
Jun 22, 2026
- Glob both *.yaml and *.yml for model name recipe resolution - Unlink best_checkpoint symlink before shutil.copy2 to prevent corruption - Remove stale OpenVINO version requirements from both READMEs
AlbertvanHouten
approved these changes
Jun 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR enhances the create_engine() entry point to support creating engines from recipe YAML files and bare model names (in addition to the existing model-instance and weight-path dispatch). It also consolidates recipe-discovery utilities under getitune.utils, unifies engine constructor APIs, fixes a cross-backend checkpoint corruption bug, and adds unit tests.
Key Changes
New capabilities in create_engine() (getitune.engine.utils.create):
Unified engine API:
Checkpoint bug fix (cross-backend corruption):
Recipe-discovery consolidation:
Ultralytics model classes exported:
Tests:
Additionally, this PR changes README for library
Create an engine from a bare model name
How to test
Checklist