diff --git a/.pyre_configuration b/.pyre_configuration index 919cd176c..5c3f97f33 100644 --- a/.pyre_configuration +++ b/.pyre_configuration @@ -17,6 +17,7 @@ "search_path": [ "stubs" ], + "show_error_traces": true, "strict": true, "version": "0.0.101732536891" } diff --git a/torchx/examples/apps/lightning/data.py b/torchx/examples/apps/lightning/data.py index cc8beb026..9ebc617b1 100644 --- a/torchx/examples/apps/lightning/data.py +++ b/torchx/examples/apps/lightning/data.py @@ -64,18 +64,15 @@ def __len__(self) -> int: # our trainer and other components that need to load data. -# pyre-fixme[13]: Attribute `test_ds` is never initialized. -# pyre-fixme[13]: Attribute `train_ds` is never initialized. -# pyre-fixme[13]: Attribute `val_ds` is never initialized. class TinyImageNetDataModule(pl.LightningDataModule): """ TinyImageNetDataModule is a pytorch LightningDataModule for the tiny imagenet dataset. """ - train_ds: ImageFolderSamplesDataset - val_ds: ImageFolderSamplesDataset - test_ds: ImageFolderSamplesDataset + train_ds: ImageFolderSamplesDataset # pyre-fixme[13]: Attribute `train_ds` is never initialized. + val_ds: ImageFolderSamplesDataset # pyre-fixme[13]: Attribute `val_ds` is never initialized. + test_ds: ImageFolderSamplesDataset # pyre-fixme[13]: Attribute `test_ds` is never initialized. def __init__( self, data_dir: str, batch_size: int = 16, num_samples: Optional[int] = None diff --git a/torchx/examples/apps/tracker/main.py b/torchx/examples/apps/tracker/main.py index 86e160786..0fd080902 100644 --- a/torchx/examples/apps/tracker/main.py +++ b/torchx/examples/apps/tracker/main.py @@ -99,6 +99,7 @@ def test( for data, target in test_loader: data, target = data.to(device), target.to(device) output = model(data) + # pyre-fixme[58] Assuming F.nll_loss(...).item() is a number test_loss += F.nll_loss( output, target, reduction="sum" ).item() # sum up batch loss diff --git a/torchx/pipelines/kfp/adapter.py b/torchx/pipelines/kfp/adapter.py index 513c7b698..8e5997cce 100644 --- a/torchx/pipelines/kfp/adapter.py +++ b/torchx/pipelines/kfp/adapter.py @@ -51,7 +51,7 @@ def component_spec_from_app(app: api.AppDef) -> Tuple[str, api.Role]: role = app.roles[0] assert ( role.num_replicas == 1 - ), f"KFP adapter only supports one replica, got {app.num_replicas}" + ), f"KFP adapter only supports one replica, got {app.num_replicas}" # pyre-fixme[16] Assume num_replicas is available on app command = [role.entrypoint, *role.args] diff --git a/torchx/schedulers/aws_batch_scheduler.py b/torchx/schedulers/aws_batch_scheduler.py index a354c57bc..f37742656 100644 --- a/torchx/schedulers/aws_batch_scheduler.py +++ b/torchx/schedulers/aws_batch_scheduler.py @@ -809,6 +809,7 @@ def _stream_events( startFromHead=True, **args, ) + # pyre-fixme[66] Assume this ResourceNotFoundException extends BaseException except self._log_client.exceptions.ResourceNotFoundException: return [] # noqa: B901 if response["nextForwardToken"] == next_token: diff --git a/torchx/schedulers/aws_sagemaker_scheduler.py b/torchx/schedulers/aws_sagemaker_scheduler.py index 28991249d..8a7b7eec5 100644 --- a/torchx/schedulers/aws_sagemaker_scheduler.py +++ b/torchx/schedulers/aws_sagemaker_scheduler.py @@ -261,9 +261,9 @@ def _submit_dryrun( raise ValueError( f"{key} is controlled by aws_sagemaker_scheduler and is set to {job_def[key]}" ) - value = cfg.get(key) # pyre-ignore[26] + value = cfg.get(key) if value is not None: - job_def[key] = value + job_def[key] = value # pyre-ignore[6] req = AWSSageMakerJob( job_name=job_name, diff --git a/torchx/schedulers/ray/ray_driver.py b/torchx/schedulers/ray/ray_driver.py index 8557cdf29..7f8d04c91 100644 --- a/torchx/schedulers/ray/ray_driver.py +++ b/torchx/schedulers/ray/ray_driver.py @@ -116,7 +116,9 @@ def load_actor_json(filename: str) -> List[RayActor]: return actors -def create_placement_group_async(replicas: List[RayActor]) -> PlacementGroup: +def create_placement_group_async( + replicas: List[RayActor], +) -> PlacementGroup: # pyre-ignore[11] """return a placement group reference, the corresponding placement group could be scheduled or pending""" bundles = [] for replica in replicas: