mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Flip default value for mypy disallow_untyped_defs [4/11] (#127841)
See #127836 for details. Pull Request resolved: https://github.com/pytorch/pytorch/pull/127841 Approved by: https://github.com/oulgen
This commit is contained in:
committed by
PyTorch MergeBot
parent
afe15d2d2f
commit
62bcdc0ac9
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
from typing import Any, Optional, Dict, TYPE_CHECKING
|
from typing import Any, Optional, Dict, TYPE_CHECKING
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from torch.ao.pruning._experimental.data_sparsifier.data_norm_sparsifier import DataNormSparsifier
|
from torch.ao.pruning._experimental.data_sparsifier.data_norm_sparsifier import DataNormSparsifier
|
||||||
from torch.ao.pruning._experimental.data_scheduler.base_data_scheduler import BaseDataScheduler
|
from torch.ao.pruning._experimental.data_scheduler.base_data_scheduler import BaseDataScheduler
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
from torch.ao.pruning.sparsifier.utils import module_to_fqn, fqn_to_module
|
from torch.ao.pruning.sparsifier.utils import module_to_fqn, fqn_to_module
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import Callable, Optional, Union
|
from typing import Callable, Optional, Union
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
from operator import getitem
|
from operator import getitem
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import cast
|
from typing import cast
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch import nn
|
from torch import nn
|
||||||
from torch.nn.utils.parametrize import is_parametrized
|
from torch.nn.utils.parametrize import is_parametrized
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
"""
|
"""
|
||||||
Collection of conversion functions for linear / conv2d structured pruning
|
Collection of conversion functions for linear / conv2d structured pruning
|
||||||
Also contains utilities for bias propagation
|
Also contains utilities for bias propagation
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from .base_structured_sparsifier import BaseStructuredSparsifier
|
from .base_structured_sparsifier import BaseStructuredSparsifier
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"get_static_sparse_quantized_mapping",
|
"get_static_sparse_quantized_mapping",
|
||||||
"get_dynamic_sparse_quantized_mapping",
|
"get_dynamic_sparse_quantized_mapping",
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
|
|
||||||
from torch.ao.pruning import BaseSparsifier
|
from torch.ao.pruning import BaseSparsifier
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from .base_scheduler import BaseScheduler
|
from .base_scheduler import BaseScheduler
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from .base_scheduler import BaseScheduler
|
from .base_scheduler import BaseScheduler
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import abc
|
import abc
|
||||||
import copy
|
import copy
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from . import base_sparsifier
|
from . import base_sparsifier
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import Any, Dict, Optional, Type
|
from typing import Any, Dict, Optional, Type
|
||||||
from torch.nn.utils.parametrize import type_before_parametrizations, is_parametrized
|
from torch.nn.utils.parametrize import type_before_parametrizations, is_parametrized
|
||||||
from itertools import chain
|
from itertools import chain
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
from typing import Callable, Optional, Tuple, Union
|
from typing import Callable, Optional, Tuple, Union
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
# flake8: noqa: F403
|
# flake8: noqa: F403
|
||||||
|
|
||||||
from .fake_quantize import * # noqa: F403
|
from .fake_quantize import * # noqa: F403
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
import torch.ao.nn.quantized as nnq
|
import torch.ao.nn.quantized as nnq
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
import copy
|
import copy
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch.nn.parameter import Parameter
|
from torch.nn.parameter import Parameter
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import copy
|
import copy
|
||||||
import operator
|
import operator
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import operator
|
import operator
|
||||||
import torch
|
import torch
|
||||||
from torch.ao.quantization.backend_config import (
|
from torch.ao.quantization.backend_config import (
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Callable, Dict, List, Optional, Type, Union, TYPE_CHECKING
|
from typing import Any, Callable, Dict, List, Optional, Type, Union, TYPE_CHECKING
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from ._common_operator_config_utils import (
|
from ._common_operator_config_utils import (
|
||||||
_get_binary_op_configs,
|
_get_binary_op_configs,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
import torch.ao.nn.intrinsic as nni
|
import torch.ao.nn.intrinsic as nni
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from .backend_config import (
|
from .backend_config import (
|
||||||
BackendConfig,
|
BackendConfig,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import Dict, Any, List, Callable, Union, Tuple, Type
|
from typing import Dict, Any, List, Callable, Union, Tuple, Type
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch.ao.quantization.experimental.quantizer import APoTQuantizer
|
from torch.ao.quantization.experimental.quantizer import APoTQuantizer
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import Tuple
|
from typing import Tuple
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import copy
|
import copy
|
||||||
from typing import Any, Callable, List, Optional, Tuple, Type, Union
|
from typing import Any, Callable, List, Optional, Tuple, Type, Union
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
r"""
|
r"""
|
||||||
This file contains utility functions to convert values
|
This file contains utility functions to convert values
|
||||||
using APoT nonuniform quantization methods.
|
using APoT nonuniform quantization methods.
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch import Tensor
|
from torch import Tensor
|
||||||
from torch.ao.quantization.experimental.observer import APoTObserver
|
from torch.ao.quantization.experimental.observer import APoTObserver
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch import Tensor
|
from torch import Tensor
|
||||||
from torch.ao.quantization.experimental.quantizer import quantize_APoT, dequantize_APoT
|
from torch.ao.quantization.experimental.quantizer import quantize_APoT, dequantize_APoT
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
"""
|
"""
|
||||||
This module implements nonuniform observers used to collect statistics about
|
This module implements nonuniform observers used to collect statistics about
|
||||||
the values observed during calibration (PTQ) or training (QAT).
|
the values observed during calibration (PTQ) or training (QAT).
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch import Tensor
|
from torch import Tensor
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
"""Implements modules used to perform fake quantization."""
|
"""Implements modules used to perform fake quantization."""
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
import torch.ao.nn.intrinsic as nni
|
import torch.ao.nn.intrinsic as nni
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import math
|
import math
|
||||||
from typing import Optional, Tuple
|
from typing import Optional, Tuple
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch.fx import map_arg, Node
|
from torch.fx import map_arg, Node
|
||||||
from torch.fx.graph import Graph
|
from torch.fx.graph import Graph
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import Any, Dict, Set, Tuple, Callable, List
|
from typing import Any, Dict, Set, Tuple, Callable, List
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import Any, Dict, Set, Tuple, Callable
|
from typing import Any, Dict, Set, Tuple, Callable
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch.ao.quantization.observer import ObserverBase
|
from torch.ao.quantization.observer import ObserverBase
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from typing import Any, Set, Dict, List, Tuple, OrderedDict
|
from typing import Any, Set, Dict, List, Tuple, OrderedDict
|
||||||
from collections import OrderedDict as OrdDict
|
from collections import OrderedDict as OrdDict
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Any, Dict, List, Optional, Tuple, Type
|
from typing import Any, Dict, List, Optional, Tuple, Type
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from torch.fx import (
|
from torch.fx import (
|
||||||
GraphModule,
|
GraphModule,
|
||||||
Node,
|
Node,
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch.ao.quantization.backend_config import BackendConfig
|
from torch.ao.quantization.backend_config import BackendConfig
|
||||||
from torch.fx.graph import Node, Graph
|
from torch.fx.graph import Node, Graph
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
import copy
|
import copy
|
||||||
from torch.fx import GraphModule
|
from torch.fx import GraphModule
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import sys
|
import sys
|
||||||
import torch
|
import torch
|
||||||
from torch.fx.graph import (
|
from torch.fx.graph import (
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from typing import Dict, Any
|
from typing import Dict, Any
|
||||||
from torch.ao.quantization.utils import Pattern
|
from torch.ao.quantization.utils import Pattern
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import copy
|
import copy
|
||||||
import torch
|
import torch
|
||||||
import warnings
|
import warnings
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
import re
|
import re
|
||||||
from collections import defaultdict, OrderedDict
|
from collections import defaultdict, OrderedDict
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
from typing import Callable, Dict, List, Optional, Type
|
from typing import Callable, Dict, List, Optional, Type
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import copy
|
import copy
|
||||||
import torch
|
import torch
|
||||||
import torch.nn as nn
|
import torch.nn as nn
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
"""
|
"""
|
||||||
This module implements observers which are used to collect statistics about
|
This module implements observers which are used to collect statistics about
|
||||||
the values observed during calibration (PTQ) or training (QAT).
|
the values observed during calibration (PTQ) or training (QAT).
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import logging
|
import logging
|
||||||
import operator
|
import operator
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import types
|
import types
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import itertools
|
import itertools
|
||||||
from typing import Any, List, OrderedDict, Set, Optional, Callable
|
from typing import Any, List, OrderedDict, Set, Optional, Callable
|
||||||
import operator
|
import operator
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import logging
|
import logging
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch._subclasses import FakeTensor
|
from torch._subclasses import FakeTensor
|
||||||
from torch.ao.quantization.fx.prepare import (
|
from torch.ao.quantization.fx.prepare import (
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import dataclasses
|
import dataclasses
|
||||||
import itertools
|
import itertools
|
||||||
import operator
|
import operator
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch.fx import GraphModule
|
from torch.fx import GraphModule
|
||||||
from ..export_utils import _WrapperModule
|
from ..export_utils import _WrapperModule
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import operator
|
import operator
|
||||||
import types
|
import types
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from typing import Optional, Any, Union, Type
|
from typing import Optional, Any, Union, Type
|
||||||
from typing_extensions import deprecated
|
from typing_extensions import deprecated
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from typing import Any, Callable, Dict, Tuple, Union, List
|
from typing import Any, Callable, Dict, Tuple, Union, List
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import copy
|
import copy
|
||||||
import itertools
|
import itertools
|
||||||
import warnings
|
import warnings
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
from torch.ao.quantization.qconfig import QConfig
|
from torch.ao.quantization.qconfig import QConfig
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from abc import ABC, abstractmethod
|
from abc import ABC, abstractmethod
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from typing import Callable, Dict, List, Optional, Tuple, Union
|
from typing import Callable, Dict, List, Optional, Tuple, Union
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from torch.ao.quantization.pt2e.utils import _is_sym_size_node
|
from torch.ao.quantization.pt2e.utils import _is_sym_size_node
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import copy
|
import copy
|
||||||
import functools
|
import functools
|
||||||
import itertools
|
import itertools
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import copy
|
import copy
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import itertools
|
import itertools
|
||||||
import operator
|
import operator
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
|
|
||||||
from torch import nn
|
from torch import nn
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
"""
|
"""
|
||||||
Utils shared by different modes of quantization (eager/graph)
|
Utils shared by different modes of quantization (eager/graph)
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
"""
|
"""
|
||||||
``torch.autograd`` provides classes and functions implementing automatic
|
``torch.autograd`` provides classes and functions implementing automatic
|
||||||
differentiation of arbitrary scalar valued functions. It requires minimal
|
differentiation of arbitrary scalar valued functions. It requires minimal
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import operator
|
import operator
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
from typing_extensions import deprecated
|
from typing_extensions import deprecated
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import operator
|
import operator
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import os
|
import os
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
import itertools
|
import itertools
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import List, Tuple
|
from typing import List, Tuple
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import collections
|
import collections
|
||||||
import functools
|
import functools
|
||||||
import warnings
|
import warnings
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import abc
|
import abc
|
||||||
import collections
|
import collections
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from time import perf_counter_ns
|
from time import perf_counter_ns
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import itertools
|
import itertools
|
||||||
import warnings
|
import warnings
|
||||||
from typing_extensions import deprecated
|
from typing_extensions import deprecated
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import bisect
|
import bisect
|
||||||
import itertools
|
import itertools
|
||||||
import math
|
import math
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
from torch._C import _ImperativeEngine as ImperativeEngine
|
from torch._C import _ImperativeEngine as ImperativeEngine
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import types
|
import types
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
from typing import Dict, Tuple
|
from typing import Dict, Tuple
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import array
|
import array
|
||||||
import enum
|
import enum
|
||||||
import functools
|
import functools
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import contextlib
|
import contextlib
|
||||||
|
|
||||||
from typing import Union
|
from typing import Union
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
import warnings
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch.cuda
|
import torch.cuda
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
# mypy: allow-untyped-defs
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user