Skip to content

Refactor tests and RunOptions usage for compatibility with upcoming RTen release#205

Merged
robertknight merged 2 commits intomainfrom
model-interface
Oct 20, 2025
Merged

Refactor tests and RunOptions usage for compatibility with upcoming RTen release#205
robertknight merged 2 commits intomainfrom
model-interface

Conversation

@robertknight
Copy link
Owner

The next RTen release is removing and changing some APIs to make it easier to avoid semver-major changes in subsequent releases. See robertknight/rten#1014.

This PR refactors how the ML models are faked in tests and usage of RunOptions to be ready for this. See commits for details.

In the next rten version some of the current APIs used to construct models are
going to be removed (see robertknight/rten#1014 and in
particular robertknight/rten#1018). Hence this project
needs to use a different way to create the fake models for unit tests.

This commit introduces a `Model` trait as an abstraction of the runtime. This is
implemented by `rten::Model` for non-test usage and by fake model types in
tests. The new fakes have the same behavior as the previous "real" model.
This change is for compatibility with the next rten release. See
robertknight/rten#1008.
@robertknight robertknight merged commit 9f984b6 into main Oct 20, 2025
2 checks passed
@robertknight robertknight deleted the model-interface branch October 20, 2025 15:20
robertknight added a commit that referenced this pull request Oct 20, 2025
Following #205 this is no longer
needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant