From 9e789e519381bad2de8f13bd0fa98b3d3a3e6e51 Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Fri, 2 Feb 2024 20:38:23 -0800 Subject: [PATCH] Fix CostWatcher lambda --- cost_watcher/lambda_function.py | 2 +- metadata.ini | 2 +- xgboost_devops.yml | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/cost_watcher/lambda_function.py b/cost_watcher/lambda_function.py index bb6de09..ef8d66e 100644 --- a/cost_watcher/lambda_function.py +++ b/cost_watcher/lambda_function.py @@ -182,7 +182,7 @@ def get_ec2_pricing() -> Dict[Tuple[str, str], float]: assert product_attrs["capacitystatus"] == "Used" assert product_attrs["preInstalledSw"] == "NA" assert re.match( - r"^RunInstances(?::[0-9g]{4}){0,1}$", product_attrs["operation"] + r"^RunInstances(?::[0-9A-Za-z]{1,4}){0,1}$", product_attrs["operation"] ) price_record = obj["terms"]["OnDemand"] id1 = list(price_record)[0] diff --git a/metadata.ini b/metadata.ini index 32aac40..e7fbdff 100644 --- a/metadata.ini +++ b/metadata.ini @@ -1,2 +1,2 @@ [DEFAULT] -daily_budget = 50 +daily_budget = 30 diff --git a/xgboost_devops.yml b/xgboost_devops.yml index 0b975bc..7342db3 100644 --- a/xgboost_devops.yml +++ b/xgboost_devops.yml @@ -1,9 +1,8 @@ name: xgboost_devops channels: - conda-forge - - defaults dependencies: - - python=3.7 + - python=3.10 - pip - requests - boto3