Skip to content
Discussion options

You must be logged in to vote

In the end, the solution was simply to modify the dataset class dynamically:

  def index_return_wrapper(dataset_cls: type) -> type:
      class IndexReturnWrapper(dataset_cls):
          def __getitem__(self, index: int) -> Tuple[Any, Any, int]:
              return super().__getitem__(index) + (index,)
      return IndexReturnWrapper

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Pedrexus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment