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

Error in lab 2a set up #86

Open
kunschg opened this issue Mar 28, 2024 · 3 comments
Open

Error in lab 2a set up #86

kunschg opened this issue Mar 28, 2024 · 3 comments

Comments

@kunschg
Copy link

kunschg commented Mar 28, 2024

Hi,

When launching the lab 2a on Pytorch Lightning in Colab (https://colab.research.google.com/github/full-stack-deep-learning/fsdl-text-recognizer-2022-labs/blob/main/lab02/notebooks/lab02a_lightning.ipynb#scrollTo=sVx7C7H0PIZC), the first cell runs fine:

lab_idx = 2

if "bootstrap" not in locals() or bootstrap.run:
    # path management for Python
    pythonpath, = !echo $PYTHONPATH
    if "." not in pythonpath.split(":"):
        pythonpath = ".:" + pythonpath
        %env PYTHONPATH={pythonpath}
        !echo $PYTHONPATH

    # get both Colab and local notebooks into the same state
    !wget --quiet https://fsdl.me/gist-bootstrap -O bootstrap.py
    import bootstrap

    # change into the lab directory
    bootstrap.change_to_lab_dir(lab_idx=lab_idx)

    # allow "hot-reloading" of modules
    %load_ext autoreload
    %autoreload 2
    # needed for inline plots in some contexts
    %matplotlib inline

    bootstrap.run = False  # change to True re-run setup
    
!pwd
%ls

But the second outputs an error.

import pytorch_lightning as pl

version = pl.__version__

docs_url = f"https://pytorch-lightning.readthedocs.io/en/{version}/"  # version can also be latest, stable
docs_url

The error is:

OSError: /usr/local/lib/python3.10/dist-packages/torchtext/lib/libtorchtext.so: undefined symbol: _ZN3c109TupleTypeC1ESt6vectorINS_4Type24SingletonOrSharedTypePtrIS2_EESaIS4_EESt8optionalINS_13QualifiedNameEESt10shared_ptrINS_14FunctionSchemaEE

@SuibhneOFoighil
Copy link

yes ... I'm having the same issue. is this course maintained ?

@charlesfrye
Copy link
Collaborator

It is not actively maintained anymore.

@vinaykakkad
Copy link

Changing the versions for torch and torchtext fixed the issue for me.

! pip install -U torch==2.1 torchtext==0.16.0

The torch version from the course repo's requirement should be 2.1.*. The corresponding supported version for torchtext is 0.16.0 (source).

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

4 participants