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

CT validation failed #35

Closed
KatieWoe opened this issue Oct 3, 2022 · 3 comments
Closed

CT validation failed #35

KatieWoe opened this issue Oct 3, 2022 · 3 comments

Comments

@KatieWoe
Copy link
Contributor

KatieWoe commented Oct 3, 2022

states-of-matter-basics : phet-io-state-fuzz : unbuilt
https://bayes.colorado.edu/continuous-testing/ct-snapshots/1664806025037/phet-io-wrappers/state/?sim=states-of-matter-basics&phetioDebug=true&phetioWrapperDebug=true&fuzz&wrapperContinuousTest=%7B%22test%22%3A%5B%22states-of-matter-basics%22%2C%22phet-io-state-fuzz%22%2C%22unbuilt%22%5D%2C%22snapshotName%22%3A%22snapshot-1664806025037%22%2C%22timestamp%22%3A1664811277450%7D
Uncaught Error: Uncaught Error: Assertion failed: validation failed:
value failed isValidValue: 0.12516835952823002,-0.04520528391221443,0.011994150299365127,0.043740680934289594,-0.03961915664993826,0.04990698507205404,0.018685014255593355,-0.00979403009213543,0.026304880710339748,-0.02299335345954832,0.008396796884235906,0.0797379262001249,-0.048631483771766584,-0.12895056250080394,0.016136213312628295,0.007065978426650863,0.036470892205578774,-0.0011029590893578932,-0.08061413275021193,-0.019835650531535493,-0.052727938514288336,0.03656019905388392,-0.028304160398512385,-0.010220019006701239,-0.005405748759915799,0.06342623949619802,0.028263762383751865,-0.0701806563300899,0.022894226790989073,-0.017959703195900924,-0.07498968756167211,0.004413131614989763,0.12173964976538007,-0.010010644369219062,0.017718062309188754,0.027122208718637516,0.006702526513724647,0.06552614972369451,0.08601631690604142,0.07992744521048255,-0.046577804295420605,0.053851772778596055,-0.11989410855434479,0.07297211284455953,0.00005823845528861969,-0.08900392479022326,0.06865711853099384,-0.22402051026321687,0.04613539849277751,-0.0801204558605548,1.8723647118364355,3.2068361391936504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
prunedValidator:
[object Object]
Error: Assertion failed: validation failed:
at window.assertions.assertFunction (https://bayes.colorado.edu/continuous-testing/ct-snapshots/1664806025037/assert/js/assert.js:28:13)
at assert (validate.ts:25:16)
at validate (StateSchema.ts:207:8)
at checkStateObjectValid (IOType.ts:421:42)
at isStateObjectValid (IOType.ts:461:9)
at validateStateObject (IOType.ts:298:23)
at toStateObject (MoleculeForceAndMotionDataSet.js:391:45)
at toStateObject (MoleculeForceAndMotionDataSet.js:494:80)
at toStateObject (IOType.ts:285:32)
at toStateObject (MultipleParticleModel.js:1376:87)
id: Bayes Puppeteer
Snapshot from 10/3/2022, 8:07:05 AM
@jbphet
Copy link
Contributor

jbphet commented Oct 3, 2022

I've done some investigation on this, and I believe it is due to a logic error in the validator for Float64ArrayIO.ts. @samreid - Can you please have a look at this? The commit in question is phetsims/tandem@49718a2, and the part of the validator that says !value.find( v => typeof v === 'number' ) looks questionable to me. Perhaps something like value.find( v => typeof v !== 'number' ) === undefined would work a little better.

@jbphet jbphet assigned samreid and unassigned jbphet Oct 3, 2022
@samreid
Copy link
Member

samreid commented Oct 7, 2022

Array.isArray( new Float64Array([21, 31]) ) also returns false, so that's a problem too.

UPDATE: My mistake, that is validating the state value, not the core value.

@samreid
Copy link
Member

samreid commented Oct 7, 2022

The proposed fix by @jbphet looks great, I committed it and the state fuzz is now passing for SOMB. Closing.

@samreid samreid closed this as completed Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants