IntelLabs / MART

Modular Adversarial Robustness Toolkit
BSD 3-Clause "New" or "Revised" License
16 stars 0 forks source link

Add utils for config instantiation. #250

Closed mzweilin closed 2 months ago

mzweilin commented 2 months ago

What does this PR do?

This PR add utils to instantiate from config files generated by python -m mart.generate_config.

(It should be better if we can get rid of the intermediate config files in the future.)

Type of change

Please check all relevant options.

Testing

Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.

Before submitting

Did you have fun?

Make sure you had fun coding 🙃

mzweilin commented 2 months ago

Why is this a lightning Callback?

Anomalib performs type checking when instantiate our Callback, so I have to make it a Callback explicitly. We also have the generic instantiate function/class that can instantiate any object.