FS#73187 - [python-pytorch] Instance check of subclass of IterableDataset fails on python 3.10

Attached to Project: Community Packages
Opened by DarcyHu (DarcyHu) - Wednesday, 29 December 2021, 12:43 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Wednesday, 16 February 2022, 13:07 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description:
Instance check of subclass of IterableDataset fails on python 3.10, see also upstream issue https://github.com/pytorch/pytorch/issues/69911.
It is said that this bug is fixed after https://github.com/pytorch/pytorch/commit/d90012689f5b99bbc289da598ad982f829687288

Additional info:
* 1.10.1-1

Steps to reproduce:
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Wednesday, 16 February 2022, 13:07 GMT
Reason for closing:  Fixed
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 01 January 2022, 17:45 GMT
Sadly, the patch can't be cleanly cherrypicked. I guess we'll wait on a patch release.
Comment by James K J (James92) - Thursday, 06 January 2022, 08:48 GMT
Hi, Any idea when this bug gets fixed please.
Comment by DarcyHu (DarcyHu) - Thursday, 06 January 2022, 09:30 GMT
According to upstream (https://github.com/pytorch/pytorch/issues/69911), it will be fixed in 1.11. But I'm not sure when will it be release.
One could build it from the source with this PKGBUILD (https://github.com/archlinux/svntogit-community/tree/packages/python-pytorch/trunk/PKGBUILD) with some modifications:
1. update the source to use the latest commit
2. comment out some patches if it fails to build
3. update TORCH_CUDA_ARCH_LIST to your cuda arch
4. comment out the build and install step for python-pytorch if you need only python-pytorch-cuda
5. build it in a clean chroot using command: extra-x86_64-build
Comment by Randy Orion (showgood163) - Thursday, 27 January 2022, 03:53 GMT
https://github.com/pytorch/pytorch/issues/69911#issuecomment-1007571327 seems to be a simple fix for this type checking problem.

Will this patch to be applied?
Comment by Sven-Hendrik Haase (Svenstaro) - Friday, 28 January 2022, 02:11 GMT
Could you create a patch for the package? I'll apply it if you think it works well.

Loading...