Is there a quick line of code I can use that would verify the loaded fast ai version is what is expected? ala similar to python v3 check:
import sys
if sys.version_info.major < 3:
raise Exception(“Must use Python 3”)
After flipping back and forth with .7 and 1.0 on different machines, it made me think this would be very helpful as first check to run to make sure the machine/environment is configed as expected rather than try and debug something non-obvious due to running a diff version of fastai than expected.
Thanks!
Thanks very much! That’s what I needed.
Note that for .7, it fails with:
Attribute Error:
module ‘fastai’ has no attribute ‘version’
but works as expected on 1.0.
Regardless, it’s a quick safety check to implement going forward, so thanks again.
Less
The error itself, is the best indicator/check you are on .7
This version feature I believe was only added for 1.0 and higher, so going forward you should always have a ready check.