Skip to content

[WIP] update pyproject.toml#1

Merged
Yunnglin merged 13 commits intodevfrom
yunlin
Jan 19, 2026
Merged

[WIP] update pyproject.toml#1
Yunnglin merged 13 commits intodevfrom
yunlin

Conversation

@Yunnglin
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings January 12, 2026 05:49
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Yunnglin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request modernizes the project's dependency management by adopting a standardized pyproject.toml structure and introduces a detailed guide for AI agents to understand the repository's patterns and workflows. Additionally, it adjusts a specific example script to utilize local execution and a simplified device configuration.

Highlights

  • Project Configuration Update: The pyproject.toml file has been significantly refactored to align with modern Python packaging standards (PEP 621), reorganizing dependencies and project metadata into dedicated [project] and [project.optional-dependencies] sections.
  • AI Agent Guidelines Added: A new comprehensive markdown file, .github/copilot-instructions.md, has been introduced to provide detailed guidelines for AI agents, outlining the project's architecture, core modules, developer workflows, and conventions related to LLM training and serving.
  • Local Mode Initialization: The cookbook/sft/lora.py example script now initializes twinkle in 'local' mode instead of 'ray' mode, and simplifies the DeviceMesh configuration from a 2D mesh to a 1D mesh.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request primarily refactors pyproject.toml to align with modern Python packaging standards (PEP 621), which is a great improvement for maintainability. My review focuses on ensuring the dependency migration is complete and correct. I've identified some potentially missing dependencies and a few packages that could benefit from version pinning.

Additionally, I've noted a change in an example script (cookbook/sft/lora.py) that seems unrelated to the PR's goal and might be an accidental commit. Finally, I've pointed out some potentially broken links in the newly added copilot-instructions.md file.

Copy link
Copy Markdown

Copilot AI left a 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 updates the project configuration by migrating from Poetry-native format to a hybrid PEP 621 format in pyproject.toml, adds new AI coding assistant guidelines, and simplifies a training example.

Changes:

  • Restructured pyproject.toml to use PEP 621 [project] section while retaining Poetry as the build backend
  • Added comprehensive AI coding agent guidelines in .github/copilot-instructions.md
  • Simplified cookbook/sft/lora.py device mesh from 2D (DP+FSDP) to 1D (DP only) and switched from 'ray' to 'local' mode

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 6 comments.

File Description
pyproject.toml Migrated project metadata to PEP 621 format with [project] section, restructured dependencies and optional dependencies, retained Poetry build backend
cookbook/sft/lora.py Simplified device mesh configuration to 1D data parallel only and changed initialization mode to 'local'
.github/copilot-instructions.md Added comprehensive guidelines for AI coding agents including architecture patterns, developer workflows, and examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Yunnglin Yunnglin changed the title update pyproject.toml [WIP] update pyproject.toml Jan 12, 2026
@Yunnglin
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request is a work-in-progress that introduces significant new functionality for serving models with Ray Serve and providing a tinker-compatible API. The changes include a major refactoring of pyproject.toml to modern standards, new cookbook examples, and the core server logic. The architecture using a central state actor and asynchronous task scheduling is well-designed. However, there are several areas that need attention. There are leftover debugging statements (breakpoint()) in the code. Several key API endpoints in the server implementation are currently mock/stub implementations and need to be fully implemented. There's a potential correctness issue in the forward_backward response where logits are returned in a field named logprobs. The use of trust_remote_code=True in an example script poses a security risk. Finally, some dependency and configuration details could be improved for robustness and reproducibility.

@Yunnglin Yunnglin merged commit 3d72cfe into dev Jan 19, 2026
@tastelikefeet tastelikefeet deleted the yunlin branch February 13, 2026 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants