-
Notifications
You must be signed in to change notification settings - Fork 24
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
Ksohi/add quota scheduler guide #3038
Conversation
- Add New Mermaid in Quota scheduler and rate limiter guide - Flatten out quota scheduler guide - Improve code example - Add policy photos - Rework text - Add policy validation
WalkthroughThe recent updates introduce comprehensive guidance and examples for managing API quotas and rate limiting using the Aperture SDK. New documents and scripts have been added to assist users in setting up quota scheduling policies and monitoring their performance. The SDK examples have been enriched with functions to initialize the Aperture Client, handle request rate limits, and schedule requests based on user tiers, enhancing the developer experience with practical, executable code. Changes
TipsChat with CodeRabbit Bot (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 6
Configuration used: CodeRabbit UI
Files ignored due to filter (36)
- docs/content/code-snippets.json
- docs/content/guides/api-quota-management/assets/managing-quotas/managing-quotas.mmd
- docs/content/guides/api-quota-management/assets/managing-quotas/managing-quotas.mmd.md5sum
- docs/content/guides/api-quota-management/assets/managing-quotas/managing-quotas.mmd.svg
- docs/content/guides/assets/managing-quotas/graph.mmd
- docs/content/guides/assets/managing-quotas/graph.mmd.md5sum
- docs/content/guides/assets/managing-quotas/graph.mmd.svg
- docs/content/guides/assets/managing-quotas/managing-quotas.mmd
- docs/content/guides/assets/managing-quotas/managing-quotas.mmd.md5sum
- docs/content/guides/assets/managing-quotas/managing-quotas.mmd.svg
- docs/content/guides/assets/managing-quotas/policy.yaml
- docs/content/guides/assets/managing-quotas/queue.png
- docs/content/guides/assets/managing-quotas/quota-scheduling-test.png
- docs/content/guides/assets/managing-quotas/request-metrics.png
- docs/content/guides/assets/managing-quotas/values.yaml
- docs/content/guides/assets/managing-quotas/workloads.png
- docs/content/guides/assets/openai/flow-analytics-dark.png
- docs/content/guides/assets/openai/flow-analytics-light.png
- docs/content/guides/assets/openai/priorities-dark.png
- docs/content/guides/assets/openai/priorities-light.png
- docs/content/guides/assets/openai/quota-scheduler-blueprint.png
- docs/content/guides/assets/openai/token-rate-dark.png
- docs/content/guides/assets/openai/token-rate-light.png
- docs/content/guides/assets/per-user-rate-limiting/graph.mmd
- docs/content/guides/assets/per-user-rate-limiting/graph.mmd.md5sum
- docs/content/guides/assets/per-user-rate-limiting/graph.mmd.svg
- docs/content/guides/assets/per-user-rate-limiting/policy.yaml
- docs/content/guides/assets/per-user-rate-limiting/rate-limit-test.png
- docs/content/guides/assets/per-user-rate-limiting/rate-limiter-graph.png
- docs/content/guides/assets/per-user-rate-limiting/rate-limiting.mmd
- docs/content/guides/assets/per-user-rate-limiting/rate-limiting.mmd.md5sum
- docs/content/guides/assets/per-user-rate-limiting/rate-limiting.mmd.svg
- docs/content/guides/assets/per-user-rate-limiting/values.yaml
- docs/gen/policy/aperture.swagger.yaml
- sdks/aperture-js/example/package-lock.json
- sdks/aperture-js/example/package.json
Files selected for processing (7)
- docs/content/guides/api-quota-management.md (1 hunks)
- docs/content/guides/assets/managing-quotas/validate.sh (1 hunks)
- docs/content/guides/assets/per-user-rate-limiting/validate.sh (1 hunks)
- docs/content/guides/openai.md (2 hunks)
- docs/content/guides/per-user-rate-limiting.md (3 hunks)
- sdks/aperture-js/example/quota_scheduler_example.ts (1 hunks)
- sdks/aperture-js/example/rate_limit_example.ts (1 hunks)
Files skipped from review due to trivial changes (1)
- docs/content/guides/assets/per-user-rate-limiting/validate.sh
Additional comments: 10
docs/content/guides/api-quota-management.md (1)
- 1-274: The documentation in
api-quota-management.md
provides comprehensive instructions and code snippets for setting up quota scheduling with the Aperture SDK. It includes details on the overview of quota scheduling, setting up the Aperture Client, creating a quota scheduling policy, and monitoring the policy. The documentation also references various images and code snippets, which should be verified for accuracy and relevance to the content. Ensure that all referenced assets and code snippets are correctly included and rendered in the documentation.docs/content/guides/openai.md (4)
1-6: The change in sidebar position is noted and appears to be correct.
11-18: The updates to the import paths align with the reorganization of the documentation structure as mentioned in the summary.
9-21: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-20]
Please verify if the Grafana dashboard screenshot mentioned in the PR objectives has been included elsewhere in the PR, as it is not visible in the provided hunks.
The Grafana dashboard screenshot has been included in the
README.md
file.
- 9-21: > Note: This review was outside the patches, so it was mapped to the patch with the greatest overlap. Original lines [1-20]
The changes to the declarations of exported entities in TypeScript example scripts mentioned in the summaries are not part of the provided hunks, so they cannot be reviewed here.
docs/content/guides/per-user-rate-limiting.md (3)
17-29: The addition of the note and overview provides useful context and information about rate limiting, which is relevant to the guide's topic.
56-78: The pre-requisites note and the introduction to setting up the Aperture SDK are clear and provide a good starting point for users to follow along with the guide.
82-252: The detailed instructions for setting up rate limiting, creating policies, and monitoring are well-structured and informative. The use of tabs to differentiate between interfaces and the inclusion of images are good practices for enhancing user understanding.
sdks/aperture-js/example/quota_scheduler_example.ts (1)
- 63-68: Ensure that the introduction of these new functions and the changes made do not introduce breaking changes across the codebase.
The new functions
scheduleRequests
andsendRequestForTier
are used withinquota_scheduler_example.ts
. No issues found with their usage in this context.sdks/aperture-js/example/rate_limit_example.ts (1)
- 34-34: Verify the unit of time expected for the
deadline
property ingrpcCallOptions
. If it expects a timestamp in milliseconds, then the current implementation is correct. Otherwise, adjust the calculation to match the expected unit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- docs/content/introduction.md (1 hunks)
Additional comments: 1
docs/content/introduction.md (1)
- 55-58: The update to the hyperlink reference for the "API Quota Management" guide is correct and reflects the change mentioned in the summary.
Description of change
Checklist
Summary by CodeRabbit
Documentation
New Features
Refactor