Skip to content

Commit

Permalink
Updates to align with pytorch 3.8 requirements
Browse files Browse the repository at this point in the history
Signed-off-by: Ashvin Kumar <[email protected]>
  • Loading branch information
quic-ashvkuma committed Dec 19, 2024
1 parent ca2ecc7 commit f9a45fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
# =============================================================================
"""Utilities to traverse model graph"""

from typing import Dict, Optional, Generator
from typing import Dict, Optional, Generator, Tuple
from dataclasses import dataclass
import functools

Expand All @@ -61,7 +61,7 @@ class ConnectedGraphTraverser:
def __init__(self, sim: QuantizationSimModel):
self._sim = sim

def get_leaf_modules(self, torch_module: torch.nn.Module) -> Generator[tuple[str, torch.nn.Module], None, None]:
def get_leaf_modules(self, torch_module: torch.nn.Module) -> Generator[Tuple[str, torch.nn.Module], None, None]:
""" Get all the leaf modules in the given module """
for name, module in torch_module.named_modules():
if module not in self._sim.model.modules():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

import pytest
import torch
from torch import nn, candidate
from torch import nn

from aimet_common.defs import QuantizationDataType
from aimet_torch.v2.quantization.base.quantizer import QuantizerBase
Expand Down

0 comments on commit f9a45fe

Please sign in to comment.