system_info and metric_stats are removed from GET /systems and added to POST /systems/analyses instead. This is because these two fields are treated as data we cache. They are only available and required when the user requests an analysis.
Implemented SystemModel which is a subclass of System. It implements methods that can load system_info and metric_stats on demand.
SystemDBUtils now has many helper functions. I think it'll make it easier to maintain if we extract some of them to SystemModel. SystemModel can any data operation on the system object itself. Whereas SystemDBUtils handles operations that affect multiple systems.
get_system_info() and get_metric_stats() makes a DB query every time it is called. They still use DB as the cache for now. I'll move the cache to Cloud Storage in another PR. It will be easy to add an in-memory cache in addition to this but that adds another layer of complexity so I left that out for now.
Backward compatibility
No DB migration required.
It won't break explainaboard_client but the latest explainaboard_api_client is required.
part of #433 blocked by https://github.com/neulab/explainaboard_client/pull/54
system_info
andmetric_stats
are removed from GET /systems and added to POST /systems/analyses instead. This is because these two fields are treated as data we cache. They are only available and required when the user requests an analysis.SystemModel
which is a subclass ofSystem
. It implements methods that can loadsystem_info
andmetric_stats
on demand.SystemDBUtils
now has many helper functions. I think it'll make it easier to maintain if we extract some of them toSystemModel
.SystemModel
can any data operation on the system object itself. WhereasSystemDBUtils
handles operations that affect multiple systems.get_system_info()
andget_metric_stats()
makes a DB query every time it is called. They still use DB as the cache for now. I'll move the cache to Cloud Storage in another PR. It will be easy to add an in-memory cache in addition to this but that adds another layer of complexity so I left that out for now.Backward compatibility
explainaboard_client
but the latestexplainaboard_api_client
is required.