Skip to content

Commit

Permalink
fix CI python format
Browse files Browse the repository at this point in the history
  • Loading branch information
jianan-gu committed Feb 13, 2024
1 parent 145a835 commit d270832
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bitsandbytes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
from .nn import modules

if COMPILED_WITH_CUDA:
from .optim import adam
from .backends import register_backend
from .backends.cuda import CUDABackend
from .optim import adam
register_backend("cuda", CUDABackend())
__pdoc__ = {
"libbitsandbytes": False,
Expand Down
1 change: 1 addition & 0 deletions bitsandbytes/backends/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from typing import Dict

import torch

from bitsandbytes.backends.base import Backend
Expand Down
1 change: 0 additions & 1 deletion bitsandbytes/backends/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
prod,
quantize_blockwise,
)

from bitsandbytes.utils import QuantState

from .base import Backend
Expand Down
10 changes: 4 additions & 6 deletions bitsandbytes/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@
from functools import reduce # Required in Python 3
import itertools
import operator
from typing import Any, Dict, Optional, Tuple
from typing import Optional, Tuple

import numpy as np
import torch
from torch import Tensor

from bitsandbytes.utils import pack_dict_to_tensor, unpack_tensor_to_dict
from bitsandbytes.backends import backends
from bitsandbytes.utils import QuantState

from .cextension import COMPILED_WITH_CUDA, lib

from bitsandbytes.utils import QuantState

from bitsandbytes.backends import backends

# math.prod not compatible with python < 3.8
def prod(iterable):
Expand Down Expand Up @@ -2064,4 +2062,4 @@ def extract_outliers(A, SA, idx):
def pipeline_test(A, batch_size):
out = torch.zeros_like(A)
lib.cpipeline_test(get_ptr(A), get_ptr(out), ct.c_size_t(A.numel()), ct.c_size_t(batch_size))
return out
return out
2 changes: 1 addition & 1 deletion bitsandbytes/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import shlex
import subprocess
from typing import Tuple, Dict, Any
from typing import Any, Dict, Tuple

import torch

Expand Down

0 comments on commit d270832

Please sign in to comment.