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
This commit is contained in:
Chamath Wijesekera
2026-07-30 17:21:37 -07:00
committed by meta-codesync[bot]
parent 6dbb02bd38
commit 96914d2425
83 changed files with 595 additions and 583 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ from pathlib import Path
import requests
# pyre-fixme[21]: Could not find module `fathomnet.api`.
# pyrefly: ignore [missing-import]
from fathomnet.api import images
from tqdm import tqdm
@@ -11,7 +11,7 @@ import numpy as np
import pandas as pd
import requests
# pyre-fixme[21]: Could not find module `utils`.
# pyrefly: ignore [missing-import]
import utils
from PIL import Image
from tqdm import tqdm
+2 -2
View File
@@ -10,10 +10,10 @@ import sys
from concurrent.futures import as_completed, ThreadPoolExecutor
from pathlib import Path
# pyre-fixme[21]: Could not find module `yt_dlp`.
# pyrefly: ignore [missing-source-for-stubs]
import yt_dlp
# pyre-fixme[21]: Could not find module `utils`.
# pyrefly: ignore [missing-import]
from utils import (
annotation_files,
config,
+1 -1
View File
@@ -17,7 +17,7 @@ from multiprocessing import Pool
from PIL import Image
from tqdm import tqdm
# pyre-fixme[21]: Could not find module `utils`.
# pyrefly: ignore [missing-import]
from utils import (
annotation_files,
config,
@@ -7,7 +7,7 @@ from pathlib import Path
import pandas as pd
# pyre-fixme[21]: Could not find module `utils`.
# pyrefly: ignore [missing-import]
import utils
from tqdm import tqdm
+1 -1
View File
@@ -9,7 +9,7 @@ from functools import partial
import pandas as pd
# pyre-fixme[21]: Could not find module `saco_yt1b_frame_prep_util`.
# pyrefly: ignore [missing-import]
from saco_yt1b_frame_prep_util import YtVideoPrep
from tqdm import tqdm
@@ -8,7 +8,7 @@ import subprocess
import pandas as pd
# pyre-fixme[21]: Could not find module `yt_dlp`.
# pyrefly: ignore [missing-source-for-stubs]
import yt_dlp
logger = logging.getLogger(__name__)
+3 -8
View File
@@ -153,11 +153,11 @@ def run_test(
height: int,
n_frames: int,
synthesize_data: bool = True,
# pyre-fixme[9]: profile_save_dir has type `str`; used as `None`.
# pyrefly: ignore [bad-function-definition]
profile_save_dir: str = None,
profile_end_frame: int = -1,
do_compile: bool = True,
# pyre-fixme[9]: checkpoint_path has type `str`; used as `None`.
# pyrefly: ignore [bad-function-definition]
checkpoint_path: str = None,
) -> float:
torch.autocast(device_type="cuda", dtype=torch.bfloat16).__enter__()
@@ -185,14 +185,9 @@ def run_test(
build_kwargs["checkpoint_path"] = checkpoint_path
if version == "sam3.1":
build_kwargs["warm_up"] = do_compile
# pyre-fixme[6]: For 2nd argument expected `Union[bool, str]` but got `int`.
# pyrefly: ignore [bad-assignment]
build_kwargs["max_num_objects"] = num_objects
# pyre-fixme[6]: For 1st argument expected `Optional[str]` but got `Union[bool,
# str]`.
# pyre-fixme[6]: For 1st argument expected `bool` but got `Union[bool, str]`.
# pyre-fixme[6]: For 1st argument expected `int` but got `Union[bool, str]`.
# pyre-fixme[6]: For 1st argument expected `str` but got `Union[bool, str]`.
model_wrapper = build_sam3_predictor(**build_kwargs)
# Initialize session