Skip to content

Fixing errors with _obtain_steps function #27

@alexofficial

Description

@alexofficial

Hi,

I tried to collect the offline dataset of an online trained model using the _obtain_steps function. I found an error there, in lines 694-697, where two parenthesis are missing inside the file: scope-rl/scope-rl/dataset/synthetic.py
image

The solution is:

actions = np.zeros((n_trajectories * step_per_trajectory, self.action_dim))
action_probs = np.zeros((n_trajectories * step_per_trajectory,self.action_dim))

Secondly, there is a variable rollout_lengths (line 704), which causes an error in line 723 within the for loop. However, since there are no examples with _obtain_steps, I could not compare this. A quick solution was to simply change it from:
for rollout_step in rollout_lengths[i]:to forrollout_step in range(rollout_lengths[i]):`

Note: I have now successfully trained an offline RL model with the _obtain_steps function. Let me know if I can contribute in any way :)

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