We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Since a recent PR, passing a configuration as dictionary, albeit with a an algorithm Pydantic model (rather than a dict itself ), will cause an error:
dict
value = {'algorithm_config': N2VAlgorithm(algorithm='n2v', loss='n2v', model=UNetModel(architecture='UNet', conv_dims=2, num_c...e=True, stopping_threshold=None, divergence_threshold=None, check_on_train_epoch_end=False, log_rank_zero_only=False))} def _algorithm_config_discriminator(value: Union[dict, Configuration]) -> str: """Discriminate algorithm-specific configurations based on the algorithm. Parameters ---------- value : Any Value to discriminate. Returns ------- str Discriminator value. """ if isinstance(value, dict): > return value["algorithm_config"]["algorithm"] E TypeError: 'N2VAlgorithm' object is not subscriptable
Indeed, we only check for the overall object being a dict, not the algorithm_config. However, it is perfectly legal to pass it as N2VAlgorithmConfig.
algorithm_config
N2VAlgorithmConfig
This will be superseded and solved by #367.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
Since a recent PR, passing a configuration as dictionary, albeit with a an algorithm Pydantic model (rather than a
dict
itself ), will cause an error:Indeed, we only check for the overall object being a
dict
, not thealgorithm_config
. However, it is perfectly legal to pass it asN2VAlgorithmConfig
.This will be superseded and solved by #367.
The text was updated successfully, but these errors were encountered: