Skip to main content
These examples assume an authenticated active saved profile with the intended organization and project. Confirm it with tp context show before running commands. Add root --json before the command when machine parsing needs JSON output; use root --profile <name> only to override the active profile.

Check context and available resources

Data assets

Use a short logical name for new datasets. The API may return an org/project-prefixed assetName; use that returned name for versions, files, and training commands.

Bundles

Bundle basics:
  • Include entrypoint/training code, dependency metadata, and output contract expected by ThinkPlatform.
  • training-bundle.yaml must include schema_version, name, and entry.command.
  • Declare a dataset_contract with required files when the bundle expects a dataset organized as a directory.
  • Write metrics and model outputs where ThinkPlatform registration can find them.
  • Always write scalar evaluation metrics to TP_ARTIFACTS_OUTPUT_DIR/metrics.json.
  • Use MLflow metric logging in training code when available so tp mlops jobs metrics <job_id> and the run UI can return scalar metrics.
  • Validate locally before starting a cloud job when possible.
Recommended training code pattern:
Metric completion check:
If jobs metrics returns {} or the UI says no metrics are available, update the bundle to log metrics and rerun training. A Completed job without metrics is not a complete model validation.

Training

After every training job, capture at least the primary metric, baseline metric, business metric, and row count from tp mlops jobs metrics <job_id> in the user-facing report.

Models

Model artifact upload and model registry promotion are separate operational checks. If upload-dir uploads files but registration fails, inspect the uploaded Data Lake path and retry tp mlops models register --name <model_name> --version <version> --base-path <uploaded_prefix> --model-type <model_type> to isolate the registration failure.

Cloud deployment and inference

Verification checklist

  • Data asset exists and is readable.
  • Training job completed and tp mlops jobs metrics <job_id> returns non-empty metrics.
  • Metrics include a primary task metric, baseline comparison, business metric, and data volume.
  • Model version exists and passes deployability checks.
  • Endpoint/deployment state is healthy.
  • Inference sample returns expected schema and plausible output.