Skip to content

DeepFM - singleton array issue #83

Open
@duncanmcelfresh

Description

@duncanmcelfresh

occurs with dataset: openml__sulfur__360966

traceback:

Traceback (most recent call last):
  File "/home/shared/tabzilla/TabSurvey/tabzilla_experiment.py", line 137, in __call__
    result = cross_validation(model, self.dataset, self.time_limit)
  File "/home/shared/tabzilla/TabSurvey/tabzilla_utils.py", line 236, in cross_validation
    loss_history, val_loss_history = curr_model.fit(
  File "/home/shared/tabzilla/TabSurvey/models/deepfm.py", line 89, in fit
    loss_history, val_loss_history = self.model.fit(
  File "/home/shared/tabzilla/TabSurvey/models/deepfm_lib/models/basemodel.py", line 252, in fit
    train_result[name].append(metric_fun(
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/sklearn/metrics/_regression.py", line 442, in mean_squared_error
    y_type, y_true, y_pred, multioutput = _check_reg_targets(
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/sklearn/metrics/_regression.py", line 100, in _check_reg_targets
    check_consistent_length(y_true, y_pred)
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/sklearn/utils/validation.py", line 384, in check_consistent_length
    lengths = [_num_samples(X) for X in arrays if X is not None]
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/sklearn/utils/validation.py", line 384, in <listcomp>
    lengths = [_num_samples(X) for X in arrays if X is not None]
  File "/opt/conda/envs/torch/lib/python3.10/site-packages/sklearn/utils/validation.py", line 325, in _num_samples
    raise TypeError(
TypeError: Singleton array array(0.0816204) cannot be considered a valid collection.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions