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

Missing-observation-autocomplete #231

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions rlbench/demo.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import numpy as np
from typing import List
from rlbench.backend.observation import Observation


class Demo(object):

def __init__(self, observations, random_seed=None, num_reset_attempts = None):
def __init__(self, observations: List[Observation], random_seed=None, num_reset_attempts=None):
self._observations = observations
self.random_seed = random_seed
self.num_reset_attempts = num_reset_attempts

def __len__(self):
return len(self._observations)

def __getitem__(self, i):
def __getitem__(self, i) -> Observation:
return self._observations[i]

def restore_state(self):
Expand Down
Loading