Giter Club home page Giter Club logo

Comments (7)

JerryLuYujie avatar JerryLuYujie commented on May 17, 2024

me too

from course-v3.

JerryLuYujie avatar JerryLuYujie commented on May 17, 2024

I found I commented the line '#.filter_missing_y()', it will get right.
I think this notebook use old version fastai library.

from course-v3.

Data-drone avatar Data-drone commented on May 17, 2024

ah yeah I note that the latest notebook has that line removed as well and I have tested now and it does make the difference

from course-v3.

shirishr avatar shirishr commented on May 17, 2024

@Data-drone, @JerryLuYujie,
When I run the second cell in Classifier

data_clas = (TextList.from_folder(path, vocab=data_lm.vocab)
             #grab all the text files in path
             .split_by_folder(valid='test')
             #split by train and valid folder (that only keeps 'train' and 'test' so no need to filter)
             .label_from_folder(classes=['neg', 'pos'])
             #label them all with their folders
             .databunch(bs=bs))

data_clas.save('tmp_clas')

I get this error:

Exception: Your validation data contains a label that isn't present in the training set, please fix your data.

KeyError                                  Traceback (most recent call last)
~/Documents/fastai/courses/v3_dl1/fastai/data_block.py in process_one(self, item)
    281     def process_one(self,item):
--> 282         try: return self.c2i[item] if item is not None else None
    283         except:

KeyError: 'unsup'

Do you see the same?

from course-v3.

zhangjiekui avatar zhangjiekui commented on May 17, 2024

@shirishr I had get the same error as your's. Have you solved it?
Env:
ubuntu18.04
python3.7
fastai 1.0.38

from course-v3.

shirishr avatar shirishr commented on May 17, 2024

Just remove the unsub directory from train to some other outside location temporarily. This way train and test both have pos and neg only. Then that error goes away.

from course-v3.

zhangjiekui avatar zhangjiekui commented on May 17, 2024

@shirishr thanks.

from course-v3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.