Frequently Asked Questions#

What is 3LC?#

3LC is a unique platform revolutionizing machine learning by delivering granular, real-time insights into model training and data interactions. Seamlessly integrating with leading ML frameworks like PyTorch, 3LC equips data scientists with unprecedented control over data diagnosis and correction.

Unique Features:

  • Detailed per-sample, per-epoch metric recording to illuminate how the model interacts and learns from the data.

  • Real-time, interactive visual diagnosis and correction of data issues, enhancing data quality and model precision.

  • Innovative data management solution seamlessly merging original data with modifications, simplifying version control and avoiding data duplication and data movement.

Business Value:

  • Superior model performance: With enhanced data quality and insight into model-data interactions, models trained with 3LC are more accurate and reliable.

  • Enhanced efficiency: Real-time visual diagnosis and correction streamline the ML process, saving valuable time and reducing operational costs.

  • Better decision-making: Granular insight into the training process equips teams with data-driven evidence to optimize models.

3LC transforms machine learning from a traditionally opaque, “black-box” process into an open, interactive experience. It offers data scientists unparalleled control and deep insight into their models and the key model-data interactions, positioning 3LC as a groundbreaking solution in the ML landscape. By improving the fitness and correctness of datasets and enhancing the efficiency of model training, 3LC provides a substantial competitive edge in today’s data-driven business environment.

Is it spelled 3LC or tlc?#

The company and product are both called 3LC. The lowercase tlc name is only used when it is required to avoid starting with a number, such as in the naming of a Python module or an environment variable.

Why do I have to install PyTorch separately?#

If you install 3LC in an environment without PyTorch and Torchvision and attempt to import the tlc-package you will get an exception complaining that torch and torchvision need to be installed:

3LC requires torch and torchvision to be installed. Suitable versions can be found at https://pytorch.org/

The reason 3LC does not depend on torch (and thus doesn’t automatically install it) is that PyTorch is available in several versions targeting different compute platforms. Most users will likely have already installed their preferred version of torch, and we do not want to modify their environment.

3LC similarly cannot depend on Torchvision, as this would automatically install PyTorch as well.

How can I export data from a 3LC Table?#

After the of successful usage of 3LC to modify at dataset, one might want to export the modified data out of a 3LC Table and into a common format such as CSV or Coco. This can be achieved either by using the 3LC CLI or through the Python API.

Using the 3LC CLI

In a terminal (with the tlc Python Package installed), the command line tool can be invoked as follows:

$ 3lc export path/to/table.json <output-path>

The output format will be deduced from the extension of <output-path> and the contents of the table, but can also be explicitly specified using the --format option.

Using the Table.export method

The Table.export-method provide a simple interface for exporting a Table directly from a Python notebook.

table = Table.from_url(input_url)

table.export(output_path) 

The export method will deduce the output format from the extension of the output-path and the contents of the table.

How do I run the Dashboard and the Object Service on different machines?#

Please see the Object Service Deployment Guide for several solutions to running the Dashboard and Object Service on different machines.

How do I create a 3LC Table from a Pandas DataFrame?#

The Table.from_pandas method can be used to create a 3LC Table from a Pandas DataFrame.

import pandas as pd
import tlc

df = pd.read_csv("path/to/data.csv")

table = tlc.Table.from_pandas(df, table_name="my_table", dataset_name="my_dataset", project_name="my_project")

Why are my image transforms not applied in the Dashboard?#

If you have created a 3LC Table using the Table.from_torch_dataset on a TorchVision VisionDataset which has transforms applied to it, you might notice that the transforms are not applied when viewing the data in the Dashboard. Because the transforms of a VisionDataset might contain augmentations, or conversion from a PIL.Image.Image to a torch.Tensor, 3LC needs to persist the untransformed samples. These are the images which are shown in the Dashboard.

The transforms will still be applied as expected when getting samples from the Table object in your code, and will still be applied when training your model. If you want to see the transformed images in the Dashboard, you can explicitly transform the samples in the __getitem__ method of your Dataset class, instead of using the transforms argument of the VisionDataset class, before calling Table.from_torch_dataset. If you are non-deterministically augmenting your samples, or converting PIL images to tensors, these transforms still need to be added through the transforms argument, and not in the __getitem__ method.

How can I add an extra column to my 3LC Table?#

Adding an extra column to a 3LC Table can be done when creating the Table by using the extra_columns argument of constructor methods like Table.from_pandas, Table.from_dict or Table.from_torch_dataset.

my_torch_dataset = MyTorchDataset()
table = Table.from_torch_dataset(
  my_torch_dataset, 
  ..., 
  extra_columns={
    "QA": tlc.CategoricalLabel("QA", ["Not required", "Required", "In progress", "Done"])
  }
)

The extra_columns argument should be a dictionary where the keys are the names of the extra columns, and the values describe the type of the column, either with a Schema or a SampleType. The column will initially be populated by a default value, and will only be visible in the Dashboard, not during training.

How do I collect metrics in Python with my data and model?#

Collecting metrics from your data and models can sometimes be tricky. If you encounter any issues, make sure to check the relevant sections of the user guide for guidance:

  • Register Datasets explains how to create a tlc.Table from your data.

  • Collect Metrics explains how to collect metrics from your table and model.

  • Combining Data and Models in 3LC goes into detail about how the tlc.Predictor wraps the model, and how it calls the forward method of the model using data from the tlc.Table.

Why can I not see my images in the Dashboard?#

If your images are not showing up in the Dashboard, the images might be in a format that 3LC does not recognize.

All images which are displayed in the Dashboard, are stored as URLs (paths) in the Table. If your dataset contains PIL.Image objects, 3LC will automatically convert these to URLs when creating the Table. If your images are in any other format and you want to view them in the Dashboard, you have two options:

  1. Include the path to the images in the samples of your dataset when creating the Table. If you are using a custom PyTorch Dataset, you can include the paths in the return value of the __getitem__ method of your Dataset class. Make sure to specify that these strings are paths to images by, for instance, using the ImagePath SampleType.

  2. Let 3LC handle the conversion of the images to URLs by ensuring that your images in your samples are represented as PIL.Image objects. If your images are in a different format, you can convert them to PIL.Image objects before creating the Table. Note that if the PIL.Image objects are not created from a file, this might involve saving copies of the images the first time you create the Table.