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
This commit is contained in:
committed by
meta-codesync[bot]
parent
46957e4780
commit
6dbb02bd38
@@ -8,6 +8,8 @@ from multiprocessing import Pool
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
|
||||
# pyre-fixme[21]: Could not find module `fathomnet.api`.
|
||||
from fathomnet.api import images
|
||||
from tqdm import tqdm
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@ from pathlib import Path
|
||||
import numpy as np
|
||||
import pandas as pd
|
||||
import requests
|
||||
|
||||
# pyre-fixme[21]: Could not find module `utils`.
|
||||
import utils
|
||||
from PIL import Image
|
||||
from tqdm import tqdm
|
||||
|
||||
@@ -10,7 +10,10 @@ import sys
|
||||
from concurrent.futures import as_completed, ThreadPoolExecutor
|
||||
from pathlib import Path
|
||||
|
||||
# pyre-fixme[21]: Could not find module `yt_dlp`.
|
||||
import yt_dlp
|
||||
|
||||
# pyre-fixme[21]: Could not find module `utils`.
|
||||
from utils import (
|
||||
annotation_files,
|
||||
config,
|
||||
|
||||
@@ -16,6 +16,8 @@ from multiprocessing import Pool
|
||||
|
||||
from PIL import Image
|
||||
from tqdm import tqdm
|
||||
|
||||
# pyre-fixme[21]: Could not find module `utils`.
|
||||
from utils import (
|
||||
annotation_files,
|
||||
config,
|
||||
|
||||
@@ -6,6 +6,8 @@ from multiprocessing import Pool
|
||||
from pathlib import Path
|
||||
|
||||
import pandas as pd
|
||||
|
||||
# pyre-fixme[21]: Could not find module `utils`.
|
||||
import utils
|
||||
from tqdm import tqdm
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import os
|
||||
from functools import partial
|
||||
|
||||
import pandas as pd
|
||||
|
||||
# pyre-fixme[21]: Could not find module `saco_yt1b_frame_prep_util`.
|
||||
from saco_yt1b_frame_prep_util import YtVideoPrep
|
||||
from tqdm import tqdm
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import os
|
||||
import subprocess
|
||||
|
||||
import pandas as pd
|
||||
|
||||
# pyre-fixme[21]: Could not find module `yt_dlp`.
|
||||
import yt_dlp
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -153,9 +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`.
|
||||
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`.
|
||||
checkpoint_path: str = None,
|
||||
) -> float:
|
||||
torch.autocast(device_type="cuda", dtype=torch.bfloat16).__enter__()
|
||||
@@ -183,8 +185,14 @@ 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`.
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user