Open lumurillo opened 11 months ago
Add two different FiftyOne callbacks:
The predictions and evaluation metrics can be automatically visualized into the FiftyOne app:
This PR is dependant of PR #209
Please check all relevant options.
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
pytest
CUDA_VISIBLE_DEVICES=0 python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16
CUDA_VISIBLE_DEVICES=0,1 python -m mart experiment=CIFAR10_CNN_Adv trainer=ddp trainer.precision=16 trainer.devices=2 model.optimizer.lr=0.2 trainer.max_steps=2925 datamodule.ims_per_batch=256 datamodule.world_size=2
pre-commit run -a
When using the GPU device, the trainer.predict throws the following error:
trainer.predict
RuntimeError: Input type (torch.cuda.FloatTensor) and weight type (torch.FloatTensor) should be the same
The input data is on GPU, but the model's weights is on CPU.
What does this PR do?
Add two different FiftyOne callbacks:
The predictions and evaluation metrics can be automatically visualized into the FiftyOne app:![image](https://github.com/IntelLabs/MART/assets/3821566/6de070a4-ac37-4f47-b425-e42acd485e5f)
This PR is dependant of PR #209
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.
pytest
CUDA_VISIBLE_DEVICES=0 python -m mart experiment=CIFAR10_CNN_Adv trainer=gpu trainer.precision=16
reports 70% (21 sec/epoch).CUDA_VISIBLE_DEVICES=0,1 python -m mart experiment=CIFAR10_CNN_Adv trainer=ddp trainer.precision=16 trainer.devices=2 model.optimizer.lr=0.2 trainer.max_steps=2925 datamodule.ims_per_batch=256 datamodule.world_size=2
reports 70% (14 sec/epoch).Before submitting
pre-commit run -a
command without errorsKnown issues
When using the GPU device, the
trainer.predict
throws the following error:The input data is on GPU, but the model's weights is on CPU.