junrushao1994 edited a comment on pull request #9061: URL: https://github.com/apache/tvm/pull/9061#issuecomment-926207149
> It seems the direct use of the Database is all wrapped in a JSON-related file object, which kind of confuses me, would you mind providing a brief explanation of the class structure somewhere? Hey thanks @mbrookhart for asking! Let's focus on the database API and ignore the workload registry part (which will be removed according to previous discussion with Cody in this thread). * The base abstract class is `Database`, which has 4 pure virtual methods: `commit_workload`, `commit_tuning_record`, `get_top_k`, `size` * The system interacts with any subclass of `Database` by calling these 4 methods * To implement a concrete subclass of `Database`: in pure C++, we can just inherit Database and do so; in pure python, we provide `PyDatabase` to inherit from, where we plays some tricks, so that everything can be implemented in pure python * `JSONFile` is a simple default implementation of `Database` for open source * Developers can provide other implementations too by inheriting `Database` or `PyDatabase`, for example, database backed by SQLite, etc, as long as the class implements the 4 methods -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
