diff --git a/candle-pyo3/py_src/candle/models/bert.py b/candle-pyo3/py_src/candle/models/bert.py index ecb238d86f..df1fa5bf36 100644 --- a/candle-pyo3/py_src/candle/models/bert.py +++ b/candle-pyo3/py_src/candle/models/bert.py @@ -155,7 +155,7 @@ def __init__(self, config: Config) -> None: ) def forward(self, input_ids: Tensor, token_type_ids: Tensor) -> Tensor: - (_batch_size, seq_len) = input_ids.shape + _batch_size, seq_len = input_ids.shape input_embeddings = self.word_embeddings.forward(input_ids) token_type_embeddings = self.token_type_embeddings.forward(token_type_ids) embeddings: Tensor = input_embeddings + token_type_embeddings diff --git a/candle-pyo3/py_src/candle/testing/__init__.py b/candle-pyo3/py_src/candle/testing/__init__.py index 240b635f28..c8fa706e0b 100644 --- a/candle-pyo3/py_src/candle/testing/__init__.py +++ b/candle-pyo3/py_src/candle/testing/__init__.py @@ -1,7 +1,6 @@ import candle from candle import Tensor - _UNSIGNED_DTYPES = set([str(candle.u8), str(candle.u32)]) diff --git a/candle-pyo3/pyproject.toml b/candle-pyo3/pyproject.toml index e98f6ee5b5..f64f1857e2 100644 --- a/candle-pyo3/pyproject.toml +++ b/candle-pyo3/pyproject.toml @@ -31,5 +31,5 @@ line-length = 119 target-version = ['py35'] [project.optional-dependencies] -testing = ["pytest", "black==22.3"] +testing = ["pytest", "black==26.3.1"] huggingface = ["transformers>=4.33.3", "huggingface-hub>=0.17.3"] \ No newline at end of file diff --git a/candle-pyo3/stub.py b/candle-pyo3/stub.py index b0e472e611..06cfad3f4a 100644 --- a/candle-pyo3/stub.py +++ b/candle-pyo3/stub.py @@ -7,7 +7,6 @@ from pathlib import Path import re - INDENT = " " * 4 GENERATED_COMMENT = "# Generated content DO NOT EDIT\n" TYPING = """from typing import Any, Callable, Dict, List, Optional, Tuple, Union, Sequence