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

Seeking Assistance with FileNotFoundError in Neural Network Model #18

Open
anasrogue opened this issue Dec 20, 2023 · 0 comments
Open

Comments

@anasrogue
Copy link

I attempted to run the code by executing !python main.py, and unfortunately, I encountered an issue with the following error:

!python main.py

Traceback (most recent call last):
File "/content/Dialog/main.py", line 10, in
from nn import build_model
File "/content/Dialog/nn/init.py", line 2, in
from .model import EncoderDecoder, build_model
File "/content/Dialog/nn/model/init.py", line 1, in
from .encoder_decoder import EncoderDecoder, build_model
File "/content/Dialog/nn/model/encoder_decoder.py", line 5, in
from .encoder import build_encoder
File "/content/Dialog/nn/model/encoder.py", line 2, in
from transformers.modeling_bert import BertModel
ModuleNotFoundError: No module named 'transformers.modeling_bert'


Additionally, when attempting to download the file with files.download('./data/ckpt.pth'), I received the following error:

from google.colab import files
files.download('./data/ckpt.pth')

FileNotFoundError Traceback (most recent call last)
in <cell line: 2>()
1 from google.colab import files
----> 2 files.download('./data/ckpt.pth')

/usr/local/lib/python3.10/dist-packages/google/colab/files.py in download(filename)
223 if not _os.path.exists(filename):
224 msg = 'Cannot find file: {}'.format(filename)
--> 225 raise FileNotFoundError(msg) # pylint: disable=undefined-variable
226
227 comm_manager = _IPython.get_ipython().kernel.comm_manager

FileNotFoundError: Cannot find file: ./data/ckpt.pth


I believe that the first error is related to a missing module, but I'm uncertain how to resolve it. Additionally, the second error seems to indicate that the file ckpt.pth cannot be found in the specified directory.

I would greatly appreciate it if you could provide some guidance on how to address these issues.

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

1 participant