You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We originally split the configuration in algorithm-specific configurations (child classes) to be able to perform validation across sub-configurations:
frompydanticimportBaseModelclassConfiguration(BaseMode):
algorithm_config: UNetBasedAlgorithm|LVAEBasedAlgorithmdata_config: GeneralDataConfig# N2VclassN2VAlgorithm(UNetBasedAlgorithm):
...
classN2VDataConfig(GeneralDataConfig):
...
classN2VConfiguration(Configuration):
algorithm_config: N2VAlgorithmdata_config: N2VDataConfig# validate parameters from N2VAlgorithm and N2VDataConfig against each other# CAREclassCAREAlgorithm(UNetBasedAlgorithm):
...
classCAREConfiguration(Configuration):
algorithm_config: CAREAlgorithm
@melisande-c correctly pointed out that in #365 we are now removing the need for N2VDataConfig. The only difference between N2VConfiguration and CAREConfiguration are now:
Algorithm sub-configuration parameter
Methods to generate citations, references, summary and friendly name for BMZ export (e.g. here)
There will be no more validation across algorithm and data, at least for now.
Which part of the code?
Algorithm configuration declared in algorithm-specific configuration:
Is having a clean class per algorithm to generate the metadata (references, citations, description) for the BMZ enough to justify the existence of N2VAlgorithm, CAREAlgorithm etc. ?
Where will the noise model end up in the PN2V configuration? Probably in algorithm_config as well isn't it?
Do we foresee any need for specific data or training configuration for the LVAE-based algorithms (HDN, microSplit)?
Ok so I did forget about the citations, refs etc. when I made the comment; but I guess moving them to the algorithm model classes, does make sense? (citations don't relate to the data).
Even if the configurations for LVAE based algorithms end up being split for data + algorithm validation, that doesn't mean the CARE-family configurations also have to be split.
But this is not a massive priority since it works fine as is, but if the number of configuration classes starts to become cumbersome we may want to consider it.
Description
We originally split the configuration in algorithm-specific configurations (child classes) to be able to perform validation across sub-configurations:
@melisande-c correctly pointed out that in #365 we are now removing the need for
N2VDataConfig
. The only difference betweenN2VConfiguration
andCAREConfiguration
are now:There will be no more validation across algorithm and data, at least for now.
Which part of the code?
careamics/src/careamics/config/n2v_configuration.py
Line 86 in 9a027a5
careamics/src/careamics/config/n2v_configuration.py
Line 189 in 9a027a5
Potential solutions
Therefore, a few aspects to discuss:
N2VAlgorithm
,CAREAlgorithm
etc. ?algorithm_config
as well isn't it?Solution 1: Remove algorithm-specific configurations
The main advantage is really to have a single
Configuration
type. Code-base will not change much:API will not really be impacted.
Solution 2: Change nothing
We keep a separated structure per algorithm. Advantages:
This comes at the cost of the multiplication of configurations, and a more complex documentation.
Did I miss anything? Opinions?
@CatEek @melisande-c @veegalinova @federico-carrara
The text was updated successfully, but these errors were encountered: