Skip to content

Model loading error #207

@MingxinDing

Description

@MingxinDing

Is there an existing issue for this?

  • I have searched the existing issues

Bug description

New commit failed to load model files.
cebra_error.md

Operating System

Windows 11

CEBRA version

0.4.0

Device type

gpu

Steps To Reproduce

No response

Relevant log output

/usr/local/lib/python3.10/dist-packages/cebra/integrations/sklearn/cebra.py:1436: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  checkpoint = torch.load(filename, **kwargs)
/usr/local/lib/python3.10/dist-packages/sklearn/utils/_tags.py:354: FutureWarning: The CEBRA or classes from which it inherits use `_get_tags` and `_more_tags`. Please define the `__sklearn_tags__` method, or inherit from `sklearn.base.BaseEstimator` and/or other appropriate mixins such as `sklearn.base.TransformerMixin`, `sklearn.base.ClassifierMixin`, `sklearn.base.RegressorMixin`, and `sklearn.base.OutlierMixin`. From scikit-learn 1.7, not defining `__sklearn_tags__` will raise an error.
  warnings.warn(

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

/usr/local/lib/python3.10/dist-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude)
    968 
    969             if method is not None:
--> 970                 return method(include=include, exclude=exclude)
    971             return None
    972         else:

4 frames

/usr/local/lib/python3.10/dist-packages/sklearn/base.py in __sklearn_tags__(self)
    857 
    858     def __sklearn_tags__(self):
--> 859         tags = super().__sklearn_tags__()
    860         tags.transformer_tags = TransformerTags()
    861         return tags

AttributeError: 'super' object has no attribute '__sklearn_tags__'

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

/usr/local/lib/python3.10/dist-packages/IPython/core/formatters.py in __call__(self, obj)
    343             method = get_real_method(obj, self.print_method)
    344             if method is not None:
--> 345                 return method()
    346             return None
    347         else:

4 frames

/usr/local/lib/python3.10/dist-packages/sklearn/base.py in __sklearn_tags__(self)
    857 
    858     def __sklearn_tags__(self):
--> 859         tags = super().__sklearn_tags__()
    860         tags.transformer_tags = TransformerTags()
    861         return tags

AttributeError: 'super' object has no attribute '__sklearn_tags__'

CEBRA(batch_size=2048, conditional='time_delta', learning_rate=0.0005,
      max_iterations=12000, model_architecture='offset10-model',
      num_hidden_units=64, output_dimension=3, temperature=1, time_offsets=10,
      verbose=True)

Anything else?

No response

Code of Conduct

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions