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

Add an ilab API on top of the Crucible service layer #123

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

Conversation

dbutenhof
Copy link
Collaborator

Type of change

  • Refactor
  • New feature
  • Bug fix
  • Optimization
  • Documentation Update

Description

Provide the api/v1/ilab API endpoint to allow a client to query collected data on a Crucible CDM OpenSearch instance through the crucible_svc service layer. It is backed by the Crucible layer in #122, so only the final commit represents changes in this PR.

Related Tickets & Documents

Various Jira stories under Epic PANDA-496.

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Testing

Manual testing using the RHEL AI InstructLab RDU3 Crucible data source, via curl against a local CPT backend server instance. E.g.,

curl http://localhost:8000/api/v1/ilab/runs/b174e475-0c42-45e8-afe9-f0ebf183c593/params|jq
{
  "8E738B70-8662-11EF-B5E4-A745F88344D5": {
    "workflow": "train"
  },
  "common": {
    "workflow": "train"
  }
}

dbutenhof pushed a commit to dbutenhof/cpt-dashboard that referenced this pull request Oct 17, 2024
This relies on the ilab API in cloud-bulldozer#123, which in turn builds on the crucible
service in cloud-bulldozer#122.
dbutenhof pushed a commit to dbutenhof/cpt-dashboard that referenced this pull request Oct 17, 2024
This relies on the ilab API in cloud-bulldozer#123, which in turn builds on the crucible
service in cloud-bulldozer#122.
This encapsulates substantial logic to encapsulate interpretation of the
Crucible Common Data Model OpenSearch schema for the use of CPT dashboard API
components. By itself, it does nothing.
dbutenhof pushed a commit to dbutenhof/cpt-dashboard that referenced this pull request Oct 18, 2024
This relies on the ilab API in cloud-bulldozer#123, which in turn builds on the crucible
service in cloud-bulldozer#122.
dbutenhof added a commit to dbutenhof/cpt-dashboard that referenced this pull request Oct 24, 2024
This adds the basic UI to support comparison of the metrics of two InstructLab
runs. This compares only the primary metrics of the two runs, in a relative
timeline graph.

This is backed by cloud-bulldozer#125, which is backed by cloud-bulldozer#124, which is backed by cloud-bulldozer#123,
which is backed by cloud-bulldozer#122. These represent a series of steps towards a complete
InstructLab UI and API, and will be reviewed and merged from cloud-bulldozer#122 forward.
dbutenhof pushed a commit to dbutenhof/cpt-dashboard that referenced this pull request Oct 24, 2024
This adds the basic UI to support comparison of the metrics of two InstructLab
runs. This compares only the primary metrics of the two runs, in a relative
timeline graph.

This is backed by cloud-bulldozer#125, which is backed by cloud-bulldozer#124, which is backed by cloud-bulldozer#123,
which is backed by cloud-bulldozer#122. These represent a series of steps towards a complete
InstructLab UI and API, and will be reviewed and merged from cloud-bulldozer#122 forward.
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

This uses `black`, `isort` and `flake8` to check code quality, although
failure is ignored until we've cleaned it up (which has begin in
PR cloud-bulldozer#139 against the `revamp` branch).

Minimal unit testing is introduced, generating a code coverage report.
The text summary is added to the Action summary page, and the more
detailed HTML report is stored as an artifact for download.

NOTE: The GitHub Action environment is unhappy with `uvicorn` 0.15;
upgrading to the latest 0.32.x seems to work and hasn't obviously
broken anything else.
This is a draft to archive what I've done before I evaporate for the rest of
2024, because, you know, I could get run over by a reindeer or something...

This brings crucible service test coverage to 50%.
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the Stale label Dec 18, 2024
@dbutenhof dbutenhof removed the Stale label Dec 19, 2024
`crucible_svc.py` test coverage is now at 96%. While the remaining 4% is worth
some effort later, subsequent ILAB PRs will change some of this code anyway
and will require test adjustments so it's good enough for now.
Coverage is up to 97%, and I think I'm stopping there ...
This builds on the `crucible_svc` layer in cloud-bulldozer#122 to add a backend API.
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.

1 participant