Skip to content

Hang in end_episode #144

Description

@jaguilar

Friends,

I'm using dm-reverb 0.14.0, and I'm getting a hang during end_episode() in my SAC implementation. This implementation is, as far as I can tell, copied verbatim from the one in the SAC minotaur demo on the tf-agents website. The only difference is I'm using a different env of my own design.

As far as I can tell, the sequence of events is:

  • In ReverbAddTrajectoryObserver.__call__, detect a boundary.
  • reset(False)
  • self._writer is not None, so we call end_episode()

That end_episode call never returns and no feedback is given in the logs as to why this might be.

For what it's worth, I do not have this problem when I run the SAC minitaur example from the tutorial. It seems like I can set up my revert client just fine there.


As I'm writing this, I found a workaround that appears to resolve the issue at least with respect to the problem I was having. In __call__, I adjusted the trajectory.is_boundary() condition at the end with:

else:
  self._get_writer().flush(10)

After that, I at least no longer hang. I'm still having other problems but at least this one seems to have been resolved.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions