LogoLogo
  • Tensorleap
  • Examples
    • Semantic Segmentation
    • Image Analysis
    • Sentiment Analysis
    • MNIST Project Walkthrough
    • IMDB Project Walkthrough
  • Quickstart using CLI
  • Guides
    • Full Guides
      • MNIST Guide
        • Dataset Integration
        • Model Integration
        • Model Perception Analysis
        • Advanced Metrics
      • IMDB Guide
        • Dataset Integration
        • Model Integration
        • Model Perception Analysis
        • Advanced Metrics
    • Integration Script
      • Preprocess Function
      • Input Encoder
      • Ground Truth Encoder
      • Metadata Function
      • Visualizer Function
      • Prediction
      • Custom Metrics
      • Custom Loss Function
      • Custom Layers
      • Unlabeled Data
      • Examples
        • CelebA Object Detection (YoloV7)
        • Wikipedia Toxicity (using Tensorflow Datasets)
        • Confusion Matrix
        • CelebA Classification (using GCS)
  • Platform
    • Resources Management
    • Project
    • Dataset
    • Secret Manager
    • Network
      • Dataset Node
      • Layers
      • Loss and Optimizer
      • Visualizers
      • Import Model
      • Metrics
    • Evaluate / Train Model
    • Metrics Dashboard
    • Versions
    • Issues
    • Tests
    • Analysis
      • helpers
        • detection
          • YOLO
    • Team management
    • Insights
  • API
    • code_loader
      • leap_binder
        • add_custom_metric
        • set_preprocess
        • set_unlabeled_data_preprocess
        • set_input
        • set_ground_truth
        • set_metadata
        • add_prediction
        • add_custom_loss
        • set_visualizer
      • enums
        • DatasetMetadataType
        • LeapDataType
      • datasetclasses
        • PreprocessResponse
      • visualizer_classes
        • LeapImage
        • LeapImageWithBBox
        • LeapGraph
        • LeapText
        • LeapHorizontalBar
        • LeapImageMask
        • LeapTextMask
  • Tips & Tricks
    • Import External Code
  • Legal
    • Terms of Use
    • Privacy Policy
Powered by GitBook
On this page

Was this helpful?

  1. API
  2. code_loader
  3. leap_binder

set_preprocess

code_loader.leap_binder.set_preprocessing

Previousadd_custom_metricNextset_unlabeled_data_preprocess

Last updated 3 years ago

Was this helpful?

The leap_binder.set_preprocessing binding function points to the , and sets the name for future reference.

code_loader.leap_binder.set_preprocess(
    function=Callable[[], List[PreprocessResponse]]
)
Args

function

Examples

Basic Usage

from code_loader import leap_binder
from code_loader.contract.datasetclasses import PreprocessingResponse

# Preprocessing Function
def preprocessing_func() -> List[PreprocessingResponse]:
...
    train = PreprocessingResponse(length=len(train_df), data=train_df)
    val = PreprocessingResponse(length=len(val_df), data=val_df)
    test = PreprocessingResponse(length=len(test_df), data=test_df)

    return [train, val, test]

leap_binder.set_preprocessing(function=preprocessing_func)

Guides

Full examples can be found at the Dataset Integration section of the following guides:

(Callable) This parameter points to the mentioned above.

Usage within the full script can be found at the .

Preprocessing Function
MNIST Guide
IMDB Guide
Preprocess Function
Dataset Script