Skip to content

Added validation of mode parameter in AveragedModel#65921

Closed
prabhat00155 wants to merge 5 commits intopytorch:masterfrom
prabhat00155:prabhat00155/update_averaged_model
Closed

Added validation of mode parameter in AveragedModel#65921
prabhat00155 wants to merge 5 commits intopytorch:masterfrom
prabhat00155:prabhat00155/update_averaged_model

Conversation

@prabhat00155
Copy link
Contributor

@prabhat00155 prabhat00155 commented Sep 30, 2021

Discussion: #65495 (comment)

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Sep 30, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 2f43bee (more details on the Dr. CI page):


  • 2/6 failures introduced in this PR
  • 4/6 broken upstream at merge base c1447f0 on Oct 01 from 3:19am to 6:29am

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See GitHub Actions build linux-xenial-py3.6-gcc7-bazel-test / build-and-test (1/1)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

2021-10-01T14:00:32.8023969Z �[36;1m echo "ERR...t available for the merge-base of your branch"�[0m
2021-10-01T14:00:32.8018393Z �[36;1mfi�[0m
2021-10-01T14:00:32.8018818Z �[36;1m# Covers the case where a previous tag doesn't exist for the tree�[0m
2021-10-01T14:00:32.8019503Z �[36;1m# this is only really applicable on trees that don't have `.circleci/docker` at its merge base, i.e. nightly�[0m
2021-10-01T14:00:32.8020145Z �[36;1mif ! git rev-parse "$MERGE_BASE:.circleci/docker"; then�[0m
2021-10-01T14:00:32.8020840Z �[36;1m  echo "Directory '.circleci/docker' not found in commit $MERGE_BASE, you should probably rebase onto a more recent commit"�[0m
2021-10-01T14:00:32.8021400Z �[36;1m  exit 1�[0m
2021-10-01T14:00:32.8021654Z �[36;1mfi�[0m
2021-10-01T14:00:32.8022087Z �[36;1mPREVIOUS_DOCKER_TAG=$(git rev-parse "$MERGE_BASE:.circleci/docker")�[0m
2021-10-01T14:00:32.8022729Z �[36;1m# If no image exists but the hash is the same as the previous hash then we should error out here�[0m
2021-10-01T14:00:32.8023316Z �[36;1mif [[ "${PREVIOUS_DOCKER_TAG}" = "${DOCKER_TAG}" ]]; then�[0m
2021-10-01T14:00:32.8023969Z �[36;1m  echo "ERROR: Something has gone wrong and the previous image isn't available for the merge-base of your branch"�[0m
2021-10-01T14:00:32.8024664Z �[36;1m  echo "       contact the PyTorch team to restore the original images"�[0m
2021-10-01T14:00:32.8025091Z �[36;1m  exit 1�[0m
2021-10-01T14:00:32.8025355Z �[36;1mfi�[0m
2021-10-01T14:00:32.8025692Z �[36;1mecho ::set-output name=rebuild::yes�[0m
2021-10-01T14:00:32.8035569Z shell: /usr/bin/bash -e {0}
2021-10-01T14:00:32.8035871Z env:
2021-10-01T14:00:32.8036417Z   BUILD_ENVIRONMENT: linux-xenial-py3.6-gcc7-bazel-test
2021-10-01T14:00:32.8037637Z   DOCKER_IMAGE_BASE: 308535385114.dkr.ecr.us-east-1.amazonaws.com/pytorch/pytorch-linux-bionic-cuda10.2-cudnn7-py3.9-gcc7
2021-10-01T14:00:32.8038845Z   SCCACHE_BUCKET: ossci-compiler-cache-circleci-v2
2021-10-01T14:00:32.8039742Z   XLA_CLANG_CACHE_S3_BUCKET_NAME: ossci-compiler-clang-cache-circleci-xla

1 failure not recognized by patterns:

Job Step Action
GitHub Actions Lint / mypy Run mypy 🔁 rerun

🚧 4 fixed upstream failures:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

If your commit is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@facebook-github-bot
Copy link
Contributor

@prabhat00155 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@prabhat00155 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

Some minor comments on documentation:

prabhat00155 and others added 3 commits September 30, 2021 19:45
Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
@facebook-github-bot
Copy link
Contributor

@prabhat00155 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Collaborator

@albanD albanD left a comment

Choose a reason for hiding this comment

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

LGTM Thanks for the update

@facebook-github-bot
Copy link
Contributor

@prabhat00155 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

prabhat00155 added a commit to prabhat00155/pytorch that referenced this pull request Oct 5, 2021
Summary:
Discussion: pytorch#65495 (comment)

Pull Request resolved: pytorch#65921

Reviewed By: albanD

Differential Revision: D31310105

Pulled By: prabhat00155

fbshipit-source-id: 417691832a7c793744830c11e0ce53e3972d21a3
(cherry picked from commit c7748fc)
@malfet malfet added this to the 1.10.0 milestone Oct 6, 2021
malfet pushed a commit that referenced this pull request Oct 6, 2021
…65495) (#65755)

* Added option to update parameters using state_dict in AveragedModel (#65495)

Summary:
While implementing [EMA](pytorch/vision#4381 extends AveragedModel) in torchvision, update_parameters() from AveragedModel could not be used as it did not handle state_dict(), so a custom update_parameters() needed to be defined in [EMA class](pytorch/vision#4406). This PR aims to handle this scenario removing the need for this custom update_parameters() implementation.

Discussion: pytorch/vision#4406 (review)

Pull Request resolved: #65495

Reviewed By: datumbox

Differential Revision: D31176742

Pulled By: prabhat00155

fbshipit-source-id: 326d14876018f21cf602bab5eaba344678dbabe2
(cherry picked from commit 2ea724b)

* Added validation of mode parameter in AveragedModel (#65921)

Summary:
Discussion: #65495 (comment)

Pull Request resolved: #65921

Reviewed By: albanD

Differential Revision: D31310105

Pulled By: prabhat00155

fbshipit-source-id: 417691832a7c793744830c11e0ce53e3972d21a3
(cherry picked from commit c7748fc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants