tsai
tsai copied to clipboard
Breaking change in fastai/fastcore breaks tsai 0.4.0
tsai has a dependency on fastai>=2.7.18, but the very recently released 2.8 includes a breaking change (https://github.com/AnswerDotAI/fastcore/pull/669) in fastcore:
>>> import tsai.imports
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\peter.liljenberg\code\ai\payrolldata\AI-SLL\tst\Lib\site-packages\tsai\imports.py", line 57, in <module>
from fastcore.dispatch import *
File "C:\Users\peter.liljenberg\code\ai\payrolldata\AI-SLL\tst\Lib\site-packages\fastcore\dispatch.py", line 2, in __getattr__
raise ImportError(
ImportError: Could not import '__path__' from fastcore.dispatch - this module has been moved to the fasttransform package.
To migrate your code, please see the migration guide at: https://answerdotai.github.io/fasttransform/fastcore_migration_guide.html
Ideally this breaking change should've been in a new major version, but that would still broken here since the >= version specifier would've been satisfied by a 3.0 version too. This can be handled short-term here in tsai by changing the dependency to fastai~=2.7.18 to avoid pulling in 2.8 or anything later until the code is updated to the new package structure.
A workaround is to manually downgrade fastai and fastcore after installing tsai (or in my case, synthcity which depends on this):
pip install fastcore==1.7.29 fastai==2.7.19
For compatibility with fastai>=2.8.0 you might want to look at this migration guide we wrote.
If you have any questions I'd be happy to help as I contributed quite a bit to this change.
In tsai/imports.py, there's from fastcore.dispatch import *.
I encountered this issue in version 0.3.9 as well.
Thanks for the downgrade tip!
I think it's closable: https://github.com/KI-AIM/Cinnamon/pull/169
Thanks for this! I still had to use:
fastcore==1.7.29
fastai==2.7.19
to ensure that tsai.imports worked.
This issue has been fixed in tsai==0.4.1
I still can't get this to work. If i downgrade it's complaning that it need pytorch<2.7. If I install latest fastai==2.8.5 the errror persists. Any suggestions without the downgrade?
这是来自QQ邮箱的假期自动回复邮件。您的邮件已收到,谢谢!