pytest-dev / pytest-randomly

:game_die: Pytest plugin to randomly order tests and control random.seed
MIT License
630 stars 30 forks source link

Add tensorflow and pytorch random seed setting. #611

Closed StarryZhang-whu closed 8 months ago

StarryZhang-whu commented 8 months ago

Tests and README are included.

Add support for setting tensorflow and pytorch random seed. It can help detect flaky tests due to the randomness, and provide reproducibility.

Reference: [1] Dutta, Saikat, et al. "Detecting flaky tests in probabilistic and machine learning applications." Proceedings of the 29th ACM SIGSOFT international symposium on software testing and analysis. 2020.