the-full-stack / fsdl-text-recognizer-2022

Source of the FSDL 2022 labs, which are at https://github.com/full-stack-deep-learning/fsdl-text-recognizer-2022-labs
https://fullstackdeeplearning.com/course
MIT License
81 stars 26 forks source link

Error in lab 2a set up #86

Open kunschg opened 5 months ago

kunschg commented 5 months ago

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 commented 4 months ago

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

charlesfrye commented 4 months ago

It is not actively maintained anymore.

vinaykakkad commented 3 months ago

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).