Skip to content

Custom Python and ML workloads

Wrap your Python function or training script in one command that accepts parameters, runs an evaluation, and prints numeric results. The quickstart provides a complete, dependency-free example you can adapt.

  1. Use a single entrypoint for your function or training routine.
  2. Add argparse flags for every parameter you want to vary.
  3. Add dependencies to the image and make required input data available reproducibly.
  4. Print finite numeric metrics with json.dumps(value, allow_nan=False) and flush stdout.
  5. Change hpo.toml parameters and objectives together, then test the exact container command locally.

For a model, expose learning rate or batch size and emit validation loss or accuracy. For a simulation, expose scenario inputs and emit error or a measured outcome. For a pipeline, expose chunk size and emit runtime or throughput. The platform requires none of these frameworks in particular.

Use a fixed dataset/seed when the experiment requires repeatability. Keep training, validation, and final evaluation data separate. Review machine memory and CPU needs; the current standard catalog is CPU compute, so do not assume GPU availability. Use a narrow search and one concurrent trial to validate setup before scaling.

No SDK is required inside your workload. The CLI packages and launches it; the platform collects stdout objectives. Keep secrets out of Docker layers and config files. Forward required runtime environment variables deliberately. See Docker image, metric format, and troubleshooting.