这是indexloc提供的服务,不要输入任何密码
Skip to content

Error in obs norm #697

@tonystark262

Description

@tonystark262

I think isinstance( retval, (tuple, list)) is wrong as returned value will be an instance of (array, list) or (dict, list) etc.
In my case, my environment return array and dict info upon reset. Here this code doesn't interpret this as having info and because it is a tuple of array, list and not tuple of tuple,list

retval = self.venv.reset(id, **kwargs)
reset_returns_info = isinstance(
retval, (tuple, list)
) and len(retval) == 2 and isinstance(retval[1], dict)
if reset_returns_info:
obs, info = retval

Suggested edit
reset_returns_info = isinstance( retval[0], np.ndarray) and len(retval) == 2 and isinstance( retval[1], list)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions