question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Include new dependency on simpletransformers/setup.py

See original GitHub issue

Hello!

I just updated my installation, and I realized, using a T5 model, that the datasets library is used, but it apparently wasn’t included in today’s update in the packages required in the setup.py file, forcing me to manually install the library. Is that right or did I miss something?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
ThilinaRajapaksecommented, Mar 20, 2021

Yes, datasets is now included (with 0.61). It should have been added to the setup file, my bad. Do you have any issues with datasets installed?

1reaction
splevinecommented, Mar 20, 2021

I couldn’t wait until Monday 😃

For the next version (0.60.1) I’m getting the same error when loading pretrained model:

---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-26-071bec092226> in <module>()
      2     "distilbert", model_location,
      3     args = {
----> 4         'use_cached_eval_features':False
      5     })

4 frames
/usr/local/lib/python3.7/dist-packages/simpletransformers/classification/classification_model.py in __init__(self, model_type, model_name, tokenizer_type, tokenizer_name, num_labels, weight, args, use_cuda, cuda_device, onnx_execution_provider, **kwargs)
    330         else:
    331             self.tokenizer = tokenizer_class.from_pretrained(
--> 332                 tokenizer_name, do_lower_case=self.args.do_lower_case, **kwargs
    333             )
    334 

/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)
   1703 
   1704         return cls._from_pretrained(
-> 1705             resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs
   1706         )
   1707 

/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in _from_pretrained(cls, resolved_vocab_files, pretrained_model_name_or_path, init_configuration, *init_inputs, **kwargs)
   1774         # Instantiate tokenizer.
   1775         try:
-> 1776             tokenizer = cls(*init_inputs, **init_kwargs)
   1777         except OSError:
   1778             raise OSError(

/usr/local/lib/python3.7/dist-packages/transformers/models/bert/tokenization_bert_fast.py in __init__(self, vocab_file, tokenizer_file, do_lower_case, unk_token, sep_token, pad_token, cls_token, mask_token, tokenize_chinese_chars, strip_accents, **kwargs)
    186             tokenize_chinese_chars=tokenize_chinese_chars,
    187             strip_accents=strip_accents,
--> 188             **kwargs,
    189         )
    190 

/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_fast.py in __init__(self, *args, **kwargs)
     85         if fast_tokenizer_file is not None and not from_slow:
     86             # We have a serialization from tokenizers which let us directly build the backend
---> 87             fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
     88         elif slow_tokenizer is not None:
     89             # We need to convert a slow tokenizer to build the backend

Exception: No such file or directory (os error 2)

I tried with the argument use_cached_eval_feature as True and False.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python Dependencies - Everything You Need to Know
Click to learn everything about Python dependencies - from managing and adding, to packaging, checking or downloading. Here's all you need!
Read more >
Managing Python dependencies with pip-tools ... - Siv Scripts
This post describes an easy-to-implement workflow for managing Python dependencies using pip-tools and requirements.txt.
Read more >
How to include rpm dependency in setup.py - Stack Overflow
I'm new to python but i want to create rpm package by using setuptools and bdist_rpm option. The problem I've occurred is how...
Read more >
Specifying Dependencies — Python Packaging Tutorial
Fortunately, setuptools makes it easy for us to specify those dependencies (assuming they are packaged correctly) and automatically install them when our ...
Read more >
Dependency Management With Python Poetry
Start a new Poetry project; Add Poetry to an existing project; Use the pyproject.toml file; Pin dependencies; Install dependencies with poetry.lock ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found