pytorch / ignite

High-level library to help with training and evaluating neural networks in PyTorch flexibly and transparently.
https://pytorch-ignite.ai
BSD 3-Clause "New" or "Revised" License
4.51k stars 612 forks source link

Added python 3.12 dependency in CI #3219

Closed avinashsharma080 closed 6 months ago

avinashsharma080 commented 6 months ago

Fixes #3206

Description: Added python 3.12 to matrix in unit-test.yml and fixed extra whitespace in mnist.py

vfdev-5 commented 6 months ago

@avinashsharma080 as you said on discord, py312 is failing on some nlp metrics due to removed _normalize arg in Fraction:

return Fraction(numerator, denominator, _normalize=False)

TypeError: Fraction.__new__() got an unexpected keyword argument '_normalize'

~Can you remove _normalize arg everywhere it is used to see if it is really needed?~

- return Fraction(numerator, denominator, _normalize=False)
+ return Fraction(numerator, denominator)

Actually, it is nltk's code and not ignite.