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: cannot set 'get_record_history_wrapper' attribute of immutable type 'object' #87

Closed
Hoigr opened this issue Apr 28, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Hoigr
Copy link

Hoigr commented Apr 28, 2023

In google colab when trying to execute the following code:
!pip install lightautoml

from lightautoml.automl.presets.tabular_presets import TabularAutoML
from lightautoml.tasks import Task

The following error is displayed:


TypeError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from lightautoml.automl.presets.tabular_presets import TabularAutoML
2 from lightautoml.tasks import Task

10 frames
/usr/local/lib/python3.10/dist-packages/lightautoml/init.py in
14 version = importlib_metadata.version(name)
15
---> 16 from .addons import *
17 from .addons.utilization import *
18 from .automl import *

/usr/local/lib/python3.10/dist-packages/lightautoml/addons/utilization/init.py in
1 """Tools to configure resources utilization."""
----> 2 from .utilization import TimeUtilization
3
4 all = ['TimeUtilization']

/usr/local/lib/python3.10/dist-packages/lightautoml/addons/utilization/utilization.py in
6 from log_calls import record_history
7
----> 8 from ...automl.base import AutoML
9 from ...automl.blend import Blender, BestModelSelector
10 from ...automl.presets.base import AutoMLPreset

/usr/local/lib/python3.10/dist-packages/lightautoml/automl/base.py in
6 from log_calls import record_history
7
----> 8 from .blend import Blender, BestModelSelector
9 from ..dataset.base import LAMLDataset
10 from ..dataset.utils import concatenate

/usr/local/lib/python3.10/dist-packages/lightautoml/automl/blend.py in
7 from scipy.optimize import minimize_scalar
8
----> 9 from ..dataset.base import LAMLDataset
10 from ..dataset.np_pd_dataset import NumpyDataset
11 from ..dataset.roles import NumericRole

/usr/local/lib/python3.10/dist-packages/lightautoml/dataset/base.py in
6 from log_calls import record_history
7
----> 8 from .roles import ColumnRole
9 from ..tasks.base import Task
10

/usr/local/lib/python3.10/dist-packages/lightautoml/dataset/roles.py in
13
14 @record_history(enabled=False)
---> 15 class ColumnRole:
16 """Abstract class for column role.
17

/usr/local/lib/python3.10/dist-packages/log_calls/log_calls.py in call(self, f_or_klass)
1689 #++++++++++++++++++++++++++++++++
1690
-> 1691 self.class__call_(klass) # modifies klass (methods & inner classes) (if not builtin)
1692 self._add_class_attrs(klass) # v0.3.0v20 traps TypeError for builtins
1693 return klass

/usr/local/lib/python3.10/dist-packages/log_calls/log_calls.py in class__call_(self, klass)
1480 new_omit += deco_obj._omit
1481
-> 1482 new_class = self.class(
1483 settings=new_settings,
1484 only=new_only,

/usr/local/lib/python3.10/dist-packages/log_calls/log_calls.py in call(self, f_or_klass)
1690
1691 self.class__call_(klass) # modifies klass (methods & inner classes) (if not builtin)
-> 1692 self._add_class_attrs(klass) # v0.3.0v20 traps TypeError for builtins
1693 return klass
1694

/usr/local/lib/python3.10/dist-packages/log_calls/log_calls.py in add_class_attrs(self, klass)
2136 this_deco_class = self.class
2137 this_deco_class_name = this_deco_class.name
-> 2138 setattr(
2139 klass,
2140 'get
' + this_deco_class_name + '_wrapper',

TypeError: cannot set 'get_record_history_wrapper' attribute of immutable type 'object'

@Hoigr Hoigr added the bug Something isn't working label Apr 28, 2023
@alexmryzhkov
Copy link
Collaborator

Hi @Hoigr,

This is the known problem because currently LightAutoML doesn’t support python 3.10. You can use it from our github repo if you need 3.10, but I recommend to replace python with 3.9 version.

Alex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants