Dioptra Documentation
  • What is KatiML ?
  • Overview
    • 🏃Getting Started
    • 🌊KatiML
      • Quick start
      • Ingestion basics
      • Ingestion SDK
      • Query basics
      • Query SDK
      • Dataset basics
      • Dataset SDK
      • Supported fields
      • Matching local data with Kati ML IDs
      • Managing Datapoints with Tags
      • Configuring Object Stores (optional)
    • 🧠Active Learning
      • 📖Miners basics
      • ⛏️Miners SDK
      • 🚗[Experimental] Mining on the edge
    • 🤖PyTorch and Tensorflow integrations
      • Tensorflow
      • PyTorch
  • 😬Enough docs, show me some code !
  • 📑Case studies
  • Definitions
Powered by GitBook
On this page
  • Step 1: define your filters
  • Step 2: Create your miner, run it and wait for the results
  • Step 3: get the resulting datapoints from the lake

Was this helpful?

  1. Overview

Active Learning

Once the unlabeled data is in Dioptra, running Active Learning Miners can be done in just a few lines of code.

Step 1: define your filters

Define the filters to select the data to mine from. It's like SQL.

We support standard operators =, !=, >, <, >=, <=, in, not in, like, not like

filters = [{
    'left': 'tags.name',
    'op': '=',
    'right': 'model_id'
 }, {
    'left': 'tags.value',
    'op': '=',
    'right': 'anomaly_detection'
 }, {
    'left': 'tags.name',
    'op': '=',
    'right': 'model_version'
 }, {
    'left': 'tags.value',
    'op': '=',
    'right': 'v1'
 }]

Step 2: Create your miner, run it and wait for the results

import time
from dioptra.miners.entropy_miner import EntropyMiner

my_miner = EntropyMiner('my entropy miner', budget=100, filters=filters)
my_miner.run()

datapoint_ids = my_miner.get_results()

Step 3: get the resulting datapoints from the lake

from dioptra.lake.utils import select_datapoints

datapoint_ids = my_miner.get_results()

results_df = select_datapoints(filters=[{
    'left': 'id',
    'op': 'in',
    'right': ids
}])

# do stuff with the results
PreviousConfiguring Object Stores (optional)NextMiners basics

Last updated 2 years ago

Was this helpful?

🧠
📖Miners basics
⛏️Miners SDK
🚗[Experimental] Mining on the edge