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

Pick a database to store training results #16

Merged
merged 24 commits into from
Apr 12, 2024
Merged

Pick a database to store training results #16

merged 24 commits into from
Apr 12, 2024

Conversation

lotif
Copy link
Collaborator

@lotif lotif commented Apr 9, 2024

PR Type

Feature

Short Description

Clickup Ticket(s): https://app.clickup.com/t/8687c8g5x

In short, here I'm seeting up MongoDB as the database of choice and also creating a new database entity and API route just to startup and test the database.

In details, I am:

  • Adding instructions on how to set up MongoDB
  • Adding pymongo and pydantic to our dependencies
  • Adding MongoDB setup code to startup and shutdown of server's FastAPI
  • Adding MongoDB github action to the integration test setup
  • Adding boilerplate code to setup MongoDB in integration tests
  • Adding a basic Job entity to store information about training jobs. NOTE: this is not final and will change a lot over time as we add more and more functionality.
  • Adding an endpoint to create new training jobs
  • Adding an integration test to that endpoint

If you want to test this yourself:

  1. Setup MongoDB on your local machine as directed in the README
  2. Start the server with yarn dev
  3. On postman, set up a post request to localhost:8000/api/server/job and add the following to the request body as a raw json:
{
  "model": "MNIST",
  "redis_host": "locahost",
  "redis_port": "6879"
}

You should receive a response with the new record created in the database.

Tests Added

florist/tests/integration/api/routes/server/test_job.py

@lotif lotif requested review from jewelltaylor and emersodb April 9, 2024 17:41
Base automatically changed from strat-training to main April 10, 2024 12:31
lotif added 2 commits April 10, 2024 11:02
# Conflicts:
#	florist/api/clients/mnist.py
#	florist/api/server.py
#	florist/tests/integration/api/utils.py
#	poetry.lock
#	pyproject.toml
florist/api/server.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@jewelltaylor jewelltaylor left a comment

Choose a reason for hiding this comment

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

I have added a few small suggestions but all in all looks great!

@lotif
Copy link
Collaborator Author

lotif commented Apr 12, 2024

@jewelltaylor I've addressed your comments, please check again when you have a minute.

Copy link
Collaborator

@jewelltaylor jewelltaylor left a comment

Choose a reason for hiding this comment

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

LGTM!

@jewelltaylor jewelltaylor merged commit 6281fd7 into main Apr 12, 2024
4 checks passed
@jewelltaylor jewelltaylor deleted the setup-db branch April 12, 2024 19:18
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