Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not pass default or empty source info #1119

Merged
merged 9 commits into from
Mar 28, 2025
2 changes: 1 addition & 1 deletion inference/core/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.44.1"
__version__ = "0.44.2rc2"


if __name__ == "__main__":
Expand Down
11 changes: 7 additions & 4 deletions inference/usage_tracking/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,13 @@ def _update_usage_payload(
source_usage["ip_address_hash"] = ip_address_hash
source_usage["is_gpu_available"] = is_gpu_available
source_usage["execution_duration"] += execution_duration
source_usage["roboflow_service_name"] = roboflow_service_name
source_usage["roboflow_internal_secret"] = roboflow_internal_secret
if (
roboflow_service_name
and roboflow_service_name != "external"
and roboflow_internal_secret
):
source_usage["roboflow_service_name"] = roboflow_service_name
source_usage["roboflow_internal_secret"] = roboflow_internal_secret

def record_usage(
self,
Expand Down Expand Up @@ -653,8 +658,6 @@ def _extract_usage_params_from_func_kwargs(
and func_kwargs["kwargs"]["api_key"]
):
usage_api_key = func_kwargs["kwargs"]["api_key"]
else:
logger.debug("Could not obtain API key from func kwargs")

roboflow_service_name = func_kwargs.get("source_info")
roboflow_internal_secret = func_kwargs.get("service_secret")
Expand Down
6 changes: 3 additions & 3 deletions requirements/_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ scikit-image>=0.19.0,<=0.24.0
requests-toolbelt~=1.0.0
wheel>=0.38.1,<=0.45.0
setuptools>=70.0.0 # lack of upper-bound to ensure compatibility with Google Colab (builds to define one if needed)
networkx~=3.1
pydantic~=2.6
pydantic-settings~=2.2
networkx<=3.4
pydantic~=2.6.0
pydantic-settings<2.8
openai>=1.12.0,<2.0.0
structlog>=24.1.0,<25.0.0
zxing-cpp~=2.2.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.cli.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ backoff~=2.2.0
pandas>=2.0.0,<2.3.0
rich~=13.0.0
pybase64~=1.0.0
pydantic~=2.6
pydantic~=2.6.0
2 changes: 1 addition & 1 deletion requirements/requirements.sam.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rf-segment-anything==1.0
samv2==0.0.4
rasterio~=1.3
rasterio<=1.4.0
torch>=2.0.1,<=2.4.0
torchvision>=0.15.2