Skip to content

Commit

Permalink
Skip instances with 0 price in azure
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Mezentsev authored and TheBits committed Mar 1, 2024
1 parent f87d6c6 commit 405a152
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gpuhunt/providers/azure.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import logging
import math
import os
import re
import time
Expand Down Expand Up @@ -146,10 +147,13 @@ def get(
continue
if not item["armSkuName"]:
continue
price = float(item["retailPrice"])
if math.isclose(price, 0):
continue
offer = RawCatalogItem(
instance_name=item["armSkuName"],
location=item["armRegionName"],
price=item["retailPrice"],
price=price,
spot="Spot" in item["meterName"],
cpu=None,
memory=None,
Expand Down

0 comments on commit 405a152

Please sign in to comment.