pytorch-lightning icon indicating copy to clipboard operation
pytorch-lightning copied to clipboard

Feature GRID-9731: Update Lightning Cloud.py Backend to Accept Drive Specs (2/2)

Open rlizzo opened this issue 2 years ago • 0 comments

What does this PR do?

Implements the cloud dispatcher for works containing drives. In order to construct the Drive API spec object we keep a record of the drives attached to a Work through the Work.drives property. This will make it reasonable for the cloud dispatcher to iterate over the attached drives without the overhead of traversing every attribute of the object and worrying about potentially aliased drive classes (a particular issue I discovered during testing where isinstance(deepcopy(MagicMock(spec=Drive)), Drive) returns False

This PR is paired with #14002

Does your PR introduce any breaking changes? If yes, please list them.

No

Before submitting

  • [x] Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • [x] Did you read the contributor guideline, Pull Request section?
  • [x] Did you make sure your PR does only one thing, instead of bundling different changes together?
  • [x] Did you make sure to update the documentation with your changes? (if necessary)
  • [x] Did you write any new necessary tests? (not for typos and docs)
  • [x] Did you verify new and existing tests pass locally with your changes?
  • [x] Did you list all the breaking changes introduced by this pull request?
  • [ ] Did you update the CHANGELOG? (not for typos, docs, test updates, or minor internal changes/refactors)

PR review

Anyone in the community is welcome to review the PR. Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • [x] Is this pull request ready for review? (if not, please submit in draft mode)
  • [x] Check that all items from Before submitting are resolved
  • [x] Make sure the title is self-explanatory and the description concisely explains the PR
  • [x] Add labels and milestones (and optionally projects) to the PR so it can be classified

rlizzo avatar Aug 09 '22 06:08 rlizzo