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

Update docs with EpisodeData info #109

Merged
merged 3 commits into from Jul 17, 2023

Conversation

enerrio
Copy link
Contributor

@enerrio enerrio commented Jul 9, 2023

Description

This PR adds a section to the Dataset Standards documentation page describing the EpisodeData data structure and the fields it contains. Also includes a small snippet of sampling episodes from a Minari dataset.

Type of change

  • This change requires a documentation update

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
  • I have run pytest -v and no errors are present.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I solved any possible warnings that pytest -v has generated that are related to my code to the best of my knowledge.
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@balisujohn balisujohn self-requested a review July 9, 2023 22:07
Copy link
Collaborator

@balisujohn balisujohn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One change, otherwise, looks good!

| `id` | `np.int64` | ID of the episode. |
| `seed` | `np.int64` | Seed used to reset the episode. |
| `total_timesteps` | `np.int64` | Number of timesteps in the episode. |
| `observations` | `np.ndarray` | Observations for each timestep including initial observation. |
Copy link
Collaborator

@balisujohn balisujohn Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Observations and actions are not necessary represented as a single np.ndarray; it's worth looking at episodes from the various dummy envs used in test_dataset_creation.py, to get an idea of what is possible for observations and action types.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@balisujohn I updated the data types with the test spaces I saw in the test_dataset_creation.py and common.py files. Let me know what you think.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found the types tuple, list and dict, and numpy.ndarray from when I added at line 74 of test_dataset_creation.py:

    print(type(dataset[0].observations))

It might be fair to say List[str] though if so, I'd confirm that string spaces are the only context where lists occur.

Copy link
Contributor Author

@enerrio enerrio Jul 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, I updated data types. When it comes to list I only saw data type List[str] in datasets created in test_dataset_creation.py but left it as list in case there's some other dataset type I'm missing.

@balisujohn
Copy link
Collaborator

LGTM :^)

@balisujohn balisujohn merged commit aecc2a1 into Farama-Foundation:main Jul 17, 2023
12 checks passed
@enerrio enerrio deleted the update_dataset_doc branch July 17, 2023 17:40
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

Successfully merging this pull request may close these issues.

None yet

2 participants