Commit Graph
53 Commits
Author SHA1 Message Date
Marco Dal Farra 8f0b7f4d4e Restore autocast state on video predictor shutdown
Summary:
During development of an end2end test I encountered this bug.

SAM3's tracker enters a long-lived bfloat16 autocast context during model construction. Exit and clear that context when the owning video predictor shuts down so subsequent work in the same thread is not silently autocast.

___

Differential Revision: D115565123

fbshipit-source-id: 87dd514e974345d41b22a89569dd0ea3200bc53a
2026-08-13 22:33:07 -07:00
Chamath Wijesekera 96914d2425 Enable Pyrefly for deeplearning/projects
Summary:
Enables Pyrefly for `deeplearning/projects` by setting `python.set_pyrefly(True)` in the subdirectory PACKAGE file and adding targeted `# pyrefly: ignore` annotations. Part of splitting D113608658 into a per-subdirectory stack; the final diff performs the directory-level flip.

#buildall

Reviewed By: shugurov

Differential Revision: D113962590

fbshipit-source-id: 2c69a82e5f862fa2fcdfbecba9668814df931026
2026-07-30 17:21:37 -07:00
generatedunixname89002005307016 6dbb02bd38 Suppress type errors for Pyre upgrade
Summary:
This diff was automatically generated by the Pyre per-target upgrade tool.

It adds `# pyre-fixme` or `pyrefly: ignore` comments to suppress type errors that will be introduced by an upcoming Pyre or Pyrefly release. These suppressions allow the upgrade to proceed without breaking existing code.

Upgrading to new pyrefly Version. Without landing this diff your type checking tests may break. If assigned as a reviewer please help us get these diffs across the finish line. Thank you!

#pyreupgrade

Differential Revision: D113834959

fbshipit-source-id: 63169c3df9d594b58d39a33ab51c8866629dd1fa
2026-07-27 19:25:12 -07:00
Jaime Rodriguez Sanchez 46957e4780 SAM3: production-faithful torch.compile A/B benchmark
Summary:
scripts/bench_compile.py + :bench_compile target. Builds Sam3VideoPredictorMultiGPU with the exact scene_service constructor args + sam3_v4.pt, toggling compile, and measures the real per-frame served sequence (start_session on a single image + K add_prompt, mirroring Sam3Client.getMasksStream) plus optional propagate. --native-warmup mirrors prod Sam3DenseTrackingModel.warmup (_compile_model() direct + single-image warm) to verify 0 serve-time recompiles under TORCH_LOGS=recompiles.

Needs -c fbcode.enable_gpu_sections=true (else cudaErrorInvalidKernelImage on H100). Reuses measure_speed.py synth+timing helpers.

Reviewed By: flanggut

Differential Revision: D111922692

fbshipit-source-id: b2c96da965ce67e76e5e8837d3b08e020d138eea
2026-07-15 04:05:53 -07:00
generatedunixname2333890303787380 5dd401d1c5 Remove F401 unused imports in fbcode//deeplearning/projects/sam3_release:_sam3
Reviewed By: brittanyrey

Differential Revision: D108589523

fbshipit-source-id: 6e56192d205566bd3cc393839b15a3e921849fa8
2026-06-15 12:12:38 -07:00
generatedunixname1401739305002972 8e451d5eb4 Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/deeplearning/projects/sam3_release/sam3/model/sam3_image.py
Differential Revision: D105340230

fbshipit-source-id: ecb32f6146dcff7e16dd184f2e54c57897923bc3
2026-05-23 08:49:56 -07:00
generatedunixname1401739305002972 2814fa6194 Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/deeplearning/projects/sam3_release/sam3/model/io_utils.py
Differential Revision: D104793065

fbshipit-source-id: 1e6d98ee42fb51acfa4b0ce4b9bbe1251363b3e0
2026-05-16 01:56:52 -07:00
generatedunixname2094418054467506 32f5f81ab9 Fix python_unnecessary_generator_set_comprehension issues in deeplearning/.../silver/extract_frames.py
Differential Revision: D105295334

fbshipit-source-id: 3166b2df09bd7af1cea4dbd8dd7ba525a25bf9dd
2026-05-15 04:42:36 -07:00
generatedunixname2094418054467506 f66a2514df Fix python_unnecessary_generator_set_comprehension issues in deeplearning/.../transforms/filter_query_transforms.py
Differential Revision: D104956511

fbshipit-source-id: f15651e5407d543887ddff7e6bb0d5b494936443
2026-05-13 03:17:47 -07:00
generatedunixname1401739305002972 4cbac146c1 Fix PYRE_MISSING_ANNOTATIONS issues in fbcode/deeplearning/projects/sam3_release/sam3/model/io_utils.py
Differential Revision: D104644929

fbshipit-source-id: 53867910385982e0620979b9a46049fe4d02224d
2026-05-11 07:06:53 -07:00