Skip to content
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

ai/worker: Absorb ai-worker library #3345

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

victorges
Copy link
Member

@victorges victorges commented Jan 9, 2025

What does this pull request do? Explain your changes. (required)
This is to move the Go logic from livepeer/ai-worker repository into a separate package
in this repository (the only consumer).

This will allow livepeer/ai-worker to be renamed to ai-runner and avoid any
maintenance confusion, keeping only the specific AI runner container logic on it.

Specific updates (required)

  • Create package which current version of ai-worker worker package (needs update after some PRs get merged there)
  • Replace references and remove go.mod dependency
  • Copy Makefile command to generate runner.gen.go API bindings
  • Create short package doc.go based on the relevant README bits from livepeer/ai-worker

How did you test each of these updates (required)
If it builds it works. No code changes.

Does this pull request close any open issues?
No.

Checklist:

@github-actions github-actions bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code AI Issues and PR related to the AI-video branch. labels Jan 9, 2025
Copy link

codecov bot commented Jan 10, 2025

Codecov Report

Attention: Patch coverage is 24.87771% with 1075 lines in your changes missing coverage. Please review.

Project coverage is 32.30971%. Comparing base (4d09ba7) to head (01eda1a).

Files with missing lines Patch % Lines
ai/worker/worker.go 0.00000% 609 Missing ⚠️
ai/worker/multipart.go 0.00000% 316 Missing ⚠️
ai/worker/docker.go 74.39614% 82 Missing and 24 partials ⚠️
ai/worker/container.go 43.85965% 27 Missing and 5 partials ⚠️
ai/worker/b64.go 65.71429% 10 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@                 Coverage Diff                 @@
##              master       #3345         +/-   ##
===================================================
- Coverage   33.73413%   32.30971%   -1.42442%     
===================================================
  Files            141         147          +6     
  Lines          37425       40477       +3052     
===================================================
+ Hits           12625       13078        +453     
- Misses         24079       26630       +2551     
- Partials         721         769         +48     
Files with missing lines Coverage Δ
ai/file_worker.go 0.00000% <ø> (ø)
ai/worker/runner.gen.go 5.98396% <ø> (ø)
cmd/livepeer/starter/starter.go 7.51409% <ø> (ø)
core/ai.go 58.51852% <ø> (ø)
core/ai_orchestrator.go 31.06796% <ø> (ø)
server/ai_http.go 9.98440% <ø> (ø)
server/ai_mediaserver.go 7.81250% <ø> (ø)
server/ai_process.go 0.59778% <ø> (ø)
server/ai_worker.go 49.89059% <ø> (ø)
server/rpc.go 66.66667% <ø> (ø)
... and 5 more

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 4d09ba7...01eda1a. Read the comment docs.

Files with missing lines Coverage Δ
ai/file_worker.go 0.00000% <ø> (ø)
ai/worker/runner.gen.go 5.98396% <ø> (ø)
cmd/livepeer/starter/starter.go 7.51409% <ø> (ø)
core/ai.go 58.51852% <ø> (ø)
core/ai_orchestrator.go 31.06796% <ø> (ø)
server/ai_http.go 9.98440% <ø> (ø)
server/ai_mediaserver.go 7.81250% <ø> (ø)
server/ai_process.go 0.59778% <ø> (ø)
server/ai_worker.go 49.89059% <ø> (ø)
server/rpc.go 66.66667% <ø> (ø)
... and 5 more

victorges and others added 11 commits January 10, 2025 20:39
This commit renames the `ai_worker` file to better represent its role within
the orchestrator side of the network stack, improving clarity and
maintainability.
After offline discussion we realized it makes more sense as is. Kept some docs.
Cannot run it yet since ai-worker repo is out of sync.
Ported from original README in ai-worker repo
@victorges victorges force-pushed the vg/chore/ai-worker-to-go-livepeer branch from 17174ee to a2f4e63 Compare January 10, 2025 23:39
@victorges victorges requested a review from rickstaa January 10, 2025 23:43
@victorges victorges marked this pull request as ready for review January 10, 2025 23:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI Issues and PR related to the AI-video branch. dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants