Open thuliu-yt16 opened 1 year ago
Other arguments will be needed.
trainer:
deterministic: True
benchmark: False
https://github.com/Lightning-AI/lightning/blob/6d888b5ce081277a89dc2fb9a2775b81d862fe54/src/lightning/pytorch/trainer/trainer.py#L239-L248 https://github.com/Lightning-AI/lightning/blob/6d888b5ce081277a89dc2fb9a2775b81d862fe54/src/lightning/pytorch/trainer/connectors/accelerator_connector.py#L655 https://pytorch.org/docs/stable/generated/torch.use_deterministic_algorithms.html
Some modules, such as CLIP, may use non-deterministic algorithms. https://github.com/openai/CLIP/issues/13
Thanks, I will try it!
Some CUDA operations, such as upsample2D, do not have a deterministic algorithm so far. So I will just leave the issue open until pytorch has some progress in its deterministic algorithm.
Although we have a configured seed for each experiment, I still observe different results from the same configuration. I suspect there exist some modules out of the
seed_everything
control. Does anyone have any inspiration for this?