Skip to content

Rename "capacity" to "count" in the aiModels.json #3639

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

leszko
Copy link
Contributor

@leszko leszko commented Jun 23, 2025

@ad-astra-video please check if it works for the AI Jobs.

This change is non-backward-compatible, but there are only 3 Os using it right now, so we can handle.

The context for this change is this GH Issue: #3627

FYI: @pwilczynskiclearcode (but from what I see we haven't used "capacity" in our infra, so it should be fine)
FYI: @victorges

This change is non-backward-compatible, but there are only 3 Os using it right now, so we can handle.

The context for this change is this GH Issue: #3627
@leszko leszko requested a review from ad-astra-video June 23, 2025 09:33
@github-actions github-actions bot added the go Pull requests that update Go code label Jun 23, 2025
Copy link

codecov bot commented Jun 23, 2025

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 30.56127%. Comparing base (b28a901) to head (e305dfe).

Files with missing lines Patch % Lines
cmd/livepeer/starter/starter.go 0.00000% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #3639         +/-   ##
===================================================
+ Coverage   30.55638%   30.56127%   +0.00489%     
===================================================
  Files            156         156                 
  Lines          47162       47161          -1     
===================================================
+ Hits           14411       14413          +2     
+ Misses         31910       31907          -3     
  Partials         841         841                 
Files with missing lines Coverage Δ
core/ai.go 67.40741% <ø> (ø)
cmd/livepeer/starter/starter.go 7.28597% <0.00000%> (+0.00442%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b28a901...e305dfe. Read the comment docs.

Files with missing lines Coverage Δ
core/ai.go 67.40741% <ø> (ø)
cmd/livepeer/starter/starter.go 7.28597% <0.00000%> (+0.00442%) ⬆️

... and 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -79,6 +79,7 @@ type AIModelConfig struct {
Token string `json:"token,omitempty"`
Warm bool `json:"warm,omitempty"`
Capacity int `json:"capacity,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove Capacity then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, we use Capacity, but it has a different meaning, it means "how many request can be done by one runner in parallel". It's not used by Realtime Video. But it is used for AI Jobs (for some models).

@ad-astra-video
Copy link
Collaborator

@leszko I was able to startup my LLM runner with "capacity": 3 using managed containers. Thanks for getting this PR sent!

@@ -1298,15 +1298,13 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) {
}
if *cfg.AIWorker {
modelConstraint := &core.ModelConstraint{Warm: config.Warm, Capacity: 1}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
modelConstraint := &core.ModelConstraint{Warm: config.Warm, Capacity: 1}
modelConstraint := &core.ModelConstraint{Warm: config.Warm, Capacity: config.Capacity}

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should add the Capacity set always I think.

@@ -1298,15 +1298,13 @@ func StartLivepeer(ctx context.Context, cfg LivepeerConfig) {
}
if *cfg.AIWorker {
modelConstraint := &core.ModelConstraint{Warm: config.Warm, Capacity: 1}
// External containers do auto-scale; default to 1 or use provided capacity.
if config.URL != "" && config.Capacity != 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Then remove this if stmt because we are adding Capacity set to all modelConstraint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants