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

🐛[BUG]: Corrdiff incompatible withSongUNetPosEmbd - constructor missing checkpoint_level argument #534

Closed
stathius opened this issue May 30, 2024 · 4 comments
Labels
? - Needs Triage Need team to review and classify bug Something isn't working

Comments

@stathius
Copy link
Contributor

stathius commented May 30, 2024

Version

0.7.0a

On which installation method(s) does this occur?

Docker, Source

Describe the issue

Analysis: The error comes from modulus.models.diffusion.song_unet.SongUNetPosEmbd not accepting the keyword_argument checkpoint_level.

Proposed fix: Add checkpoint_level to the constructor of SongUNetPosEmbd and pass it to its parent SongUNet.

Minimum reproducible example

python3 train.py --config-name=config_train_diffusion.yaml
config: 
     arch: ddpmpp-cwb
     precond: edmv1
     task: diffusion

Relevant log output

Traceback (most recent call last):
  File "/code/modulus/examples/generative/corrdiff/train.py", line 344, in main
    training_loop.training_loop(
  File "/code/modulus/examples/generative/corrdiff/training/training_loop.py", line 166, in training_loop   <--------------
    net = construct_class_by_name(**merged_args)  # subclass of torch.nn.Module
  File "/code/modulus/modulus/utils/generative/utils.py", line 306, in construct_class_by_name
    return call_func_by_name(*args, func_name=class_name, **kwargs)
  File "/code/modulus/modulus/utils/generative/utils.py", line 296, in call_func_by_name
    return func_obj(*args, **kwargs)
  File "/code/modulus/modulus/models/diffusion/preconditioning.py", line 969, in __init__ <--------------
    model = model_class(
  File "/code/modulus/modulus/models/module.py", line 65, in __new__
    bound_args = sig.bind_partial(
  File "/usr/lib/python3.10/inspect.py", line 3193, in bind_partial
    return self._bind(args, kwargs, partial=True)
  File "/usr/lib/python3.10/inspect.py", line 3175, in _bind
    raise TypeError(
TypeError: got an unexpected keyword argument 'checkpoint_level'

Environment details

python version: 3.10
modulus commit: `c07fa25321c48a1d71efca12b67d056adbca8bd4`
@stathius stathius added ? - Needs Triage Need team to review and classify bug Something isn't working labels May 30, 2024
@stathius stathius changed the title 🐛[BUG]: 🐛[BUG]: SongUNetPosEmbd constructor missing checkpoint_level argument May 30, 2024
@stathius stathius changed the title 🐛[BUG]: SongUNetPosEmbd constructor missing checkpoint_level argument 🐛[BUG]: Corrdiff not compatible withSongUNetPosEmbd - constructor missing checkpoint_level argument May 31, 2024
@stathius stathius changed the title 🐛[BUG]: Corrdiff not compatible withSongUNetPosEmbd - constructor missing checkpoint_level argument 🐛[BUG]: Corrdiff incompatible withSongUNetPosEmbd - constructor missing checkpoint_level argument May 31, 2024
@stathius stathius mentioned this issue May 31, 2024
5 tasks
@yairchn
Copy link
Collaborator

yairchn commented May 31, 2024

hi @stathius could you comment what checkpoint you used here?

@stathius
Copy link
Contributor Author

stathius commented Jun 2, 2024

hi @stathius could you comment what checkpoint you used here?

Hi @yairchn you mean for the regression U-Net? It was 053327 but I am not sure it matters in this case.

@daviddpruitt
Copy link
Collaborator

This is fixed with #550, closing the issue.

@stathius
Copy link
Contributor Author

stathius commented Jun 27, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
? - Needs Triage Need team to review and classify bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants