Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save the video from the RLlib example locally #55

Closed
KennyOrellana opened this issue May 28, 2023 · 1 comment
Closed

Save the video from the RLlib example locally #55

KennyOrellana opened this issue May 28, 2023 · 1 comment

Comments

@KennyOrellana
Copy link

KennyOrellana commented May 28, 2023

Hi there! I'm currently trying to save a video from the RLlib example to my local storage, but I'm encountering an error. Would you have any idea what might be going wrong? Any help would be greatly appreciated!

    def on_episode_end(
            self,
            *,
            worker: RolloutWorker,
            base_env: BaseEnv,
            policies: Dict[PolicyID, Policy],
            episode: Episode,
            **kwargs,
    ) -> None:
        # vid = np.transpose(self.frames, (0, 3, 1, 2))
        # episode.media["rendering"] = wandb.Video(
        #     vid, fps=1 / base_env.vector_env.env.world.dt, format="mp4"
        # )

        save_video(self.name, self.frames, 1 / base_env.vector_env.env.world.dt)

        self.frames = []
@matteobettini
Copy link
Member

hello,

what is the problem you are encountering?
can you explain the error and link it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants