V3 scoring model, add prom monitoring

This commit is contained in:
Jackson Harper
2024-07-04 17:49:02 +08:00
parent ca7800f1c1
commit e1fe4237de
5 changed files with 90 additions and 142 deletions

View File

@ -15,13 +15,17 @@ from google.cloud import storage
from features.extract import extract_and_upload_raw_data
from features.user_history import generate_and_upload_user_history
from datetime import datetime, timezone
def main():
execution_date = os.getenv('EXECUTION_DATE')
num_days_history = os.getenv('NUM_DAYS_HISTORY')
gcs_bucket_name = os.getenv('GCS_BUCKET')
current_date_utc = datetime.now(timezone.utc)
execution_date = current_date_utc.strftime("%Y-%m-%d")
print(f'updating features using execution date: {execution_date}')
extract_and_upload_raw_data(execution_date, num_days_history, gcs_bucket_name)
generate_and_upload_user_history(execution_date, gcs_bucket_name)