Skip to content

[BUG] torchopt.utils.extract_state_dict has an incorrect overloading annotation #161

Closed
@StefanoWoerner

Description

@StefanoWoerner

Required prerequisites

What version of TorchOpt are you using?

0.7.0

System information

Problem description

torchopt.utils.extract_state_dict has an incorrect overloading annotation. The detach_buffers argument is missing from the overloading stubs, meaning that the static type checker complains when using detach_buffers.

Reproducible example code

The Python snippets:

torchopt.extract_state_dict(
    nn.Linear(1,1), by="reference", detach_buffers=True
)

Traceback

No response

Expected behavior

Type checker correctly checks the intended usage of extract_state_dict.

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy