IntelLabs / MART

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

Make `SequentialDict` return outputs from all modules as `DotDict` #171

Closed dxoigmn closed 1 year ago

dxoigmn commented 1 year ago

What does this PR do?

Right now SequentialDict only returns the output module. This requires hardcoding a module with that name and often makes configuration more verbose than necessary. This PR removes that requirement and simplifies configuration by returning all outputs in the form of a DotDict. This is a breaking change and also removes ReturnKwargs since it is unnecessary.

This PR depends upon the following:

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 🙃

dxoigmn commented 1 year ago

It looks like there're merged changes in mart/models/modular.py. I will review again after you merge main into this.

Should be good to review.

dxoigmn commented 1 year ago

Leave it for now because some modules still use it. Making everything tidier should be a different PR.