lsfhuihuiff / MusicTI_AAAI2024

" Music Style Transfer with Time-Varying Inversion of Diffusion Models"
MIT License
35 stars 4 forks source link

`TestTubeLogger` deprecated for `pytorch-lightning` #2

Open jrgriffiniii opened 8 months ago

jrgriffiniii commented 8 months ago

Thank you very much for your superb and excellent paper (and, of course, for sharing your code base on GitHub)!

I am currently encountering the following when I attempt to reproduce some of this within my own environment:

Restored from /content/riffusion-model-v1.ckpt with 0 missing and 688 unexpected keys
Unexpected Keys: ['model_ema.decay', 'model_ema.num_updates', 'model_ema.diffusion_modeltime_embed0weight', 
[...]
'model_ema.diffusion_modelout2bias']
Traceback (most recent call last):
  File "/content/MusicTI_AAAI2024/./main.py", line 645, in <module>
    trainer_kwargs["logger"] = instantiate_from_config(logger_cfg)
  File "/content/MusicTI_AAAI2024/ldm/util.py", line 85, in instantiate_from_config
    return get_obj_from_str(config["target"])(**config.get("params", dict()), **kwargs)
  File "/content/MusicTI_AAAI2024/ldm/util.py", line 93, in get_obj_from_str
    return getattr(importlib.import_module(module, package=None), cls)
AttributeError: module 'pytorch_lightning.loggers' has no attribute 'TestTubeLogger'. Did you mean: 'NeptuneLogger'?

It seems that TestTubeLogger has been deprecated from pytorch-lightning: https://github.com/Lightning-AI/pytorch-lightning/issues/13958. Might there be anyone who has encountered this and found a solution please?

jrgriffiniii commented 8 months ago

Attempting to downgrade pytorch-lightning to release 1.5.9 (in response to https://lightning.ai/docs/pytorch/1.5.9/extensions/logging.html#supported-loggers) then yields the following error:

File "/usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/apply_func.py", line 32, in <module>
    from torchtext.data import Batch
ImportError: cannot import name 'Batch' from 'torchtext.data' (/usr/local/lib/python3.10/dist-packages/torchtext/data/__init__.py)
jrgriffiniii commented 8 months ago

Please note that I was able to successfully start training once I had downgraded to pytorch-lightning release 1.5.10.