Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,13 @@ jobs:
if: matrix.python == '3.7'
run: |
source .venv/bin/activate
export LIGHTLY_SERVER_LOCATION="localhost:-1"
python -m pytest -s -v --runslow --ignore=./lightly/openapi_generated/
python -m pytest -s -v --runslow
- name: Run Pytest with Coverage (Python 3.12)
if: matrix.python == '3.12'
run: |
source .venv/bin/activate
export LIGHTLY_SERVER_LOCATION="localhost:-1"
uv pip install pytest-cov==5.0.0
python -m pytest -s -v --runslow --cov=./lightly --cov-report=xml --ignore=./lightly/openapi_generated/
python -m pytest -s -v --runslow --cov=./lightly --cov-report=xml
- name: Upload Coverage to Codecov
if: matrix.python == '3.12'
uses: codecov/codecov-action@v4
Expand Down
52 changes: 0 additions & 52 deletions .github/workflows/test_api_deps_only.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/test_minimal_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,4 @@ jobs:
- name: Run Tests
run: |
source .venv/bin/activate
export LIGHTLY_SERVER_LOCATION="localhost:-1"
python -m pytest -s -v --runslow
3 changes: 0 additions & 3 deletions .github/workflows/test_setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ jobs:
- name: Test CLI
run: |
source .venv/bin/activate
LIGHTLY_SERVER_LOCATION="localhost:-1"
lightly-crop --help
lightly-ssl-train --help
lightly-embed --help
lightly-magic --help
lightly-download --help
lightly-version
- name: Test CLI on Dataset
run: |
source .venv/bin/activate
LIGHTLY_SERVER_LOCATION="localhost:-1"
git clone https://github.com/alexeygrigorev/clothing-dataset-small clothing_dataset_small
INPUT_DIR_1="clothing_dataset_small/test/dress"
lightly-ssl-train input_dir=$INPUT_DIR_1 trainer.max_epochs=1 loader.num_workers=6
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/tests_unmocked.yml

This file was deleted.

8 changes: 0 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ install-dev:
pre-commit install


# Install package with API dependencies only.
# Should be same command as in the docs with some extra flags for CI:
# https://docs.lightly.ai/docs/install-lightly#install-the-lightly-python-client
.PHONY: install-api-only
install-api-only:
uv pip install --exclude-newer ${EXCLUDE_NEWER_DATE} --requirement requirements/base.txt
uv pip install --exclude-newer ${EXCLUDE_NEWER_DATE} . --no-deps

# Install package with minimal dependencies.
#
# This command is split into multiple steps:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ a single command, please contact sales@lightly.ai.

We've also built a whole platform on top, with additional features for active learning
and [data curation](https://docs.lightly.ai/docs/what-is-lightly). If you're interested in the
Lightly Worker Solution to easily process millions of samples and run [powerful algorithms](https://docs.lightly.ai/docs/customize-a-selection)
LightlyStudio, our all-in-one product for [data curation and labeling](https://docs.lightly.ai/studio/)
on your data, check out [lightly.ai](https://www.lightly.ai). It's free to get started!

## News 🚀
Expand Down Expand Up @@ -444,7 +444,7 @@ You can find out more about the company and it's services by following the links
- [Homepage](https://www.lightly.ai)
- [LightlyTrain](https://docs.lightly.ai/train/stable/index.html)
- [Web-App](https://app.lightly.ai)
- [Lightly Solution Documentation (Lightly Worker & API)](https://docs.lightly.ai/)
- [LightlyStudio](https://docs.lightly.ai/studio/)
- [Lightly's AwesomeSSL](https://github.com/lightly-ai/awesome-self-supervised-learning) (collection of SSL papers)

[Back to top🚀](#top)
27 changes: 0 additions & 27 deletions docs/source/getting_started/command_line_tool.rst
Original file line number Diff line number Diff line change
Expand Up @@ -180,33 +180,6 @@ The embeddings.csv file should look like the following:
101101-1.jpg,-67.958,-2.800,-28.861,103.812,0
101146-1.jpg,-59.831,-2.719,-25.413,90.945,0

Download data using the CLI
-----------------------------------------------
You can download a dataset with a given tag from the Lightly Platform using the
following CLI command. The CLI provides you with three options:

* Download the list of filenames for a given tag in the dataset.

* Download the images for a given tag in the dataset.

* Copy the images for a given tag from an input directory to a target directory.

The last option allows you to very quickly extract only the images in a given tag
without the need to download them explicitly.

.. code-block:: bash

# download a list of files
lightly-download tag_name=my_tag_name dataset_id=your_dataset_id token=your_token

# download the images and store them in an output directory
lightly-download tag_name=my_tag_name dataset_id=your_dataset_id token=your_token \
output_dir=path/to/output/dir

# copy images from an input directory to an output directory
lightly-download tag_name=my_tag_name dataset_id=your_dataset_id token=your_token \
input_dir=path/to/input/dir output_dir=path/to/output/dir

.. _ref-breakdown-lightly-magic:

Breakdown of lightly-magic
Expand Down
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ Lightly AI
:caption: Python API

lightly
lightly.api
lightly.cli
lightly.core
lightly.data
Expand Down
14 changes: 0 additions & 14 deletions docs/source/lightly.api.rst

This file was deleted.

5 changes: 0 additions & 5 deletions docs/source/lightly.cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ lightly.cli
.. automodule:: lightly.cli.embed_cli
:members:

.download_cli
---------------
.. automodule:: lightly.cli.download_cli
:members:

.version_cli
-------------
.. automodule:: lightly.cli.version_cli
Expand Down
21 changes: 1 addition & 20 deletions lightly/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@

The framework is structured into the following modules:

- **api**:

The lightly.api module handles communication with the Lightly web-app.

- **cli**:

The lightly.cli module provides a command-line interface for training
self-supervised models and embedding images. Furthermore, the command-line
tool can be used to upload and download images from/to the Lightly web-app.
self-supervised models and creating embeddings.

- **core**:

Expand Down Expand Up @@ -76,17 +71,3 @@

__name__ = "lightly"
__version__ = "1.5.24"


import os

if os.getenv("LIGHTLY_DID_VERSION_CHECK", "False") == "False":
os.environ["LIGHTLY_DID_VERSION_CHECK"] = "True"
import multiprocessing

if multiprocessing.current_process().name == "MainProcess":
from lightly.api import _version_checking

_version_checking.check_is_latest_version_in_background(
current_version=__version__
)
11 changes: 0 additions & 11 deletions lightly/active_learning/__init__.py

This file was deleted.

6 changes: 0 additions & 6 deletions lightly/active_learning/config/__init__.py

This file was deleted.

58 changes: 0 additions & 58 deletions lightly/active_learning/config/selection_config.py

This file was deleted.

18 changes: 8 additions & 10 deletions lightly/api/__init__.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
"""The lightly.api module provides access to the Lightly API."""
"""Deprecated compatibility module for the removed Lightly API client."""

# Copyright (c) 2020. Lightly AG and its affiliates.
# All Rights Reserved
from lightly.api import patch as _patch
from lightly.api.api_workflow_artifacts import ArtifactNotExist
from lightly.api.api_workflow_client import ApiWorkflowClient
from lightly.openapi_generated.swagger_client.api_client import (
Configuration as _Configuration,
)

# Make ApiWorkflowClient and swagger classes picklable.
_patch.make_swagger_configuration_picklable(
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 "

"Lightly SSL version v1.15.x or older, for example with "
'`pip install "lightly<1.16"`.'
)

raise ImportError(_ERROR_MESSAGE)
Comment thread
MalteEbner marked this conversation as resolved.
Loading
Loading