Exercise 11 fails with the following return error:
$ mlflow run . -P hydra_options="random_forest_pipeline.random_forest.max_depth=5"
2023/05/20 18:18:32 INFO mlflow.utils.conda: Conda environment mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76 already exists.
2023/05/20 18:18:32 INFO mlflow.projects.utils: === Created directory C:\Users\giannis\AppData\Local\Temp\tmpftu8jmwr for downloading remote URIs passed to arguments of type 'path' ===
2023/05/20 18:18:32 INFO mlflow.projects.backend.local: === Running command 'conda activate mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76 && python main.py $(echo random_forest_pipeline.random_forest.max_depth=5)' in run with ID 'fabf4ebaf7fc40649a25570246409951' ===
C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\schema.py:49: FutureWarning: In the future np.object will be defined as the corresponding NumPy scalar.
binary = (7, np.dtype("bytes"), "BinaryType", np.object)
Traceback (most recent call last):
File "C:\Users\giannis\Desktop\ML-DevOps-2\lesson-4-training-validation-experiment-tracking\exercises\exercise_11\starter\main.py", line 3, in
import mlflow
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow__init.py", line 52, in
import mlflow.fastai as fastai # noqa: E402
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\fastai.py", line 22, in
from mlflow import pyfunc
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\pyfunc__init.py", line 219, in
import mlflow.pyfunc.model
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\pyfunc\model.py", line 17, in
from mlflow.models import Model
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\models__init__.py", line 25, in
from .signature import ModelSignature, infer_signature
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\models\signature.py", line 12, in
from mlflow.types.schema import Schema
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\init.py", line 6, in
from .schema import DataType, ColSpec, Schema, TensorSpec
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\schema.py", line 20, in
class DataType(Enum):
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\schema.py", line 49, in DataType
binary = (7, np.dtype("bytes"), "BinaryType", np.object)
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\numpy\init.py", line 305, in getattr
raise AttributeError(former_attrs[attr])
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
2023/05/20 18:18:35 ERROR mlflow.cli: === Run (ID 'fabf4ebaf7fc40649a25570246409951') failed ===
(venv)
Exercise 11 fails with the following return error: $ mlflow run . -P hydra_options="random_forest_pipeline.random_forest.max_depth=5" 2023/05/20 18:18:32 INFO mlflow.utils.conda: Conda environment mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76 already exists. 2023/05/20 18:18:32 INFO mlflow.projects.utils: === Created directory C:\Users\giannis\AppData\Local\Temp\tmpftu8jmwr for downloading remote URIs passed to arguments of type 'path' === 2023/05/20 18:18:32 INFO mlflow.projects.backend.local: === Running command 'conda activate mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76 && python main.py $(echo random_forest_pipeline.random_forest.max_depth=5)' in run with ID 'fabf4ebaf7fc40649a25570246409951' === C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\schema.py:49: FutureWarning: In the future
import mlflow
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow__init.py", line 52, in
import mlflow.fastai as fastai # noqa: E402
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\fastai.py", line 22, in
from mlflow import pyfunc
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\pyfunc__init.py", line 219, in
import mlflow.pyfunc.model
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\pyfunc\model.py", line 17, in
from mlflow.models import Model
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\models__init__.py", line 25, in
from .signature import ModelSignature, infer_signature
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\models\signature.py", line 12, in
from mlflow.types.schema import Schema
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\ init.py", line 6, in
from .schema import DataType, ColSpec, Schema, TensorSpec
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\schema.py", line 20, in
class DataType(Enum):
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\mlflow\types\schema.py", line 49, in DataType
binary = (7, np.dtype("bytes"), "BinaryType", np.object)
File "C:\Users\giannis\anaconda3\envs\mlflow-7ff53cff2353e8a846a00d29e1b3cddc025e8f76\lib\site-packages\numpy\ init.py", line 305, in getattr
raise AttributeError(former_attrs [attr])
AttributeError: module 'numpy' has no attribute 'object'.
np.object
will be defined as the corresponding NumPy scalar. binary = (7, np.dtype("bytes"), "BinaryType", np.object) Traceback (most recent call last): File "C:\Users\giannis\Desktop\ML-DevOps-2\lesson-4-training-validation-experiment-tracking\exercises\exercise_11\starter\main.py", line 3, innp.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 2023/05/20 18:18:35 ERROR mlflow.cli: === Run (ID 'fabf4ebaf7fc40649a25570246409951') failed === (venv)