-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add shuffleCombo #4446
Add shuffleCombo #4446
Conversation
When shuffling an array of X and Y it's important that X still corresponds with Y. This is a useful utility for shuffling training data that is in JavaScript form.
@pyu10055 - I used this to shuffle X and Y in the same way. |
I'm having trouble seeing what is failing |
Wrt to the details link, it should give you access if you join one of the two mailing lists linked above (I can't remember if a google account is required but it might be). Are you already on one of those lists? |
@tafsiri - you rock. I missed that note, and now I can see the build issue. I'll dig into it. |
Thanks @tafsiri for getting me access to the logs. Sorry to bounce this back and forth so many times but I couldn't run the scripts on Windows, so I needed that access. Should be good for eval now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @GantMan and @pyu10055)
tfjs-core/src/util_base.ts, line 72 at r4 (raw file):
// tslint:disable-next-line:no-any array2: any[]|Uint32Array|Int32Array|Float32Array): void { console.assert(array.length === array2.length);
can you throw exception instead of using console.assert? TFJS support other platforms where console.assert might not be supported.
@pyu10055 - good call, all fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r5.
Reviewable status: 0 of 1 approvals obtained (waiting on @GantMan)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @pyu10055)
tfjs-core/src/util_base.ts, line 72 at r4 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
can you throw exception instead of using console.assert? TFJS support other platforms where console.assert might not be supported.
Done.
@pyu10055 - anything else on this one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Gant, can you add a unit test for this change?
Reviewable status: 0 of 1 approvals obtained (waiting on @pyu10055)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pyu10055 - I noticed there was no test for util.shuffle
either so I added a test for the existing shuffle
and for my new shuffleCombo
.
Reviewable status: 0 of 1 approvals obtained (waiting on @pyu10055)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 1 approvals obtained (waiting on @pyu10055)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r6.
Reviewable status: 0 of 1 approvals obtained (waiting on @pyu10055)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks
When shuffling an array of X and Y it's important that X still corresponds with Y.
This is a useful utility for shuffling training data that is in JavaScript form.
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is