Skip to content

TaskEntitiesInitializer - accounting for different initializer function signatures #20

@peterdavidfagan

Description

@peterdavidfagan

In the current implementation, an entity initializer within the TaskEntitiesInitializer
assumes the following args physics: mjcf.Physics and random_state: np.random.RandomState.

There are cases where initializers may accept optional args such as this initializer.

One option to solve this is to add kwargs to the task entity initializer and check for their presence in the __call__ function signature for a given initializer (this seems super unclean).

Adding this issue for reference as I have come across a case where I actually want to use an optional arg with my initializer. For now I am solving by fixing the optional arg in my initializer to the default value I want but it would likely be better to revise the task entities initializer API to handle this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions