version: 1.1
kind: component
tags: [examples, scikit-learn]

inputs:
- {name: n_neighbors, type: int, isOptional: true, value: 3}
- {name: leaf_size, type: int, isOptional: true, value: 30}
- {name: metric, type: str, isOptional: true, value: minkowski}
- {name: p, type: int, isOptional: true, value: 2}
- {name: weights, type: str, isOptional: true, value: uniform}
- {name: test_size, type: float, isOptional: true, value: 0.3}
- {name: random_state, type: int, isOptional: true, value: 33}
run:
  kind: job
  init:
  - git: {"url": "https://github.com/polyaxon/polyaxon-examples"}
  container:
    image: polyaxon/polyaxon-examples
    workingDir: "{{ globals.artifacts_path }}/polyaxon-examples/in_cluster/sklearn/iris"
    command: ["python", "-u", "run.py"]
    args: [
      "--n_neighbors={{ n_neighbors }}",
      "--leaf_size={{ leaf_size }}",
      "--metric={{ metric }}",
      "--p={{ p }}",
      "--weights={{ weights }}",
      "--test_size={{ test_size }}",
      "--random_state={{ random_state }}"
    ]
