Skip to content

Commit ab40bb8

Browse files
committed
fix: upgrade black to 26.1.0 and reformat all files
1 parent 3a03eb2 commit ab40bb8

6 files changed

Lines changed: 10 additions & 7 deletions

File tree

neon_tree_classification/inference/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
66
Usage:
77
from neon_tree_classification.inference import TreeClassifier
8-
8+
99
# Load from checkpoint
1010
classifier = TreeClassifier.from_checkpoint(
1111
checkpoint_path='path/to/model.ckpt',
1212
taxonomic_level='species'
1313
)
14-
14+
1515
# Predict single image
1616
result = classifier.predict('path/to/image.jpg', top_k=5)
17-
17+
1818
# Batch prediction
1919
results = classifier.predict_batch(['img1.jpg', 'img2.jpg'])
2020
"""

neon_tree_classification/inference/model_registry.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from typing import Dict, Optional, List
99
import warnings
1010

11-
1211
# Model catalog - will be populated with HuggingFace URLs later
1312
AVAILABLE_MODELS = {
1413
"resnet_species": {

neon_tree_classification/inference/preprocessing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def load_image(
15-
image_input: Union[str, Path, Image.Image, np.ndarray, torch.Tensor]
15+
image_input: Union[str, Path, Image.Image, np.ndarray, torch.Tensor],
1616
) -> Image.Image:
1717
"""
1818
Load image from various input formats and convert to PIL Image.

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,3 +160,8 @@ exclude = [
160160

161161
[tool.ruff.per-file-ignores]
162162
"__init__.py" = ["F401"]
163+
164+
[dependency-groups]
165+
dev = [
166+
"black>=25.0.0",
167+
]

scripts/get_dataloaders.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
sys.path.append(str(Path(__file__).parent.parent))
3737
from neon_tree_classification.core.dataset import NeonCrownDataset
3838

39-
4039
DATASET_URL = "https://www.dropbox.com/scl/fi/v49xi6d7wtetctqphebx0/neon_tree_classification_dataset.zip?rlkey=fb7bz6kd0ckip4u0qd5xdor58&st=dvjyd5ry&dl=1"
4140

4241

scripts/upload_to_huggingface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def load_lightning_checkpoint(checkpoint_path: str) -> Dict[str, Any]:
4343

4444

4545
def extract_model_state_dict(
46-
lightning_state_dict: Dict[str, torch.Tensor]
46+
lightning_state_dict: Dict[str, torch.Tensor],
4747
) -> Dict[str, torch.Tensor]:
4848
"""Extract just the model weights from Lightning's state_dict.
4949

0 commit comments

Comments
 (0)