optuna-examples icon indicating copy to clipboard operation
optuna-examples copied to clipboard

Add missing examples to daily CI

Open hvy opened this issue 3 years ago • 9 comments

Some examples are not tested by the daily CI. All examples in this repository preferably should. See https://github.com/optuna/optuna-examples/pull/1#issuecomment-837856331.

hvy avatar May 13 '21 01:05 hvy

This recent contribution as well https://github.com/optuna/optuna-examples/pull/11

hvy avatar May 19 '21 10:05 hvy

  • [ ] kubernetes/
  • [x] multi_objective/
  • [x] samplers/
  • [x] visualization/
  • [x] enqueue_trial.py
  • [x] max_trials_callback.py
  • [x] quadratic_simple.py
  • [ ] quickstart.ipynb
  • [ ] rapids_simple.py
  • [ ] ray/ray_joblib.py
  • [x] simple_pruning.py
  • [x] skimage/skimage_lbp_simple.py

hvy avatar May 23 '21 06:05 hvy

Implemented most. Ray, Kubernetes, the two .ipynb files, and Rapids are not implemented. Checking if Ray and the .ipynb files can be made to work. Assume testing Kubernetes within a docker or rapids not worth effort to add to CI.

Crissman avatar Jun 07 '21 05:06 Crissman

Thanks for the updates, I'll have a look at #26. For the RAPIDS example, we could just CI check if it compiles. https://docs.python.org/3.8/library/py_compile.html

python -m py_compile rapids_simple.py

As for the Kubernetes example, I don't think that it's urgent, but am wondering if we shouldn't leave it as an open issue.

hvy avatar Jun 07 '21 06:06 hvy

As suggested, made rapids a compile check only. I worked on ray_joblib.py a bit, but was unable to get the test to run on github actions. Apparently, unless running on python 3.7, it gives this error:

| ERROR: Could not find a version that satisfies the requirement ray (from versions: none)
| ERROR: No matching distribution found for ray

Even limiting to only python 3.7, I had a domain error on in the github workflow. Google search on the error did not show a clear approach, so I'm leaving as compile only, and marking this issue contribution welcome in case someone more familiar with ray wants to work on this.

Crissman avatar Jun 08 '21 08:06 Crissman

@hvy and @Crissman discussed the daily CI for Ray and RAPIDS last year, but no one investigates the kubernetes and quickstart.ipynb. I briefly checked them. I'm not familiar with them, so please correct me if I'm wrong.

kubernetes/

The kubernetes example uses minikube, and minikube provides the official guide to setup minikube as CI step in GitHub Actions. It may help us create daily CI for the kubernetes examples.

quickstart.ipynb

papermill says that it enable us to execute IPython notebook via Python API as follows:

import papermill as pm

pm.execute_notebook(
   'path/to/input.ipynb',
   'path/to/output.ipynb',
   parameters = dict(alpha=0.6, ratio=0.1)
)

It may help us create daily CI for quickstart.ipynb. Also, we can see third-party github action to run notebook using papermil. I'm not sure if we can use it in terms of security. https://github.com/marketplace/actions/run-notebook

toshihikoyanase avatar Jun 01 '22 12:06 toshihikoyanase

@toshihikoyanase Thank you for investigating this issue. Let me leave one comment.

quickstart.ipynb

In fact, one notebook has already been tested in this repo's CI by using jupyter nbconvert command.

https://github.com/optuna/optuna-examples/blob/92bbe4bce97118ca6d8eab13a2a850a68b717c6a/.github/workflows/hiplot.yml#L35

nzw0301 avatar Jun 01 '22 12:06 nzw0301

@nzw0301 Thank you for your comment. Then, we can apply jupyter nbconvert to quickstart.ipynb!

toshihikoyanase avatar Jun 01 '22 12:06 toshihikoyanase

This issue has not seen any recent activity.

github-actions[bot] avatar Jun 15 '22 23:06 github-actions[bot]

This issue was closed automatically because it had not seen any recent activity. If you want to discuss it, you can reopen it freely.

github-actions[bot] avatar Sep 25 '22 23:09 github-actions[bot]