-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Pipeline maintainence #451
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
Conversation
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.
Pull request overview
This PR performs maintenance tasks on the codebase, including adding a new Azure OpenAI cleanup script, adding defensive null checks to MongoDB operations, implementing stub methods for experimental Weave annotation queue APIs, and refactoring async function detection logic.
Changes:
- Added a new utility script
cleanup_aoai.pyfor deleting Azure OpenAI fine-tuning jobs and data files - Added a null check in MongoDB upsert operation to satisfy type checkers
- Implemented stub methods for experimental Weave annotation queue APIs
- Refactored async function detection to include additional
asyncio.iscoroutinefunctionchecks
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/cleanup_aoai.py | New utility script for cleaning up Azure OpenAI resources (fine-tuning jobs and files) |
| agentlightning/store/collection/mongo.py | Added defensive null check in upsert operation with pyright ignore comment |
| agentlightning/instrumentation/weave.py | Added stub implementations for experimental Weave annotation queue API methods |
| agentlightning/emitter/reward.py | Refactored async function detection to include hasattr check for asyncio.iscoroutinefunction |
| agentlightning/emitter/annotation.py | Refactored async function detection to include hasattr check for asyncio.iscoroutinefunction |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| is_async = inspect.iscoroutinefunction(fn) or ( | ||
| hasattr(asyncio, "iscoroutinefunction") and asyncio.iscoroutinefunction(fn) # type: ignore | ||
| ) |
Copilot
AI
Jan 16, 2026
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.
The check for asyncio.iscoroutinefunction is redundant and potentially confusing. The inspect.iscoroutinefunction function already handles all coroutine function detection including those decorated with asyncio.coroutine. The hasattr check and additional asyncio.iscoroutinefunction call are unnecessary since inspect.iscoroutinefunction is the standard and complete way to detect coroutine functions. Consider simplifying to just use inspect.iscoroutinefunction.
| is_async = inspect.iscoroutinefunction(fn) or ( | |
| hasattr(asyncio, "iscoroutinefunction") and asyncio.iscoroutinefunction(fn) # type: ignore | |
| ) | |
| is_async = inspect.iscoroutinefunction(fn) |
| if inspect.iscoroutinefunction(fn) or ( | ||
| hasattr(asyncio, "iscoroutinefunction") and asyncio.iscoroutinefunction(fn) # type: ignore | ||
| ): |
Copilot
AI
Jan 16, 2026
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.
The check for asyncio.iscoroutinefunction is redundant and potentially confusing. The inspect.iscoroutinefunction function already handles all coroutine function detection including those decorated with asyncio.coroutine. The hasattr check and additional asyncio.iscoroutinefunction call are unnecessary since inspect.iscoroutinefunction is the standard and complete way to detect coroutine functions. Consider simplifying to just use inspect.iscoroutinefunction.
| if inspect.iscoroutinefunction(fn) or ( | |
| hasattr(asyncio, "iscoroutinefunction") and asyncio.iscoroutinefunction(fn) # type: ignore | |
| ): | |
| if inspect.iscoroutinefunction(fn): |
|
/ci |
|
🚀 CI Watcher for correlation id-3759124194-mkgpbbzj triggered by comment 3759124194
✅ All runs completed. |
No description provided.