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. datasetclasses

PreprocessResponse

code_loader.contract.datasetclasses.PreprocessResponse

PreviousdatasetclassesNextvisualizer_classes

Last updated 3 years ago

Was this helpful?

An object that holds the samples data and length. This object is generated in the Preprocessing Function for each dataset slice. Then passed to the input encoders, ground_truth encoders and metadata functions as an argument.

@dataclass
PreprocessResponse:
    length: int,
    data: Any,

For more on PreprocessResponse:

Args

length

(int) value with the amount of samples in the data.

data

(Any) Dictionary / pandas.DataFrame / List or any object that describes the dataset features. The data parameter is later passed to the input encoders, ground_truth encoders, and metadata functions.

Examples

Basic Usage

from code_loader.contract.datasetclasses import PreprocessResponse
preprocess_response = PreprocessResponse(length=len(x_df.index), data=x_df)

Within the Preprocess Function

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

MNIST Guide
IMDB Guide