Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Training Data

Run findTrainingData to generate candidate pairs from your data for labeling. The first active step in building your Zingg model.

The findTrainingData phase prompts Zingg to search for edge cases in your data-record pairs that are informative for learning. Zingg selects these judiciously so that your labeling effort is minimized and models can be built quickly.

Run findTrainingData first, then run the label phase. Repeat this cycle until you have enough labeled pairs.

Set label data sample size

args.setLabelDataSampleSize(0.5)

Run findTrainingData

./scripts/zingg.sh --phase findTrainingData --conf config.json

Using Python API

options = ClientOptions([ClientOptions.PHASE, "findTrainingData"])
zingg = Zingg(args, options)
zingg.initAndExecute()

Using pre-existing training data

If you already have labeled pairs from a previous run or external source, you can supply them to Zingg using the trainingSamples attribute in your config.

Your training data must include:

  • z_cluster - groups records together; uniquely identifies the group

  • z_isMatch - 1 if the records match, 0 if they do not. Must be the same value for all records in the same z_cluster group.

Using JSON config

{
  "trainingSamples": [
    {
      "name": "existingTraining",
      "format": "csv",
      "props": {
        "path": "/path/to/training.csv",
        "delimiter": ",",
        "header": "true"
      }
    }
  ]
}

Set label data sample size

Python

CLI

Candidate pairs are written to zinggDir/modelId. Run the label phase next to review and label these pairs.

Run findTrainingData

Zingg on Snowflake can be run either from a local terminal via the CLI, or natively inside Snowflake as a job service.

CLI (local terminal)

The snowflake.properties file supplies the connection details Zingg needs to reach your Snowflake account and run against your warehouse from outside Snowflake.

Candidate pairs are written to zinggDir/modelId.

Snowflake (job service)

Run the phase as an asynchronous job service inside your Snowflake compute pool.

The specification file passed via SPECIFICATION_TEMPLATE_FILE defines the container and job service configuration Zingg needs to run inside Snowpark Container Services. It is maintained by your administrator and referenced from your @specs stage.

<config-name> is the name of your Zingg configuration json file.

Monitor the job

Retrieve the service logs to monitor execution and debug any failures.

zingg-async-job-container refers to the container name defined in the job specification.

Stop the compute pool

Once the job completes, stop the compute pool to release resources.

Last updated

Was this helpful?