Skip to content

Commit

Permalink
Pyre Configurationless migration for] [batch:85/112] [shard:6/N]
Browse files Browse the repository at this point in the history
Reviewed By: inseokhwang

Differential Revision: D54438157

fbshipit-source-id: a6acfe146ed29fff82123b5e458906d4b4cee6a2
  • Loading branch information
connernilsen authored and facebook-github-bot committed Mar 5, 2024
1 parent 8bc535a commit 242366f
Show file tree
Hide file tree
Showing 54 changed files with 106 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fvcore/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

# This line will be programatically read/write by setup.py.
# Leave them at the bottom of this file and don't touch them.
__version__ = "0.1.6"
2 changes: 2 additions & 0 deletions fvcore/common/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
2 changes: 2 additions & 0 deletions fvcore/common/benchmark.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
# pyre-ignore-all-errors[2,3]
import sys
import time
Expand Down
2 changes: 2 additions & 0 deletions fvcore/common/checkpoint.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
# pyre-ignore-all-errors[2,3,58]

import logging
Expand Down
2 changes: 2 additions & 0 deletions fvcore/common/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import logging
import os
from typing import Any, Callable, Dict, IO, List, Union
Expand Down
2 changes: 2 additions & 0 deletions fvcore/common/download.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
from iopath.common.download import download


Expand Down
2 changes: 2 additions & 0 deletions fvcore/common/file_io.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import logging
import os
import tempfile
Expand Down
2 changes: 2 additions & 0 deletions fvcore/common/history_buffer.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

from typing import List, Optional, Tuple

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions fvcore/common/param_scheduler.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-strict
import bisect
import math
from typing import List, Optional, Sequence, Union
Expand Down
2 changes: 2 additions & 0 deletions fvcore/common/registry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

# pyre-strict
# pyre-ignore-all-errors[2,3]
from typing import Any, Dict, Iterable, Iterator, Tuple

Expand Down
2 changes: 2 additions & 0 deletions fvcore/common/timer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# -*- coding: utf-8 -*-

# pyre-strict

from time import perf_counter
from typing import Optional

Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-ignore-all-errors
from .activation_count import activation_count, ActivationCountAnalysis
from .flop_count import flop_count, FlopCountAnalysis
from .focal_loss import (
Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/activation_count.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
# pyre-ignore-all-errors[2,33]

from collections import defaultdict
Expand Down
1 change: 1 addition & 0 deletions fvcore/nn/distributed.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pyre-strict
from typing import List, Tuple

import torch
Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/flop_count.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
# pyre-ignore-all-errors[2,33]

from collections import defaultdict
Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/focal_loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import torch
from torch.nn import functional as F

Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/giou_loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import torch


Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/jit_analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

# pyre-strict
# pyre-ignore-all-errors[2,33]

import logging
Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/jit_handles.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

# pyre-strict
# pyre-ignore-all-errors[2,3,16,33,6,23]
# NOTE: most Any type in this file should be torch._C.Value - which was not yet annotated.
# pyre also doesn't work well with many Optional in this file
Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/parameter_count.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

# pyre-strict

import typing
from collections import defaultdict

Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/precise_bn.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
# pyre-ignore-all-errors[2,6,16]

import itertools
Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/print_model_statistics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

from collections import defaultdict
from typing import Any, Dict, Iterable, List, Optional, Set, Tuple

Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/smooth_l1_loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import torch


Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/squeeze_excitation.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

from typing import Optional

import torch
Expand Down
2 changes: 2 additions & 0 deletions fvcore/nn/weight_init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import torch.nn as nn


Expand Down
2 changes: 2 additions & 0 deletions fvcore/transforms/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

from .transform import *
2 changes: 2 additions & 0 deletions io_tests/test_file_io.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import os
import shutil
import tempfile
Expand Down
2 changes: 2 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
2 changes: 2 additions & 0 deletions tests/bm_common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

from fvcore.common.benchmark import benchmark
from test_common import TestHistoryBuffer

Expand Down
2 changes: 2 additions & 0 deletions tests/bm_focal_loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import torch
from fvcore.common.benchmark import benchmark
from test_focal_loss import TestFocalLoss, TestFocalLossStar
Expand Down
2 changes: 2 additions & 0 deletions tests/bm_main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import glob
import importlib
import sys
Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_composite.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import copy
import unittest

Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_constant.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import unittest

from fvcore.common.param_scheduler import ConstantParamScheduler
Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_cosine.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import copy
import unittest

Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_exponential.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import unittest

from fvcore.common.param_scheduler import ExponentialParamScheduler
Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_linear.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import unittest

from fvcore.common.param_scheduler import LinearParamScheduler
Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_multi_step.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import copy
import unittest

Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_polynomial.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import unittest

from fvcore.common.param_scheduler import PolynomialDecayParamScheduler
Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_step.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import copy
import unittest
from typing import Any, Dict
Expand Down
2 changes: 2 additions & 0 deletions tests/param_scheduler/test_scheduler_step_with_fixed_gamma.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates.

# pyre-ignore-all-errors

import copy
import unittest

Expand Down
2 changes: 2 additions & 0 deletions tests/test_activation_count.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
# pyre-ignore-all-errors[2]

import typing
Expand Down
2 changes: 2 additions & 0 deletions tests/test_checkpoint.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import copy
import os
import random
Expand Down
2 changes: 2 additions & 0 deletions tests/test_common.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import math
import time
import typing
Expand Down
2 changes: 2 additions & 0 deletions tests/test_flop_count.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
# pyre-ignore-all-errors[2,3,14,53]
import typing
import unittest
Expand Down
2 changes: 2 additions & 0 deletions tests/test_focal_loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import typing
import unittest

Expand Down
2 changes: 2 additions & 0 deletions tests/test_giou_loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import unittest

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions tests/test_jit_model_analysis.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

# pyre-strict
# pyre-ignore-all-errors[2,56]

import logging
Expand Down
2 changes: 2 additions & 0 deletions tests/test_layers_squeeze_excitation.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict
import itertools
import unittest
from typing import Iterable
Expand Down
2 changes: 2 additions & 0 deletions tests/test_param_count.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict


import unittest

Expand Down
2 changes: 2 additions & 0 deletions tests/test_precise_bn.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# -*- coding: utf-8 -*-

# pyre-strict

import itertools
import unittest
from typing import List, Tuple
Expand Down
2 changes: 2 additions & 0 deletions tests/test_print_model_statistics.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved

# pyre-strict

import unittest
from typing import Dict

Expand Down
2 changes: 2 additions & 0 deletions tests/test_smooth_l1_loss.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import unittest

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions tests/test_transform_util.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

# pyre-strict

import unittest

import numpy as np
Expand Down
Loading

0 comments on commit 242366f

Please sign in to comment.