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

Ragged batch #51

Merged
merged 3 commits into from
Oct 22, 2020
Merged

Ragged batch #51

merged 3 commits into from
Oct 22, 2020

Conversation

yuanqing-wang
Copy link
Member

@yuanqing-wang yuanqing-wang commented Oct 21, 2020

Provided helper functions so that we can batch records with various numbers of snapshots together.

Copy link
Member

@maxentile maxentile left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -222,3 +222,36 @@ def h5_to_dataset(df):
gs.append(g)

return esp.data.dataset.GraphDataset(gs)

def breakdown_along_time_axis(g, batch_size=32):
Copy link
Member

@maxentile maxentile Oct 21, 2020

Choose a reason for hiding this comment

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

should mention in docstring that (1) it modifies g in-place in addition to returning _gs, (2) it returns randomly sampled snapshots, not contiguous chunks along time axis

Copy link
Member

Choose a reason for hiding this comment

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

Oh, shoot, sorry -- I misread this! It only modifies idxs in place not g

@maxentile maxentile changed the title Rugged batch Ragged batch Oct 21, 2020
@yuanqing-wang yuanqing-wang merged commit 54a50fd into master Oct 22, 2020
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.

2 participants