kubeflow / kubeflow/katib

Support for tensor2tensor ranged_hparams

Open
#241 2 comments 2 reactions 0 assignees View on GitHub
lifecycle/frozen
Dominant language
Python
Stars
1.7k
Forks
542
PR merge metrics
No merged PRs in 30d

Description

[Tensor2tensor](https://github.com/tensorflow/tensor2tensor) is an increasingly popular ML research framework built on top of tensorflow that has built-in support for ranged hparams, e.g.

```python
@registry.register_ranged_hparams
def rlmb_grid(rhp):
"""Grid over games and frames, and 5 runs each for variance."""
rhp.set_categorical("loop.game", ["breakout", "pong", "freeway"])
base = 100000
medium = base // 2
small = medium // 2
rhp.set_discrete("loop.num_real_env_frames", [base, medium, small])

# Dummy parameter to get 5 runs for each configuration
rhp.set_discrete("model.moe_loss_coef", list(range(5)))
```

also [here](https://github.com/tensorflow/tensor2tensor/blob/b5dea9e25b5b03e41c86b82a4a8dd18b41e68b34/tensor2tensor/rl/trainer_model_based_params.py#L497).

In https://github.com/kubeflow/katib/issues/240 it was proposed to add a python interface to launching katib jobs which would include providing a means of specifying hparam ranges (one rough method was proposed). For those using katib to tune tensor2tensor models (not everyone), the user experience for this could stay closer to that of using tensor2tensor normally (outside of tuning) if katib supported ranged_hparams as above as a way of specifying the space over which katib should tune.

Related to https://github.com/kubeflow/examples/pull/322

/cc @jlewi @texasmichelle

Contributor guide

Open the contributing guide

Research direction

Start with the ranged_hparams example in tensor2tensor/rl/trainer_model_based_params.py and read the proposed Python interface in issue #240. Compare the related kubeflow/examples pull request #322, then define how Katib should accept categorical and discrete ranges and launch equivalent tuning jobs.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, python, tensorflow
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.