Skip to content

Recursion error due to Trainer string method #373

@PabloVD

Description

@PabloVD

Description

When printing the trainer, for instance print(runner.trainer), there is a recursion error:

    string = f"Trainer: {self}"
             ^^^^^^^^^^^^^^^^^^
  [Previous line repeated 326 more times]
RecursionError: maximum recursion depth exceeded while getting the str of an object

This is due to the fact that the str method refers to itself

    def __str__(self) -> str:
        string = f"Trainer: {self}"

What skrl version are you using?

1.4.3

What ML framework/library version are you using?

Pytorch

Additional system information

Ubuntu 22

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpending-releaseA solution was developed ('develop' branch). Pending for release to become officially available.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions