optuna/optuna-examples

Fix CI error of PyTorch

nzw0301 opened this issue · 1 comments

Expected behavior

CIs should be passed without error.

Environment

This repo's Github CI: https://github.com/optuna/optuna-examples/actions/workflows/pytorch.yml

Error messages, stack traces, or logs

Error message is as follows:

Run python pytorch/pytorch_lightning_simple.py
Traceback (most recent call last):
  File "pytorch/pytorch_lightning_simple.py", line 19, in <module>
    from optuna.integration import PyTorchLightningPruningCallback
ImportError: cannot import name 'PyTorchLightningPruningCallback' from 'optuna.integration' (unknown location)
Error: Process completed with exit code 1.

Steps to reproduce

See https://github.com/optuna/optuna-examples/actions/workflows/pytorch.yml

Additional context (optional)

  1. Optuna's main repo doesn't see this CI error
  2. ubuntu-latest has been released after this CI had been broken, the version of ubuntu were same:

From the first failed CI's log

Current runner version: '2.286.0'
Operating System
Virtual Environment
  Environment: ubuntu-20.04
  Version: 20211219.1
  Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20211219.1/images/linux/Ubuntu2004-README.md
  Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20211219.1

From the last complete CI's log

Current runner version: '2.285.1'
Operating System
Virtual Environment
  Environment: ubuntu-20.04
  Version: 20211219.1
  Included Software: https://github.com/actions/virtual-environments/blob/ubuntu20/20211219.1/images/linux/Ubuntu2004-README.md
  Image Release: https://github.com/actions/virtual-environments/releases/tag/ubuntu20%2F20211219.1
  1. the current runner versions were not the same between the two messages above, but I'm not sure that causes CI error...

The error does hot happen anymore on the main branch...
https://github.com/optuna/optuna-examples/actions/runs/1736220267

Let me close this issue once.