Skip to content

Commit

Permalink
Merge pull request #938 from roboflow/sdk-reference-docs
Browse files Browse the repository at this point in the history
docstrings for SDK reference docs
  • Loading branch information
hansent authored Jan 16, 2025
2 parents 5e85ed2 + 096d01e commit d42c522
Show file tree
Hide file tree
Showing 21 changed files with 1,347 additions and 17 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ scratch
docs/workflows/blocks/*
docs/workflows/kinds/*
docs/workflows/gallery/*
docs/reference/*
docs/inference_helpers/cli_commands/reference.md
docs/openapi.json
!tests/workflows/integration_tests/execution/assets/*.jpg
Expand Down
3 changes: 3 additions & 0 deletions inference_sdk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
)
from inference_sdk.utils.environment import str2bool

# Environment variable to control whether SDK warnings are disabled.
# Set to "true" to disable all SDK-specific warnings, "false" to enable them.
# Default is "false" (warnings enabled).
INFERENCE_WARNINGS_DISABLED = str2bool(
os.getenv("INFERENCE_WARNINGS_DISABLED", "False")
)
Expand Down
2 changes: 2 additions & 0 deletions inference_sdk/config.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
class InferenceSDKDeprecationWarning(Warning):
"""Class used for warning of deprecated features in the Inference SDK"""

pass
13 changes: 13 additions & 0 deletions inference_sdk/http/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"""Inference SDK HTTP module.
This module provides HTTP-based functionality for the Inference SDK, including utilities
for making HTTP requests, handling responses, and processing images. It contains tools
for loading and preprocessing images, building requests, and managing API interactions.
The module includes utilities for:
- Loading images from files, URLs and base64 strings
- Resizing and preprocessing images while maintaining aspect ratio
- Building and formatting HTTP requests with proper headers and payloads
- Handling API responses and errors safely
- Profiling workflow execution
"""
Loading

0 comments on commit d42c522

Please sign in to comment.