Skip to content

Remove API client from LightlySSL#1939

Open
gabrielfruet wants to merge 11 commits into
masterfrom
gabriel-trn-1734-remove-api-client-from-lightlyssl
Open

Remove API client from LightlySSL#1939
gabrielfruet wants to merge 11 commits into
masterfrom
gabriel-trn-1734-remove-api-client-from-lightlyssl

Conversation

@gabrielfruet

@gabrielfruet gabrielfruet commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Removes the LightlyOne/API client surface from LightlySSL.

This includes:

  • Removing lightly.api, lightly.openapi_generated, and lightly.active_learning
  • Removing the lightly-download and lightly-serve CLI commands
  • Dropping API-only dependencies, tooling config, workflows, tests, mocks, and docs
  • Keeping the package version unchanged at 1.5.24

Breaking Changes

  • lightly.api is no longer available
  • lightly.openapi_generated is no longer available
  • lightly.active_learning is no longer available
  • lightly-download and lightly-serve CLI commands are removed

Users on the old ApiWorkflowClient workflow should pin to pip install "lightly<1.16" (see the deprecation ImportError raised by the package).

Verification

Before commit:

  • make format passed
  • ruff format-check: 446 files already formatted
  • Smoke test: lightly version 1.5.24, all public subpackages import OK
  • pytest: 1347 passed, 3 failed
    • Failures are pre-existing:
      • VideoLoader pickle x2
      • torch.allclose numerical failure
  • mypy: pre-existing INTERNAL ERROR in third-party transformers on Python 3.13, unrelated to these changes
  • Deprecated import shim tested: import lightly.api, from lightly import api, from lightly.api import ApiWorkflowClient, importlib.import_module("lightly.api") all raise the expected ImportError (tests/test_deprecated_api_import.py)

Follow-ups (intentionally deferred to separate PRs)

  • Version bump/fix: the package still reads 1.5.24 while the latest tag is v1.15.24. Fixing that (and coordinating the release notes) will be its own PR so this one stays scoped to the API removal.
  • Docs (external repo): companion PR lightly-ai/readme-docs#14 pins the install command to "lightly<1.16" in the three tutorials/recipes that still use ApiWorkflowClient (active-learning-for-waste-sorting, active-learning-yolov7, recipes/create-dataset).
  • README studio links: addressed in f06dd3e per the liopeer review (now points to https://docs.lightly.ai/studio/ instead of the renamed "Lightly Platform" strings).

Notes

No release/version bump and no customer communications work included.

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.77%. Comparing base (8a223fc) to head (f06dd3e).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1939      +/-   ##
==========================================
- Coverage   86.46%   85.77%   -0.70%     
==========================================
  Files         170      142      -28     
  Lines        7271     5730    -1541     
==========================================
- Hits         6287     4915    -1372     
+ Misses        984      815     -169     

☔ View full report in Codecov by Harness.
📢 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.

@gabrielfruet

Copy link
Copy Markdown
Contributor Author

/review

@gabrielfruet gabrielfruet marked this pull request as ready for review June 11, 2026 19:09
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread lightly/api/__init__.py

@MalteEbner MalteEbner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread lightly/api/__init__.py
configuration_cls=_Configuration,
_ERROR_MESSAGE = (
"lightly.api and ApiWorkflowClient have been removed from the lightly package. "
"The API workflow client is deprecated. If you need ApiWorkflowClient, use "

@MalteEbner MalteEbner Jun 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to repeat the previous sentence in other words

Suggested change
"The API workflow client is deprecated. If you need ApiWorkflowClient, use "
"If you need ApiWorkflowClient, use "

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants