I’ve downloaded the pickle file that was generated while executing in the following notebook:
I want to load this file and run the predictions locally as an exercise. However, when loading the pickled model I’m getting an error:
File “Lesson7/l7_predict.py”, line 7, in
learn = load_learner(os.path.join(os.getcwd(), pickleFile))
File “/home/tromanow/HF/.env/lib/python3.8/site-packages/fastai/learner.py”, line 446, in load_learner
try: res = torch.load(fname, map_location=map_loc, pickle_module=pickle_module)
File “/home/tromanow/HF/.env/lib/python3.8/site-packages/torch/serialization.py”, line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
File “/home/tromanow/HF/.env/lib/python3.8/site-packages/torch/serialization.py”, line 1035, in _legacy_load
raise RuntimeError(“Invalid magic number; corrupt file?”)
RuntimeError: Invalid magic number; corrupt file?