Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MMP updates to align with Python 3.8 requirements #3681

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading