Coder Social home page Coder Social logo

aml_command_cli's People

Contributors

bstollnitz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aml_command_cli's Issues

Inference on local machine does not work

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.