Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

finBERT pretained model giving issues while calling it #44

Closed
Vishal-Mendekar opened this issue Mar 24, 2021 · 3 comments
Closed

finBERT pretained model giving issues while calling it #44

Vishal-Mendekar opened this issue Mar 24, 2021 · 3 comments

Comments

@Vishal-Mendekar
Copy link

Vishal-Mendekar commented Mar 24, 2021

Hi, I have ubuntu version 16. And I have cloned finBERT in my machine. I have also created a folder and have put the required files from hugging face website. Everything was working fine I had got the environment created by running environment.yml file provided in GitHub.

But when I am calling AutoModelForSequenceClassification.from_pretrained(file_path, cache_dir=None, num_labels=3)

1. I am getting Unable to open file (file signature not found) error.

2. Also, when I am checking for version of torch. It's 1.1.0 in my terminal whereas it is 1.6.0 in the jupyter notebook.

All this code is being executed in Jupyter Notebook

Here is the image of error I am getting
image

@doguaraci
Copy link
Member

Can you share what file_path is and the contents of the folder?

You should also make sure you're using the environment you intend to use in Jupyter. You can check that with Kernel menu on the Jupyter notebook.

@Vishal-Mendekar
Copy link
Author

When I checked in Kernel menu it had only 1 option Python 3.
kernel

I am attaching the snapshot of folder's content and the filepath

Filepath
filepath

Folder's Content

folder content

@sleung852
Copy link

you need to open a terminal and type:
conda activate finbert
conda install -c anaconda ipykernel
python -m ipykernel install --user --name=finbert

now you can go to your notebook and choose the kernel 'finbert'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants