dask / dask/dask-ml

PicklingError on compute with HyperbandSearchCV

Open
#549 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
951
Forks
262
PR merge metrics
No merged PRs in 30d

Description

I'm attempting to do a hyperparameter search using `HyperbandSearchCV` on a PyTorch model that has been wrapped with `skorch`, but am running into a failure when I call `fit`:

Exception: PicklingError("Can't pickle : it's not the same object as __main__.DNNRegressor")

The exception does not seem to make sense.

My model is a subclass of `torch.nn.Module` that is just a deep neural network regressor, and this has been wrapped by a skorch `NeuralNetRegressor` as follows

```python
dnnr = NeuralNetRegressor(
module=DNNRegressor,
module__n_feature=len(NUMERIC_COLUMNS),
module__n_hidden=128,
module__n_output=1,
module__dropout_rate=0.5,
criterion=torch.nn.MSELoss,
device=device
)
```

Any obvious reason for this to be happening?

Running dask_ml 1.0.0, skorch 0.6.0 and pytorch 1.1.0 on a GCS instance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.