I am trying to get Lesson 1 going on Colab. When I run the command:
fnames = get_image_files(path_img)
I get this error message:
NameError: name ‘path_img’ is not defined
Any help is appreciated.
Judy
I am trying to get Lesson 1 going on Colab. When I run the command:
fnames = get_image_files(path_img)
I get this error message:
NameError: name ‘path_img’ is not defined
Any help is appreciated.
Judy
I used this tutorial on Medium to download Kaggle and set up the API for the Digit Recognizer Competition.
Hope this helps
Can you share your notebook and I could have a look?
Hello, I’m having trouble getting the Rossman notebook to work on Colab. Here’s the relevant code:
from google.colab import drive
drive.mount('/content/gdrive', force_remount=True)
root_dir = "/content/gdrive/My Drive/"
base_dir = root_dir + 'fastai-v3/'
# Entered my authorization code...
path = base_dir + 'rossmann'
train_df = pd.read_pickle(path + "/" + 'train_clean')
I get:
FileNotFoundError: [Errno 2] No such file or directory: ‘/content/gdrive/My Drive/fastai-v3/rossmann/train_clean’
What am I doing wrong?
Is that the path to where your pickled dataframes are at?
Oh, I didn’t actually do any pickling or moving of files myself… Was there some other step I was supposed to do?
Did you follow the steps to do the feature engineering? Via this notebook: https://github.com/fastai/course-v3/blob/master/nbs/dl1/rossman_data_clean.ipynb
If so see if it’s in your base directory (content). If so your path is just Path(‘my file.csv’) (for example)
Ah I see. It seems I skipped over a very major step! Thank you.
Thanks much for responding. I got it working. Looks like the things various documents had told me to add in were actually keeping the code for running. Thanks again.
Hey, i don’t know if this is a relevant thread to ask this question, but while executing " from fastai.vision import * "
i got an error saying " VersionConflict: (fastprogress 0.1.22 (/usr/local/lib/python3.6/dist-packages), Requirement.parse(‘fastprogress>=0.2.1’)) "
This happened today, as i have executed that cell quite a few times
It is even happening while running the lesson-1 notebook
Any fix?
Hi Mantis,
I am having the same issue when trying to import any fastai libraries. Assume everyone using Colab will be having the same problems?
Not sure on a fix as I’m a beginner myself so will be watching this space for some solutions
Thanks for such an early reply,
i didn’t knew if anyone else was facing this problem
i found that simply resetting the runtime and not executing
!curl -s https://course.fast.ai/setup/colab | bash
seems to work fine (for me at least)
so i guess that the current update of fastai is causing version conflicts with colab in some way
Thanks for this, I gave up yesterday but will get back on it today! Good luck with deep learning
Hi Matt-le-kat Mantis
!curl -s https://course.fast.ai/setup/colab | bash
I tried colab today and it was fine!
Cheers mrfabulous1
Hi mrfabulous1,
I am still encountering the same problem about not being able to import any libraries from fastai package due to version conflicts, after executing
!curl -s https://course.fast.ai/setup/colab | bash
and updating fastai,
but everything seems to work fine when i simply don’t execute the command and don’t update anything
hope this gets addressed soon as it may cause some inconvenience in the future
Thanks for looking into this by the way
Hi Mantis hope you are well I ran your code below 10 mins ago and it
worked fine.
from fastai.vision import *
import pandas as pd
import numpy as np
import imutils
import glob
import cv2
import shutil
from tqdm import tqdm_notebook, tqdm
import matplotlib.pyplot as plt
pd.set_option(‘display.max_columns’, 500)
!curl -s https://course.fast.ai/setup/colab | bash
Everything worked fine. I also noticed in your error above that it is referring to fastprogress 0.1.22 the version being downloaded on colab is 0.2.1 also.
Maybe creating a new notebook and starting again may help?
Also the latest release of fastprogress was Dec 28, 2019 and is now 0.2.1
Cheers mrfabulous1 and a happy new year
Thank you so much for spending your precious time and looking into this
As i said the issue is solved and not really bothering me
i just wanted that this gets noticed as many newcomers doing things accordingly may encounter a problem
In your case everything worked fine because you executed
!curl -s https://course.fast.ai/setup/colab | bash
before importing stuff
to recreate this you will have to update the fastai first and then importing libraries
As you said that the latest release of fastprogress was on Dec 28, 2019, it was the same day that i started getting this error
creating a new notebook and starting again is still going to be a problem if we update fastai (according to the guide) first
still don’t look to much into it, as the simply not executing cell solves the issue
Happy new year to you too man
It seems to take hours to finish a learn.fit_one_cycle call. Can I save the training status in the middle and resume the training in case my colab session were disconnected before it is done?
Hi jerron hope you are well!
These links may help
https://docs.fast.ai/callbacks.html#SaveModelCallback
Cheers mrfabulous1