Refactor tests and RunOptions usage for compatibility with upcoming RTen release#205
Merged
robertknight merged 2 commits intomainfrom Oct 20, 2025
Merged
Refactor tests and RunOptions usage for compatibility with upcoming RTen release#205robertknight merged 2 commits intomainfrom
RunOptions usage for compatibility with upcoming RTen release#205robertknight merged 2 commits intomainfrom
Conversation
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
added a commit
that referenced
this pull request
Oct 20, 2025
Following #205 this is no longer needed.
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.
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
RunOptionsto be ready for this. See commits for details.