fix(generator-networks-creator): repair zero viewport dimensions before training#550
Closed
sk8kpwhrjt-creator wants to merge 1 commit into
Closed
Conversation
Member
|
See #549 (review) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses #6.
@algora-pbc /claim #6
Summary
This follows the review feedback on #544 and #549 by keeping the fix out of runtime generation and out of the zod schema rejection path.
The patch repairs zero viewport dimensions in collected fingerprint records before they are deconstructed into the fingerprint training dataset:
innerWidth/innerHeightfrom the same record's screen, available screen, and outer window dimensionsclientWidth/clientHeightfrom the repaired inner viewport dimensionsThat prevents future fingerprint networks from learning the
innerWidth: 0,innerHeight: 0,clientWidth: 0,clientHeight: 0shape reported in #6 without rejecting the bulk of the existing corpus.Validation
pnpm exec vitest run test/generator-networks-creator/screen-viewport.test.ts test/generator-networks-creator/generator-networks-creator.test.tspnpm exec tsc --noEmit -p tsconfig.jsonpnpm exec prettier --check packages/generator-networks-creator/src/generator-networks-creator.ts packages/generator-networks-creator/src/screen-viewport.ts test/generator-networks-creator/screen-viewport.test.tspnpm --filter generator-networks-creator compilepnpm --filter generative-bayesian-network compilegit diff --check