You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering an error when using autokeras for structured data classification. When I try to fit a model, I receive the following error message:
AttributeError: module 'numpy' has no attribute 'object'. np.object was a deprecated alias for the builtin object. To avoid this error in existing code, use object by itself. Doing this will not modify any behavior and is safe.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
I have already upgraded the autokeras library to the latest version, but the error persists.
Here is an example of how I am using autokeras:
import autokeras as ak
from kerastuner import Objective
f1_objective = Objective("f1", direction="max")
clf = ak.StructuredDataClassifier(
objective=f1_objective,
max_trials=10,
)
clf.fit(X_train, y_train)
best_model_id = clf.get_best_model_id()
print("Best model ID:", best_model_id)
best_model = clf.export_model(best_model_id)
print("Best model:", best_model)
trials = clf.get_trials()
for trial in trials:
print("Trial ID:", trial.id)
print("Hyperparameters:", trial.hyperparameters)
print("Performance metrics:", trial.metrics)
The text was updated successfully, but these errors were encountered:
I got the same error for StructuredDataClassifier,
Since Numpy 1.24, np.object is deprecated, and to be replaced with object
ERROR:500 Internal Server Error: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
on here
File "C:\Users\PA\anaconda3\envs\py3117\Lib\site-packages\autokeras\adapters\input_adapters.py", line 73, in convert_to_dataset
if isinstance(dataset, np.ndarray) and dataset.dtype == np.object:
I replaced np.object --> object, It worked.
Can we update the library.
Using
Python 3.11.7
Autokeras 1.0.20
Numpy 1.26.3
I am encountering an error when using
autokeras
for structured data classification. When I try to fit a model, I receive the following error message:AttributeError: module 'numpy' has no attribute 'object'.
np.object
was a deprecated alias for the builtinobject
. To avoid this error in existing code, useobject
by itself. Doing this will not modify any behavior and is safe.The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
I have already upgraded the
autokeras
library to the latest version, but the error persists.Here is an example of how I am using
autokeras
:The text was updated successfully, but these errors were encountered: