From ab0c1495a0b00b05fd9077cbd3d448a26d6aa44a Mon Sep 17 00:00:00 2001 From: Ben Weinstein Date: Fri, 20 Mar 2026 07:24:00 -0700 Subject: [PATCH] sets a max on python 3.14 for the moment and fixes CI --- .pre-commit-config.yaml | 3 +++ pyproject.toml | 2 +- src/deepforest/main.py | 5 ++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b1e6c0379..9112e6d1d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,9 @@ repos: name: docformatter entry: docformatter language: python + # pre-commit.ci currently provisions Python 3.14 for hook envs; DeepForest's + # tooling stack doesn't support that yet (e.g., `untokenize` build errors). + language_version: python3.12 additional_dependencies: [docformatter] types: [python] args: ["--in-place"] diff --git a/pyproject.toml b/pyproject.toml index 5155df2a0..470cd7e82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -3,7 +3,7 @@ name = "deepforest" version = "2.1.0" description = "Platform for individual detection from airborne remote sensing including trees, birds, and livestock. Supports multiple detection models, adding models for species classification, and easy fine tuning to particular ecosystems." readme = "README.md" -requires-python = ">=3.10,<3.15" +requires-python = ">=3.10,<3.14" license = {text = "MIT"} keywords = ["deep-learning", "forest", "ecology", "computer-vision"] classifiers = [ diff --git a/src/deepforest/main.py b/src/deepforest/main.py index f427a3c73..e22c9b4f9 100644 --- a/src/deepforest/main.py +++ b/src/deepforest/main.py @@ -9,9 +9,6 @@ import torch from omegaconf import DictConfig, OmegaConf from PIL import Image - -Image.MAX_IMAGE_PIXELS = None - from pytorch_lightning.callbacks import LearningRateMonitor from pytorch_lightning.loggers import CSVLogger from torch import optim @@ -22,6 +19,8 @@ from deepforest.datasets import prediction, training from deepforest.metrics import RecallPrecision +Image.MAX_IMAGE_PIXELS = None + class deepforest(pl.LightningModule): """DeepForest model for tree crown detection in RGB images.