Skip to content

Instantly share code, notes, and snippets.

View zdravko-il's full-sized avatar

Zdravko Yanakiev zdravko-il

View GitHub Profile
FROM python:3.8-slim
RUN apt update && apt install zip jq curl -y
RUN curl -O https://sfc-repo.snowflakecomputing.com/snowsql/bootstrap/1.2/linux_x86_64/snowsql-1.2.24-linux_x86_64.bash && \
SNOWSQL_DEST=~/bin SNOWSQL_LOGIN_SHELL=~/.profile bash snowsql-1.2.24-linux_x86_64.bash
LIST @DEPLOY;
-- deploy/model_0.3.joblib 512 323c36f70e713ab762d395077c9ab244 Thu, 9 Mar 2023 14:08:22 GMT
CALL register_model_to_udf('model_0.3.joblib', 'forecast_new');
SELECT forecast_new(2050);
-- 169.78
git tag 0.3 # Release model version 0.3
git push --tags # Push to remote
{
"title": "PCE Forecast tests",
"assertions": [
{
"name": "Prediction returns positive int",
"value": "SELECT predict_pce_udf(2023) WHERE predict_pce_udf(2023) < 0"
}
]
}
def test_filter(session: Session):
source_data = [...]
schema = T.StructType(...)
source_df = session.create_dataframe(source_data, schema=schema)
actual_df = process.filter_personal_consumption_expenditures(source_df)
expected_data = [(2021, 115.53)]
expected_df = session.create_dataframe(
expected_data,
schema=T.StructType(
[
snowpark-devops
├── ci
│ └── Dockerfile
├── setup
├── snowpark_devops
├── tests
├── config.py
├── poetry.lock
├── pyproject.toml
├── requirements.other.txt