Skip to content

Wrong Params get saved in basic_tree_search.py #6

@grrrrrrrg

Description

@grrrrrrrg

In basic_tree_search.py in line 269 it says:

with open(args.output+".params", 'wb') as f:
    pkl.dump({
        'V' : get_V_params(V_opt_state),
        'pi' : get_pi_params(pi_opt_state)
    },  f)

Which does save the untrained parameters that are initialised in line 235 and not changed after:
env_states, V_func, pi_func, V_opt_state, pi_opt_state, V_opt_update, pi_opt_update, get_V_params, V_target_params, get_pi_params = get_init_fn(env)(subkey)

Instead I think it should save the trained parameters stored in run_state:

with open(args.output+".params", 'wb') as f:
    pkl.dump({
        'V' : get_V_params(run_state['V_opt_state']),
        'pi' : get_pi_params(run_state['pi_opt_state'])
    },  f)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions