diff --git a/samples/py_native/models/profiles.yaml b/samples/py_native/models/profiles.yaml index 269641b7..93cbfa16 100644 --- a/samples/py_native/models/profiles.yaml +++ b/samples/py_native/models/profiles.yaml @@ -12,7 +12,7 @@ models: entity_key: user training: predict_var: models/cohort/is_churned_7_days - predict_window_days: 14 + predict_window_days: 7 eligible_users: '*' max_row_count: 500000 label_value: 1 @@ -44,53 +44,53 @@ models: - packages/feature_table/entity/user/random_float_feature - packages/feature_table/models/rsRandomSQLModel - # - name: training_Regression_model - # model_type: training_model - # model_spec: - # occurred_at_col: insert_ts - # entity_key: user - # inputs: - # - packages/feature_table/entity/user/is_churned_7_days - # - packages/feature_table/entity/user/days_since_last_seen - # - packages/feature_table/models/rsRandomSQLModel - # ml_config: - # data: - # task: regression - # label_column: packages/feature_table/entity/user/days_since_last_seen - # prediction_horizon_days: 7 - # eligible_users: '*' - # output_profiles_ml_model: ltv_regression_integration_test - # new_materialisations_config: - # strategy: "manual" - # dates: - # - '2024-08-01,2024-08-07' - # - '2024-08-02,2024-08-08' - # - '2024-08-03,2024-08-09' + - name: training_Regression_model + model_type: training_model + model_spec: + occurred_at_col: insert_ts + entity_key: user + inputs: + - packages/feature_table/entity/user/is_churned_7_days + - packages/feature_table/entity/user/days_since_last_seen + - packages/feature_table/models/rsRandomSQLModel + ml_config: + data: + task: regression + label_column: packages/feature_table/entity/user/days_since_last_seen + prediction_horizon_days: 7 + eligible_users: '*' + output_profiles_ml_model: ltv_regression_integration_test + new_materialisations_config: + strategy: "manual" + dates: + - '2024-08-01,2024-08-07' + - '2024-08-02,2024-08-08' + - '2024-08-03,2024-08-09' - # - name: prediction_regression_model - # model_type: prediction_model - # model_spec: - # occurred_at_col: insert_ts - # entity_key: user - # training_model: models/training_regression_model - # inputs: - # - packages/feature_table/entity/user/is_churned_7_days - # - packages/feature_table/entity/user/days_since_last_seen - # - packages/feature_table/models/rsRandomSQLModel - # ml_config: - # data: - # task: regression - # label_column: packages/feature_table/entity/user/days_since_last_seen - # prediction_horizon_days: 7 - # eligible_users: '*' - # output_profiles_ml_model: ltv_regression_integration_test - # outputs: - # column_names: - # percentile: percentile_regression_days_since_last_seen - # score: regression_days_since_last_seen - # features: - # - name: percentile_regression_days_since_last_seen - # description: description + - name: prediction_regression_model + model_type: prediction_model + model_spec: + occurred_at_col: insert_ts + entity_key: user + training_model: models/training_regression_model + inputs: + - packages/feature_table/entity/user/is_churned_7_days + - packages/feature_table/entity/user/days_since_last_seen + - packages/feature_table/models/rsRandomSQLModel + ml_config: + data: + task: regression + label_column: packages/feature_table/entity/user/days_since_last_seen + prediction_horizon_days: 7 + eligible_users: '*' + output_profiles_ml_model: ltv_regression_integration_test + outputs: + column_names: + percentile: percentile_regression_days_since_last_seen + score: regression_days_since_last_seen + features: + - name: percentile_regression_days_since_last_seen + description: description var_groups: - name: cohortVars diff --git a/tests/integration/bigquery/pynative.py b/tests/integration/bigquery/pynative.py index 34f46c63..d812dcd1 100644 --- a/tests/integration/bigquery/pynative.py +++ b/tests/integration/bigquery/pynative.py @@ -2,7 +2,25 @@ import os import subprocess -creds = json.loads(os.environ["SITE_CONFIG"]) +# creds = json.loads(os.environ["SITE_CONFIG"]) +creds = { + "credentials": { + "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs", + "auth_uri": "https://accounts.google.com/o/oauth2/auth", + "client_email": "rudderstack-service-test@rudderstacktestbq.iam.gserviceaccount.com", + "client_id": "111481231866230448510", + "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/rudderstack-service-test%40rudderstacktestbq.iam.gserviceaccount.com", + "private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDdRI94ziCUCv98\nHoFpwrTa5TRQyk8l7NQ2dbxBBa+OQETCeZ77cxALkm1kQdCKKV14ygrtb5Ce+9d8\ng7hU//Bk/DcL9/SWBeg1psNjbUPYboUQkoIv7EuY6wHe66oXo5JXahr1leGoI8vs\n6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9uK8yvSsozrdG6FUaXy/Fsr9EZaBAoGAUHJN\n4Z3au3eqGAVwCsE3CRqZEF7OLpWc69JkZNYa3g9QNuYnF2wghKBmq3L2wjcQnNyT\nOHL+kKqq2eWPcDdtL7dWm4Q/3t7R/BAxdHu0RCLbkyvORQQ06lnshvPO3fh9dSTa\nlALaIBSUlBe+L2Lkk/l2V1e/kF53sGBaaFVyDJECgYEAg1u3nWoT/rPxTfYwM8He\nBgkCeWARM+TmKpyZnlv/DAPK0g8ucoZUbU2YSZtGCvGlwMKRKnKduTO1ZNzflvsy\nljHoEpYM54eJpEXS1bG0zdjcsC9efNsGyRh7pol1ek9UUAjeAyAxOrgpvtUK+w0y\nNHOKDQkQ7iVXIuhEt2EgIZA=\n-----END PRIVATE KEY-----\n", + "private_key_id": "5f4888127bfbf5aa848b29f245dcf371a8512b6e", + "project_id": "rudderstacktestbq", + "token_uri": "https://oauth2.googleapis.com/token", + "type": "service_account", + }, + "project_id": "rudderstacktestbq", + "schema": "CLASSIFIER_INTEGRATION_TEST", + "type": "bigquery", + "user": "rudderstack-service-test@rudderstacktestbq.iam.gserviceaccount.com", +} creds["schema"] = "CLASSIFIER_INTEGRATION_TEST" @@ -24,10 +42,10 @@ def run_project(): validate_py_native_df_regressor(creds) except Exception as e: raise e - finally: - cleanup_cmd = pb_cleanup_warehouse_tables(pynative_project, siteconfig_path) - subprocess.run(f"yes | {cleanup_cmd}", shell=True, text=True) - cleanup_pb_project(pynative_project, siteconfig_path) + # finally: + # cleanup_cmd = pb_cleanup_warehouse_tables(pynative_project, siteconfig_path) + # subprocess.run(f"yes | {cleanup_cmd}", shell=True, text=True) + # cleanup_pb_project(pynative_project, siteconfig_path) run_project()