Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: unsupported operand type(s) for +: 'Timedelta' and 'float' #60

Open
cryptocoinserver opened this issue Oct 1, 2022 · 2 comments
Labels
question Further information is requested

Comments

@cryptocoinserver
Copy link

10-01 19:18:03 I hyperts.hyper_ts.py 244 - estimator is transforming the train set

10-01 19:18:04 E hypernets.m.hyper_model.py 83 - run_trail failed! trail_no=3
10-01 19:18:04 E hypernets.m.hyper_model.py 85 - Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/hypernets/model/hyper_model.py", line 78, in _run_trial
    estimator.fit(X, y, **fit_kwargs)
  File "/usr/local/lib/python3.7/dist-packages/hyperts/hyper_ts.py", line 255, in fit
    self.model.fit(X_transformed, y, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/hyperts/framework/wrappers/dl_wrappers.py", line 108, in fit
    X = self.fit_transform(X)
  File "/usr/local/lib/python3.7/dist-packages/hyperts/framework/wrappers/_base.py", line 135, in fit_transform
    transform_X = self.transformers.fit_transform(X)
  File "/usr/local/lib/python3.7/dist-packages/sklearn/pipeline.py", line 426, in fit_transform
    Xt = self._fit(X, y, **fit_params_steps)
  File "/usr/local/lib/python3.7/dist-packages/sklearn/pipeline.py", line 355, in _fit
    **fit_params_steps[name],
  File "/usr/local/lib/python3.7/dist-packages/joblib/memory.py", line 352, in __call__
    return self.func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/sklearn/pipeline.py", line 893, in _fit_transform_one
    res = transformer.fit_transform(X, y, **fit_params)
  File "/usr/local/lib/python3.7/dist-packages/sklearn/base.py", line 852, in fit_transform
    return self.fit(X, **fit_params).transform(X)
  File "/usr/local/lib/python3.7/dist-packages/hyperts/utils/transformers.py", line 207, in transform
    transform_X = (X - self.min) / (self.max - self.min + self.eps)
TypeError: unsupported operand type(s) for +: 'Timedelta' and 'float'

I think I figured the first error out. I set the mode to "dl".
Now I get the above error though.

@zhangxjohn
Copy link
Collaborator

Could you please elaborate on your task, data format and initialization parameter settings?

@zhangxjohn
Copy link
Collaborator

From the error, it looks there is a problem with your data format.

@zhangxjohn zhangxjohn added the question Further information is requested label Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants