Skip to content

Improve hyperparameter parsing #295

Open
@cpnota

Description

@cpnota

Right now, we have a repeated piece of code:

    hyperparameters = {}
    for hp in args.hyperparameters:
        key, value = hp.split('=')
        hyperparameters[key] = type(agent.default_hyperparameters[key])(value)
    agent = agent.hyperparameters(**hyperparameters)

First of all, this would be better as a dict comprehension. Second of all, I think agent.hyperparameters could handle the type conversion in a more general way, instead of making the script do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions