Skip to content

refactor(BA-1409): Apply provisioner pattern to agent #4644

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fregataa
Copy link
Member

@fregataa fregataa commented Jun 9, 2025

resolves #4468 (BA-1409)

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Installer updates including:
    • Fixtures for db schema changes
    • New mandatory config options
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation
  • Documentation
    • Contents in the docs directory
    • docstrings in public interfaces and type annotations

@fregataa fregataa added this to the 25Q2 milestone Jun 9, 2025
@fregataa fregataa requested a review from HyeockJinKim June 9, 2025 10:38
@fregataa fregataa self-assigned this Jun 9, 2025
@github-actions github-actions bot added size:L 100~500 LoC comp:agent Related to Agent component comp:common Related to Common component labels Jun 9, 2025
@github-actions github-actions bot added size:XL 500~ LoC and removed size:L 100~500 LoC labels Jun 10, 2025
@fregataa fregataa requested a review from HyeockJinKim June 10, 2025 07:27
Comment on lines +53 to +57
@dataclass
class ScratchResult:
scratch_root: Path
scratch_type: str
kernel_id: KernelId
Copy link
Collaborator

Choose a reason for hiding this comment

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

It seems a bit unnatural to include the kernel_id as a result value.
If another stage needs the kernel_id, it might appear as though there's a dependency on scratch provision stage, and the dependency relationship wouldn't be easily visible.

@fregataa
Copy link
Member Author

Restart (or recover) stages should be implemented separately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:agent Related to Agent component comp:common Related to Common component size:XL 500~ LoC
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Agent's Kernel Creation Flow
2 participants