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

Some versioning problems when installing the environment #78

Closed
ornithos opened this issue Feb 5, 2023 · 2 comments
Closed

Some versioning problems when installing the environment #78

ornithos opened this issue Feb 5, 2023 · 2 comments

Comments

@ornithos
Copy link

ornithos commented Feb 5, 2023

Thanks for this project @HHousen and the great docs!

I've been playing around with Getting Started and encountered a couple of errors, one of which was addressed here (the strict=False fix).

Something which I haven't found anywhere yet is the following stacktrace, which after digging through Pytorch Lightning (PL) releases appears to be an error due to a refactor at version 1.7.0.

Traceback (most recent call last):
  File "/.../TransformerSum/predictions_website.py", line 8, in <module>
    from extractive import ExtractiveSummarizer  # noqa: E402
  File "/.../TransformerSum/src/extractive.py", line 27, in <module>
    from data import FSDataset, FSIterableDataset, SentencesProcessor, pad_batch_collate
  File "/.../TransformerSum/src/data.py", line 14, in <module>
    from helpers import pad
  File "/.../TransformerSum/src/helpers.py", line 51, in <module>
    class StepCheckpointCallback(pl.callbacks.base.Callback):
AttributeError: module 'pytorch_lightning.callbacks' has no attribute 'base'

Since this is a breaking change in PL and TransformerSum is somewhat old I feel the best fix is just to downgrade pytorch-lightning as follows:

pip install pytorch-lightning==1.6.5

I also needed to specify python==3.10 in the environment definition since PL doesn't work under 3.11 yet. Perhaps other users would be helped by specifying these versions within the environment.yml file?

@g-surkis
Copy link

Hi there. Have the same issue.

@HHousen
Copy link
Owner

HHousen commented Apr 16, 2023

Good idea to fix this! Did pinning only python and pytorch-lightning solve all version issues for you?

I pinned everything in the environment.yml file so this doesn't happen again. I created a new environment with the pinned versions and tested extractive training and inference and it seems to work.

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