From 39b3c96181ab9f33a44b4fe591b348b5b48ecf76 Mon Sep 17 00:00:00 2001 From: Dirk Groeneveld Date: Wed, 25 May 2022 17:43:15 -0700 Subject: [PATCH] Dependabot GitHub Actions (#5640) * chore: Included githubactions in the dependabot config This should help with keeping the GitHub actions updated on new releases. This will also help with keeping it secure. Dependabot helps in keeping the supply chain secure https://docs.github.com/en/code-security/dependabot GitHub actions up to date https://docs.github.com/en/code-security/dependabot/working-with-dependabot/keeping-your-actions-up-to-date-with-dependabot https://github.com/ossf/scorecard/blob/main/docs/checks.md#dependency-update-tool Signed-off-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> * floats need approximate math Co-authored-by: naveensrinivasan <172697+naveensrinivasan@users.noreply.github.com> --- .github/dependabot.yml | 5 +++++ tests/training/learning_rate_schedulers/cosine_test.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a7c46a2349b..145d52de746 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -11,3 +11,8 @@ updates: versions: - ">= 0.0.a" - "< 0.1" +- package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/tests/training/learning_rate_schedulers/cosine_test.py b/tests/training/learning_rate_schedulers/cosine_test.py index 3cff5f62b99..1013fa4a91d 100644 --- a/tests/training/learning_rate_schedulers/cosine_test.py +++ b/tests/training/learning_rate_schedulers/cosine_test.py @@ -130,7 +130,7 @@ def test_schedules(self): lrs.append(optimizer.param_groups[0]["lr"]) for it, lr in lr_checks: - assert lrs[it] == lr, f"Iteration {it}: {lrs[it]} != {lr}" + assert lrs[it] == pytest.approx(lr), f"Iteration {it}: {lrs[it]} != {lr}" def test_schedules_with_save_and_resume(self): """Make sure scheduler will resume with the right state.""" @@ -171,4 +171,4 @@ def init_and_restore_scheduler( state = scheduler.state_dict() for it, lr in lr_checks: - assert lrs[it] == lr, f"Iteration {it}: {lrs[it]} != {lr}" + assert lrs[it] == pytest.approx(lr), f"Iteration {it}: {lrs[it]} != {lr}"