Is it possible to build an torch.nn.Layer with tune.choice sampler?

How severe does this issue affect your experience of using Ray?

  • None: Just asking a question out of curiosity
  • Low: It annoys or frustrates me for a moment.
  • Medium: It contributes to significant difficulty to complete my task, but I can work around it.
  • High: It blocks me to complete my task.

Hello ~ I’m new to Ray Tuner.

Actually, I encounter the error message as the following described.

The problem is that seems I can not declare the torch.nn layer with tuner.choice sampler outside the range of tuner.run(…) ?

Any suggestion will be appreciated.

Duplicated question of [tune] tune.choice, tune.qrandint not compatible with keras · Issue #11434 · ray-project/ray (github.com)

I found that it’s not possible to automatically convert it after building the torch model.

As the suggestion of @ krfricke, it will automatically convert the params if and only if run in “tuner.run” method.