Skip to content

[BREAKING] Drop TensorFlow backend#1967

Merged
felixdittrich92 merged 17 commits intomindee:mainfrom
felixT2K:drop-tf
Jul 9, 2025
Merged

[BREAKING] Drop TensorFlow backend#1967
felixdittrich92 merged 17 commits intomindee:mainfrom
felixT2K:drop-tf

Conversation

@felixT2K
Copy link
Copy Markdown
Contributor

@felixT2K felixT2K commented Jun 20, 2025

This PR:

  • Remove all TensorFlow content
  • Add PyTorch as fixed dependency
  • Drop documentation versions which rely on TensorFlow backend
  • Remove conda which does not support PyTorch builds anymore - since 2.15
  • Remove unused code for channels_last / first switch
  • Fix typings & unify predictor & model inputs - predictors (numpy array HWC) - direct model calls (torch tensor CHW)

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.27%. Comparing base (d01acdd) to head (d297a9c).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1967      +/-   ##
==========================================
- Coverage   96.93%   96.27%   -0.66%     
==========================================
  Files         172      141      -31     
  Lines        8633     6037    -2596     
==========================================
- Hits         8368     5812    -2556     
+ Misses        265      225      -40     
Flag Coverage Δ
unittests 96.27% <100.00%> (-0.66%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@felixdittrich92
Copy link
Copy Markdown
Collaborator

NOTE: API test will fail until merged

@felixdittrich92 felixdittrich92 self-assigned this Jun 23, 2025
@felixdittrich92 felixdittrich92 added topic: documentation Improvements or additions to documentation topic: build Related to dependencies and build topic: ci Related to CI module: models Related to doctr.models module: io Related to doctr.io module: utils Related to doctr.utils topic: docker Docker-related ext: scripts Related to scripts folder ext: tests Related to tests folder type: breaking change Introducing a breaking change module: datasets Related to doctr.datasets ext: demo Related to demo folder ext: references Related to references folder module: transforms Related to doctr.transforms ext: api Related to api folder topic: text detection Related to the task of text detection topic: text recognition Related to the task of text recognition topic: character classification Related to the task of character classification ext: docs Related to docs folder module: contrib Related to doctr.contrib labels Jun 23, 2025
@felixdittrich92 felixdittrich92 added this to the 1.0.0 milestone Jun 23, 2025
@felixT2K felixT2K marked this pull request as ready for review July 8, 2025 13:46
@felixdittrich92
Copy link
Copy Markdown
Collaborator

@sebastianMindee That should be everything for a first round to get rid of TensorFlow 😓 😅
API test should be green after it's merged

sebastianMindee
sebastianMindee previously approved these changes Jul 8, 2025
@felixdittrich92 felixdittrich92 dismissed sebastianMindee’s stale review July 9, 2025 06:25

The merge-base changed after approval.

@felixdittrich92 felixdittrich92 merged commit a054bda into mindee:main Jul 9, 2025
38 of 39 checks passed
@felixT2K felixT2K deleted the drop-tf branch July 9, 2025 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext: api Related to api folder ext: demo Related to demo folder ext: docs Related to docs folder ext: references Related to references folder ext: scripts Related to scripts folder ext: tests Related to tests folder module: contrib Related to doctr.contrib module: datasets Related to doctr.datasets module: io Related to doctr.io module: models Related to doctr.models module: transforms Related to doctr.transforms module: utils Related to doctr.utils topic: build Related to dependencies and build topic: character classification Related to the task of character classification topic: ci Related to CI topic: docker Docker-related topic: documentation Improvements or additions to documentation topic: text detection Related to the task of text detection topic: text recognition Related to the task of text recognition type: breaking change Introducing a breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants