I am trying to create a snowflake native application which can predict credit card fraud.
And my final goal is, I should be able to share this snowflake application with other accounts and anyone who install this should be able to train a model by using their data and use it for inference using a python UDF in snowflake.
below is my current directory structure
snowflake application package (contains the below directory structure)
@SAMPLE_STAGE:
├── manifest
└── scripts/
├── setup_script ( creates the stored procedure and UDF by referring below py files
└── python
└── model_train.py ( is stored proc, trains and stores model inside app stage location)
└── fraud_inference.py ( is UDF, needs to access the model stored inside the app stage)
below is the progress so far
1.) my setup script runs fine, i.e it created both the stored proc and UDF without any error
2.) my stored proc runs fine, i.e the model training runs fine and the model file gets generated inside one of my application stage.
3.) I'm unable to use the model file, created in step 2 by the stored proc.
pastebin links for files
`setup_script.sql - https://pastebin.com/ec8dhmH5`
`model_train.py - https://pastebin.com/xfJjK23K`
`fraud_inference.py - https://pastebin.com/MD55yHm6`
file names are different inside the code. please ignore that