-
Notifications
You must be signed in to change notification settings - Fork 8
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
Migrate training into celery and upload results to s3 #1157
Conversation
Quality Gate passedIssues Measures |
@andrewpeng02 Question RE testing video:
|
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.
Thank you for the detailed PR here. Main question I had was:
- How does the data flow work from frontend sending a train request to backend to passing the data to celery? What will be the data flow in production?
- Any high level diagram you could provide/document/link me to in order to understand how celery works and how it's scalable for our use case?
|
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.
much better. followed up on the comments
e7ce7d6
to
c6cffd1
Compare
…nd request from endpoint 🎨 Auto-generated directory tree for repository in Architecture.md 🎨 Format Python code with psf/black slight reformatting add refetch reduce duplicated code
🎨 Auto-generated directory tree for repository in Architecture.md
4ddcd69
to
888aca8
Compare
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.
responded to some of the followups
8ec7b26
to
c76b53d
Compare
c76b53d
to
813357b
Compare
6d183d6
to
37acfa1
Compare
722ec4a
to
fd62c6c
Compare
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.
just took a look -- this looks awesome!
serverless/packages/functions/src/trainspace/create_trainspace.ts
Outdated
Show resolved
Hide resolved
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.
AWESOME PR @andrewpeng02 . I left a few nits in the PR, but looks really good.
Quick question: Will there be any documentation to understand the development process for say adding a new training type now that we have a celery based structure?
It shouldn't be difficult to support new training types, you should be able to figure it out by referencing the existing tabular and image training jobs |
Quality Gate passedIssues Measures |
Migrate training into celery and upload results to s3
Github Issue Number Here: #1136
What user problem are we solving?
What solution does this PR provide?
Training jobs are executed by a celery worker, which polls from the queue set up in aws sqs. Currently you have to run the celery worker locally, but eventually the workers will run in the g4dn.xlarge ec2 instances. In this pr, I added celery endpoints which the backend will call. Then, the frontend will request the training results data from
GET /api/training/results/{trainspaceId}
, and it'll display the data.I also moved some files into /celery to make it more clear that the celery worker will operate in there (but it'll also access files in the django app)
Testing Methodology
dlp-cli frontend start
AWS_PROFILE=dlp docker compose up --build
AWS_PROFILE=sst
newmovie.mov
Any other considerations