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_metadata

code_loader.leap_binder.set_ground_truth

Previousset_ground_truthNextadd_prediction

Last updated 2 years ago

Was this helpful?

The leap_binder.set_metadata binding function points to . In addition, it defines the metadata_type and name for reference.

code_loader.leap_binder.set_metadata(
    function=MetadataSectionCallableInterface,
    metadata_type=DatasetMetadataType,
    name=str
)
Args

function

metadata_type

  • For a float ground truth, use DatasetMetadataType.float

  • For a string ground truth, use DatasetMetadataType.string

  • For a int ground truth, use DatasetMetadataType.int

  • For a boolean ground truth, use DatasetMetadataType.boolean

name

(str) with the given name of the input, e.g. image.

Examples

Basic Usage

from code_loader import leap_binder
from code_loader.contract.datasetclasses import PreprocessResponse

...
def metadata_label(idx: int, subset: Union[PreprocessResponse, list]) -> str:
    return subset.data.iloc[idx]['label']

leap_binder.set_metadata(
    function=metadata_label,
    metadata_type=DatasetMetadataType.str, 
    name='label'
)

Guides

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

(MetadataSectionCallableInterface) This parameter points to the mentioned above.

() This property helps visualize the metadata data.

Usage within the full script can be found at .

Metadata Function
MNIST Guide
IMDB Guide
Metadata Function
DatasetMetadataType
Dataset Script