Skip to content

Make SCIP result deterministic - #5665

Open
yangdanny97 wants to merge 4 commits into
pyrefly-org:mainfrom
yangdanny97:main
Open

yangdanny97 wants to merge 4 commits into
pyrefly-org:mainfrom
yangdanny97:main

Conversation

@yangdanny97

@yangdanny97 yangdanny97 commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

I realized the ordering of the SCIP documents is not deterministic when we dump the data. This PR adds a sorting pass at the end and also slightly tweaks the docs.

Storing these docs in memory increases peak memory by 150-200mb on pytorch

Perf vs scip-python on my macbook air

Pre-commit: 0.5 s and 157 MB versus 8.3 s and 457 MB.
Rich: 0.8 s and 190 MB versus about 29 s and 700 MB.
Django: 6 s and 748 MB versus 140 s and 4.4 GB. scip-python crashes on Django unless you raise Node’s memory limit.

@stroxler stroxler self-assigned this Nov 16, 2026

@stroxler stroxler left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

Could you rebase? We had an outage in diff import handling, but that should be fixed now

@meta-cla meta-cla Bot added the cla signed label Nov 17, 2026
@github-actions

Copy link
Copy Markdown

⚠️ Action needed: this PR is missing required items from our pull request checklist:

  • Add this checkbox to the PR description and check it: - [x] I am a human, and I fully understand the code I am submitting. See our AI policy.

Optional recommendations:

  • If this PR addresses an open issue, please link the issue in the PR description and claim it.

Note: this comment updates automatically after changes to the PR. Updates may take up to half an hour.

@meta-codesync

meta-codesync Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D132773044. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

This comment has been minimized.

@Wilfred

Wilfred commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

I think the test failures were an issue on main that were fixed in 6df5707, so another rebase should get everything green.

@yangdanny97

Copy link
Copy Markdown
Collaborator Author

rebased again

@github-actions github-actions Bot added size/xs and removed size/xs labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants