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 settings for model averaging in the frontend #620

Merged
merged 6 commits into from
Jan 22, 2024

Conversation

Dref360
Copy link
Contributor

@Dref360 Dref360 commented Dec 27, 2023

Resolve #Nothing

Description:

This PR allows the user to see the performance after bayesian model averaging. This generally improves the performance by ~1-2% and the ECE by a couple percentage as well.

In my company, we use BMA in production to get good ECE, this is why I need this toggle.

Lot of code, but mostly poutine here are the relevant bits:

  • Added model_averaging_available to Dataset Info
  • Added new startup tasks when model averaging is enabled.
  • Added new query state in the FE and new toggle
    • I acknowledge that this takes a lot of space, I'm open to an alternative.

image

Checklist:

You should check all boxes before the PR is ready. If a box does not apply, check it to acknowledge it.

  • ISSUE NUMBER. You linked the issue number (Ex: Resolve #XXX).
  • PRE-COMMIT. You ran pre-commit on all commits, or else, you
    ran pre-commit run --all-files at the end.
  • USER CHANGES. The changes are added to CHANGELOG.md and the documentation, if they impact
    our users.
  • DEV CHANGES.
    • Update the documentation if this PR changes how to develop/launch on the app.
    • Update the README files and our wiki for any big design decisions, if relevant.
    • Add unit tests, docstrings, typing and comments for complex sections.

Copy link
Contributor

@gabegma gabegma left a comment

Choose a reason for hiding this comment

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

That's awesome - thanks Fred for the PR and sorry for the delay in reviewing! @JosephMarinier could you take a look at the front end files when you have a chance?

azimuth/modules/model_performance/confidence_binning.py Outdated Show resolved Hide resolved
Copy link
Contributor

@JosephMarinier JosephMarinier left a comment

Choose a reason for hiding this comment

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

Cool! That looks good to me!

@Dref360
Copy link
Contributor Author

Dref360 commented Jan 18, 2024

Cool! Can you trigger the CI and then y'all can merge whenever?

@JosephMarinier
Copy link
Contributor

Oh yeah... 🤔 I don't know what is going on with the CI. I'll try to investigate.

@JosephMarinier
Copy link
Contributor

This super elaborate suggestion from Stack Overflow (close + reopen) didn't work. Does anyone have an idea what is going on?

@istandre
Copy link
Contributor

istandre commented Jan 20, 2024

@JosephMarinier and @gabegma, My guess would be that in your project settings you have enabled branch protection rules. For a collaborator to be able to push in main, both the backend and frontend CI need to succeed.

Also, my understanding is that workflows on PR from outside contributors might not run automatically, and might be approved first. After being approved, the workflows will get triggered.

However, both jobs only run on push. See pythonci.yml#L4 and webapp_ci.yml#L4. Since this PR comes from a fork, no push events have triggered the workflows and upon approval, workflows did not start since they only do for push events.

Assuming that this is reason of the issue, I think that adding the pull_request event to the workflow files might fix this issue. You might also want to add the pull_request_target event to trigger workflows (which will run in the context of the main branch) regardless of approval status.

For the latter, you can have a look at Controlling changes from forks to workflows in public repositories.

@istandre
Copy link
Contributor

I have created a bug report #621 and a PR #622 to address the CI checks issue.

@JosephMarinier JosephMarinier enabled auto-merge (squash) January 22, 2024 14:55
auto-merge was automatically disabled January 22, 2024 16:26

Head branch was pushed to by a user without write access

@JosephMarinier JosephMarinier enabled auto-merge (squash) January 22, 2024 16:50
@JosephMarinier JosephMarinier merged commit 3102ddc into ServiceNow:main Jan 22, 2024
2 checks passed
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.

4 participants