lightly icon indicating copy to clipboard operation
lightly copied to clipboard

Remove API client from LightlySSL

Open gabrielfruet opened this issue 5 months ago • 2 comments

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.

gabrielfruet avatar Jun 11 '26 13:06 gabrielfruet

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 85.77%. Comparing base (8a223fc) to head (f06dd3e). :warning: 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     

:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jun 11 '26 14:06 codecov[bot]

/review

gabrielfruet avatar Jun 11 '26 19:06 gabrielfruet