Skip to content

Fix typehint error #859

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

Merged
merged 1 commit into from
Nov 8, 2023
Merged
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
4 changes: 2 additions & 2 deletions bitsandbytes/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import numpy as np

from functools import reduce # Required in Python 3
from typing import Tuple, Any
from typing import Tuple, Any, Dict
from torch import Tensor
from bitsandbytes.utils import pack_dict_to_tensor, unpack_tensor_to_dict

Expand Down Expand Up @@ -600,7 +600,7 @@ def __get_item__(self, idx):
return list_repr[idx]

@classmethod
def from_dict(cls, qs_dict: dict[str, Any], device: torch.device) -> 'QuantState':
def from_dict(cls, qs_dict: Dict[str, Any], device: torch.device) -> 'QuantState':
"""
unpacks components of state_dict into QuantState
where necessary, convert into strings, torch.dtype, ints, etc.
Expand Down