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

docstrings for SDK reference docs #938

Merged
merged 8 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these files get autogenerated via gen_ref_pages.py / gen-files mkdocs plugin

!tests/workflows/integration_tests/execution/assets/*.jpg
!tests/workflows/integration_tests/execution/assets/rock_paper_scissors/*.jpg
!tests/workflows/unit_tests/core_steps/models/third_party/assets/*.png
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
Loading