Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an OrtResult abstraction #5991

Open
mnonnenmacher opened this issue Oct 24, 2022 · 2 comments
Open

Create an OrtResult abstraction #5991

mnonnenmacher opened this issue Oct 24, 2022 · 2 comments
Labels
enhancement Issues that are considered to be enhancements model About the data model

Comments

@mnonnenmacher
Copy link
Member

Create an abstraction for the OrtResult to decouple the ORT tools from the way that ORT data is stored.

Currently, we access the data stored in OrtResult directly in many places. This has the downside that the tools are tightly coupled to the OrtResult class, while the OrtResult class has to be optimized for serialization at the same time, because it is used to write the result files. Creating a facade (e.g. an interface of a collection of interfaces) would have several benefits:

  • We could provide different means to store ORT result data, for example a local database, and it would be easier to experiment with alternative storage formats like Protobuf.
  • Breaking changes in the ORT result file format would not necessarily require changes in the interface.
  • Tests often require to build large parts of an OrtResult or even a complete OrtResult, when they actually only use a much smaller part of it. In those cases mocks could be used to reduce the size of the tests.
@mnonnenmacher mnonnenmacher added the enhancement Issues that are considered to be enhancements label Oct 24, 2022
@sschuberth sschuberth added the model About the data model label Oct 24, 2022
@oheger-bosch
Copy link
Member

This does not only affect the reading of result data but also the creation. One possible approach could be based on the builder pattern: Instead of creating result objects directly, ORT components are passed a builder they can use to propagate their results.

@sschuberth
Copy link
Member

FYI, there's a similar topic for LicenseClassifications. Maybe it makes sense to try out a new API approach first in the context of such a smaller / isolated class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that are considered to be enhancements model About the data model
Projects
None yet
Development

No branches or pull requests

3 participants