Create Predicted Eventlog

From QPR ProcessAnalyzer Wiki
Revision as of 09:52, 15 February 2024 by Ollvihe (talk | contribs)
Jump to navigation Jump to search

Prerequisites

Following prerequisites need to be fullfilled to run the eventlog prediction:

  • QPR ProcessAnalyzer 2024.2 or later
  • Snowflake is configured
  • Source model is stored to Snowflake

Prediction installation

Follow these steps to install the eventlog prediction:

  1. Create a Snowflake-managed stage with name PREDICTION to the same schema that is configured for QPR ProcessAnalyzer (in the Snowflake connection string).
  2. Open the created stage and upload the predict.pyz file to the stage (ask the file from your QPR representative).
  3. Create the procedure procedure to the same schema.
CREATE OR REPLACE PROCEDURE QPRPA_SP_PREDICTION("CONFIGURATION" OBJECT)
RETURNS OBJECT
LANGUAGE PYTHON
STRICT
RUNTIME_VERSION = '3.8'
PACKAGES = ('nltk','numpy','pandas==1.5.3','scikit-learn','snowflake-snowpark-python','tensorflow','dill','prophet','holidays==0.18','python-kubernetes','docker-py')
HANDLER = 'main'
EXECUTE AS OWNER
AS '
import sys
def main(session, parameters_in: dict) -> dict:
	session.file.get(''@prediction/predict.pyz'', ''/tmp'')
	sys.path.append(''/tmp/predict.pyz'')
	import predict
	return predict.main(session, parameters_in)
';
  1. awef