Azure / MachineLearningNotebooks

Python notebooks with ML and deep learning examples with Azure Machine Learning Python SDK | Microsoft
https://docs.microsoft.com/azure/machine-learning/service/
MIT License
4k stars 2.49k forks source link

infer.py file from forecasting-pipelines sample folder #1878

Open jrnh1 opened 1 year ago

jrnh1 commented 1 year ago

Hi Im using the forecasting-pipelines sample, to build a training and inference pipeline. The training pipeline is running without error (I am using some public sales data) but the inferene pipeline is giving me this error:

/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/sklearn/externals/joblib/init.py:15: FutureWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+. warnings.warn(msg, category=FutureWarning) args passed are: ojmodel dominicks_OJ_test_pipeline oj-output Sales model.pkl azureml-models/ojmodel/36/outputs/model.pkl Importing plotly failed. Interactive plots will not work. /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) /bin/bash: /azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/libtinfo.so.6: no version information available (required by /bin/bash) Validating arguments. Arguments validated. Successfully obtained datastore reference and path. Uploading file to 2023-01-27-6571d9/7dc81504-f7db-43d2-b7f2-18f10c631e05/ Cleaning up all outstanding Run operations, waiting 300.0 seconds 1 items cleaning up... Cleanup took 0.09214901924133301 seconds Traceback (most recent call last): File "infer.py", line 154, in X_test_df, y_test, fitted_model, args.output_path, ouput_dataset_name File "infer.py", line 39, in infer_forecasting_dataset_tcn name=output_dataset_name, File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/data/_loggerfactory.py", line 132, in wrapper return func(*args, *kwargs) File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/data/dataset_factory.py", line 655, in register_pandas_dataframe dflow.write_to_parquet(directory_path=target_directory_path).run_local() File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/_loggerfactory.py", line 273, in wrapper return func(args, **kwargs) File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/dataflow.py", line 636, in run_local _execute('Dataflow.run_local', self, span_context=to_dprep_span_context(span.get_context())) File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/_dataframereader.py", line 608, in _execute return clex_execute() File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/_dataframereader.py", line 440, in clex_execute anonymous_activity=activity_data, span_context=span_context File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/_aml_helper.py", line 44, in wrapper return send_message_func(op_code, message, cancellation_token) File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/engineapi/api.py", line 159, in execute_anonymous_activity response = self._message_channel.send_message('Engine.ExecuteActivity', message_args, cancellation_token) File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/engineapi/engine.py", line 291, in send_message raise_engine_error(response['error']) File "/azureml-envs/azureml_d1809f029ef68d0db142d99e1cd4a92c/lib/python3.7/site-packages/azureml/dataprep/api/errorhandlers.py", line 10, in raise_engine_error raise ExecutionError(error_response) azureml.dataprep.api.errorhandlers.ExecutionError: Error Code: ScriptExecution.ReadDataFrame.StreamAccess.Validation Validation Error Code: Invalid Validation Target: PreppyFile Failed Step: 9cf6aeee-adcf-4f1e-acbd-b5529e4402ad Error Message: ScriptExecutionException was caused by ReadDataFrameException. Failed to read Pandas DataFrame form Python host. Make sure Dataflow is created directly from the source Pandas DataFrame. StreamAccessException was caused by ValidationException. Trying to read an invalid file. Missing sentinel value in the beginning | session_id=b6a0e361-a061-4fb9-ba08-9567b9f3994b

I am using the infor.py copied directly from the sample "forecasting-pipelines" file - does it have to be change in some way? or is it something else that is causing the error?

´´´ inference_pipeline = Pipeline(ws, [inference_step]) inference_run = experiment.submit(inference_pipeline) ´´´