Skip to content

Issues with pytorch-lightning in Google Colab runbook #204

Open
@Kovah

Description

@Kovah

I just wanted to try this training Colab, but didn't make it work after almost an hour.

First try with the latest version of the runbook leads to this issue during the Environment Building step:

Collecting pytorch-lightning==1.7.6
  Downloading pytorch_lightning-1.7.6-py3-none-any.whl.metadata (27 kB)
WARNING: Ignoring version 1.7.6 of pytorch-lightning since it has invalid metadata:
Requested pytorch-lightning==1.7.6 from https://files.pythonhosted.org/packages/f2/22/37c64bd5b426297c71ecbb01ec2d340f013556a973a2cd6cd0aa68cda1ab/pytorch_lightning-1.7.6-py3-none-any.whl has invalid metadata: .* suffix can only be used with `==` or `!=` operators
    torch (>=1.9.*)
           ~~~~~~^
Please use pip<24.1 if you need to use this version.
ERROR: Could not find a version that satisfies the requirement pytorch-lightning==1.7.6 (from versions: 0.0.2, 0.2, 0.2.2, 0.2.3, ....)
ERROR: No matching distribution found for pytorch-lightning==1.7.6

Later on during the Training step, the runbook fails with this error:

Traceback (most recent call last):
  File "/content/Dreambooth-Stable-Diffusion/main.py", line 7, in <module>
    import pytorch_lightning as pl
ModuleNotFoundError: No module named 'pytorch_lightning'

So I tried upgrading pytorch-lighning to a newer version, but as soon as I upgrade to anything < 2.0 the Training step fails with this issues:

Traceback (most recent call last):
  File "/content/Dreambooth-Stable-Diffusion/main.py", line 12, in <module>
    import dreambooth_helpers.dreambooth_trainer_configurations as db_cfg
  File "/content/Dreambooth-Stable-Diffusion/dreambooth_helpers/dreambooth_trainer_configurations.py", line 2, in <module>
    from ldm.modules.pruningckptio import PruningCheckpointIO
  File "/content/Dreambooth-Stable-Diffusion/ldm/modules/pruningckptio.py", line 4, in <module>
    from pytorch_lightning.utilities.types import _PATH
ImportError: cannot import name '_PATH' from 'pytorch_lightning.utilities.types' (/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/types.py)

Which is exactly the same issue as in #118. At this point I gave up, as altering the runbook this much makes no further sense, especially given the fact that the issue is almost 2 years old.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions