Skip to content

Commit

Permalink
Remove error message when usage cannot be sent
Browse files Browse the repository at this point in the history
  • Loading branch information
grzegorz-roboflow committed Jul 18, 2024
1 parent 6ef6d1d commit 3877769
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions inference/usage_tracking/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
UsagePayload = Union[APIKeyUsage, ResourceDetails, SystemDetails]


ENTERPRISE_WARNING_MESSAGE: str = """
It seems there was a problem sending telemetry to Roboflow platform.
If usage tracking is part of your agreement with Roboflow you are required to have your usage sent.
"""


class UsageCollector:
_lock = Lock()
_async_lock = asyncio.Lock()
Expand Down Expand Up @@ -162,8 +156,6 @@ def _zip_usage_payloads(usage_payloads: List[APIKeyUsage]) -> List[APIKeyUsage]:
and len(resource_payloads) > 1
or list(resource_payloads.keys()) != [None]
):
if any(r.get("enterprise") for r in resource_payloads.values()):
logger.error(ENTERPRISE_WARNING_MESSAGE)
logger.debug(
"Dropping usage payload %s due to missing API key",
resource_payloads,
Expand Down Expand Up @@ -521,14 +513,10 @@ def _offload_to_api(self, payloads: List[APIKeyUsage]):
timeout=1,
)
except Exception as exc:
if enterprise:
logger.error(ENTERPRISE_WARNING_MESSAGE)
logger.debug("Failed to send usage - %s", exc)
api_keys_failed.add(api_key)
continue
if response.status_code != 200:
if enterprise:
logger.error(ENTERPRISE_WARNING_MESSAGE)
logger.debug(
"Failed to send usage - got %s status code (%s)",
response.status_code,
Expand Down

0 comments on commit 3877769

Please sign in to comment.