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

[gala kinematic] split train and test stages #1751

Open
wants to merge 2 commits into
base: gala_kinematic
Choose a base branch
from

Conversation

vincentpierre
Copy link
Contributor

Motivation and Context

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@vincentpierre vincentpierre self-assigned this May 11, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label May 11, 2022
@vincentpierre vincentpierre changed the title split train and test stages [gala kinematic] split train and test stages May 11, 2022
Copy link
Contributor

@eundersander eundersander left a comment

Choose a reason for hiding this comment

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

I left some comments.

@@ -369,7 +369,7 @@ EpisodeSet generateBenchmarkEpisodeSet(const EpisodeGeneratorConfig& config,

// distribute stages across episodes
for (int i = 0; i < numEpisodes; i++) {
int stageIndex = i * config.numStageVariations / numEpisodes;
int stageIndex = i * (config.maxStageNumber - config.minStageNumber) / numEpisodes;
Copy link
Contributor

Choose a reason for hiding this comment

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

off-by-one here?

int numStageVariations = 12; // see selectedReplicaCadBakedStages
// int numStageVariations = 12; // see selectedReplicaCadBakedStages
int minStageNumber = 0;
int maxStageNumber = 12;
Copy link
Contributor

Choose a reason for hiding this comment

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

off-by-one here? previously, the max stage index was 11, because there are only 12 stages.

@@ -13,7 +13,9 @@ namespace batched_sim {
struct EpisodeGeneratorConfig {
int numEpisodes = 100;
int seed = 3; // this is 3 for legacy reason
int numStageVariations = 12; // see selectedReplicaCadBakedStages
// int numStageVariations = 12; // see selectedReplicaCadBakedStages
int minStageNumber = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

"index" is probably a better term than "number"

.def_readwrite("num_stage_variations", &EpisodeGeneratorConfig::numStageVariations, R"(Todo)")
// .def_readwrite("num_stage_variations", &EpisodeGeneratorConfig::numStageVariations, R"(Todo)")
.def_readwrite("min_stage_number", &EpisodeGeneratorConfig::minStageNumber, R"(Todo)")
.def_readwrite("max_stage_number", &EpisodeGeneratorConfig::maxStageNumber, R"(Todo)")
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI, the docstring is optional...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants