bstollnitz / aml_command_cli Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
First and foremost: Thanks for having this great set of tutorials. ๐ I really enjoy reading through it and learning more about Azure ML while doing so.
Still I do have a problem when doing the training and later the inference on my local machine. Both commands, predicting from JSON as well as CSV, will end up in the same error: TypeError: _predict() got an unexpected keyword argument 'json_format'
I have installed all dependencies as explained in the readme, so I'm wondering if this is some kind of version mismatch since the executed code seem to be fully auto-generated:
source /home/myuser/.local/lib/miniconda3/bin/../etc/profile.d/conda.sh && conda activate mlflow-1433535863ef053dea37ca28e47daf2bbabfb74f 1>&2 && python -c "from mlflow.pyfunc.scoring_server import _predict; _predict(model_uri='file:///home/myuser/code/external/aml_command_cli/aml_command_cli/model', input_path='test_data/images.json', output_path=None, content_type='json', json_format='split')"
Full log:
$ mlflow models predict --model-uri "model" --input-path "test_data/images.json" --content-type json
/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.23.1
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
2022/12/08 12:37:11 INFO mlflow.models.cli: Selected backend for flavor 'python_function'
2022/12/08 12:37:12 INFO mlflow.utils.conda: Conda environment mlflow-1433535863ef053dea37ca28e47daf2bbabfb74f already exists.
2022/12/08 12:37:12 INFO mlflow.pyfunc.backend: === Running command 'source /home/myuser/.local/lib/miniconda3/bin/../etc/profile.d/conda.sh && conda activate mlflow-1433535863ef053dea37ca28e47daf2bbabfb74f 1>&2 && python -c "from mlflow.pyfunc.scoring_server import _predict; _predict(model_uri='file:///home/myuser/code/external/aml_command_cli/aml_command_cli/model', input_path='test_data/images.json', output_path=None, content_type='json', json_format='split')"'
Traceback (most recent call last):
File "<string>", line 1, in <module>
TypeError: _predict() got an unexpected keyword argument 'json_format'
Traceback (most recent call last):
File "/home/myuser/code/external/aml_command_cli/.conda-env/bin/mlflow", line 11, in <module>
sys.exit(cli())
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/mlflow/models/cli.py", line 125, in predict
return _get_flavor_backend(
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/mlflow/pyfunc/backend.py", line 126, in predict
return _execute_in_conda_env(
File "/home/myuser/code/external/aml_command_cli/.conda-env/lib/python3.10/site-packages/mlflow/pyfunc/backend.py", line 389, in _execute_in_conda_env
raise Exception(
Exception: Command 'source /home/myuser/.local/lib/miniconda3/bin/../etc/profile.d/conda.sh && conda activate mlflow-1433535863ef053dea37ca28e47daf2bbabfb74f 1>&2 && python -c "from mlflow.pyfunc.scoring_server import _predict; _predict(model_uri='file:///home/myuser/code/external/aml_command_cli/aml_command_cli/model', input_path='test_data/images.json', output_path=None, content_type='json', json_format='split')"' returned non zero return code. Return code = 1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.