Giter Site home page Giter Site logo

TypeError: convert_examples_to_features() got an unexpected keyword argument 'sep_token_extra' about pytorch-transformers-classification HOT 6 OPEN

thilinarajapakse avatar thilinarajapakse commented on May 18, 2024
TypeError: convert_examples_to_features() got an unexpected keyword argument 'sep_token_extra'

from pytorch-transformers-classification.

Comments (6)

ThilinaRajapakse avatar ThilinaRajapakse commented on May 18, 2024

I can't reproduce this. Are you using the latest version of the repo?

from pytorch-transformers-classification.

Mahhos avatar Mahhos commented on May 18, 2024

I downloaded the repo and run jupyter notebook. data_prep works well. Then I ran run_model.ipynb and it keeps raising this error.
TypeError: convert_examples_to_features() got an unexpected keyword argument 'sep_token_extra

from pytorch-transformers-classification.

Mahhos avatar Mahhos commented on May 18, 2024

I just figured out that the generated files do not have the ordering as train_df = pd.DataFrame({ 'id':range(len(train_df)), 'label':train_df[0], 'alpha':['a']*train_df.shape[0], 'text': train_df[1].replace(r'\n', ' ', regex=True) }) and they are in alphabetical order. I was thinking that it might be a python version issue. I am using python 3.7.4. Do you know what might be wrong?

from pytorch-transformers-classification.

ThilinaRajapakse avatar ThilinaRajapakse commented on May 18, 2024

It might be an issue with pandas. Try updating pandas to the latest version.

from pytorch-transformers-classification.

Mahhos avatar Mahhos commented on May 18, 2024

I resolved the ordering issue. But I am still getting the same error. TypeError: convert_examples_to_features() got an unexpected keyword argument 'sep_token_extra. May I know the exact python version you used?

from pytorch-transformers-classification.

ThilinaRajapakse avatar ThilinaRajapakse commented on May 18, 2024

Python 3.7. I can't remember the exact version, although I can check later.

The function that is throwing the error is in the utils.py file. Please check whether this keyword is given in the parameter lost.

Also, please do consider switching to the Simple Transformers library linked in the readme unless there is a reason for using this particular repo. This repo relies on an outdated version of the Hugging Face library.

from pytorch-transformers-classification.

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.