Closed qin-yu closed 4 months ago
Hey @lorenzocerrone, I've developed a central record singleton class for managing models—a runtime table for storing information about models. This setup paves the way for integrating default models, custom models, and models from bioimage.io. Although bioimage.io is currently undergoing migration, the new database will soon be ready for integration.
Could you review this when you are fixing issue 218 today?
Replying to https://github.com/hci-unihd/plant-seg/pull/220#issuecomment-2051378622
Yes I'll use Pydantic for all necessary config validation. But I'll do it bit by bit like what I did for pathlib
.
Design Changes
get_model_zoo()
orlist_models()
is called, now this zoo information is stored in aModelZoo
singleton.ModelZoo
singleton'spandas.DataFrame
object./plantseg/utils.py
only contains real utility functions, andzoo.py
has classes with the model related functions.Coding Changes
pydantic
v2 for config checking, starting from this newModelZoo
withModelZooRecord
s__init__.py
and are all manipulated inpathlib.Path
instead of byos
. Relevant functions are all changed accordingly, with some refactored.To-do