| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Weights & Biases homepage
name: Get WandB Runs
on: [issue_comment]
jobs:
get-runs:
if: (github.event.issue.pull_request != null) && contains(github.event.comment.body, '/get-runs')
runs-on: ubuntu-latest
steps:
- name: Get the latest SHA for the PR that was commented on
id: chatops
uses: machine-learning-apps/actions-chatops@master
with:
TRIGGER_PHRASE: "/get-runs"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Runs Using SHA
uses: machine-learning-apps/wandb-action@master
with:
PROJECT_NAME: ${{ format('{0}/{1}', secrets.WANDB_ENTITY, secrets.WANDB_PROJECT) }}
FILTER_GITHUB_SHA: ${{ steps.chatops.outputs.SHA }}
BASELINE_TAGS: "['baseline', 'reference']"
DISPLAY_METRICS: "['accuracy', 'loss', 'best_val_acc', 'best_val_loss', '_runtime']"
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }}
DEBUG: 'true'You can reference the outputs of an action using expression syntax.
This action fetches all model runs that either:
Correspond to a git commit SHA, for example the commit SHA that triggered the Action. See the documenation for the buit-in environment variable GITHUB_SHA. Typical use cases for querying model runs with a git commit SHA:
There are many experiments generated from the same code, such has hyper-parameter tuning.
You want to automatically fetch experiment results that correspond to the commit SHA that triggered the GitHub Action. This can help ensure that your experiment results are not stale relative to your code.
Querying by git commit SHA assumes you have logged a config variable named github_sha to your config variables. Example:
import wandb, os
# You set the environment variable before running this script programatically with the SHA
github_sha = os.getenv('GITHUB_SHA')
wandb.config.github_sha = github_shaIn addition to querying by commit SHA, you can apply an additional filter for a secondary SHA. You might use this filter in addition to the commit SHA when you other external variables to the code such as data version that you want to track. For example, you can version your data with Pachyderm, which gives you a SHA corresponding to you data version. Similar to the github SHA, supplying an argument for secondary SHA assumes you have logged a config variable named secondary_sha to your experiment in W&B.
Match a run id: The run id corresponds to the unique identifier found in the URL when viewing the run on W&B: https://app.wandb.ai/{entity_name}/{project_name}/runs/{run_id}.
It is often useful to compare model runs against baseline runs or your current best models in order to properly assess model performance. Therefore, in addition to the runs described above, you can also query runs by tag, which is a label you can assign either programatically or in the W&B user interface. You can supply a list of tags as additional runs that will be queried. See the BASELINE_TAGS input in the Inputs section below). Two properties of baseline runs that are important:
This Action saves a csv file called wandb_report.csv into the path specified by the default environment variable GITHUB_WORKSPACE set for you in GitHub Actions, which allows this data to be accessed by subsequent Actions. Information in this CSV can be displayed in a variety of ways, such as a markdown formatted comment in a pull request or via the GitHub Checks API.
This csv file always has the following fields:
In addition to the above fields the user can specify the following additional fields from model runs. See the Inputs section for more information on how to supply these inputs.
summary_metrics: you can specify a list of summary metrics, for example: "['acc', 'loss', 'val_acc', 'val_loss']"
config variables: specify a list of configuraiton variables, for example: "['learning_rate', 'num_layers']". These fields will be prepended with an underscore in the output csv file.
Below is an example of the contents of the csv file:
| run.url | run.name | run.tags | run.id | run.entity | run.project | github_sha | acc | loss | val_acc | val_loss | _docker_digest | __eval.category |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| https://app.wandb.ai/github/predict-issue-labels/runs/e6lo523p | dashing-leaf-4 | [] | e6lo523p | github | predict-issue-labels | 86edd034aaba1498dbae6465cf994de90be6a4b2 | 0.896… | 0.540… | 1.000 | 1.054… | candidate | |
| https://app.wandb.ai/github/predict-issue-labels/runs/15u8cbod | happy-frog-3 | ['baseline', 'test'] | 15u8cbod | github | predict-issue-labels | 86edd034aaba1498dbae6465cf994de90be6a4b2 | 0.881… | 0.605… | 0.500 | 1.080… | candidate | |
| https://app.wandb.ai/github/predict-issue-labels/runs/cqigzoxc | dandy-river-1 | ['baseline'] | cqigzoxc | github | predict-issue-labels | 86edd034aaba1498dbae6465cf994de90be6a4b2 | 0.925… | 0.441… | 0.375 | 1.095… | baseline |
MLOps, Machine Learning, Data Science
| Back | FazBrowse Home | New Git URL |