Skip to content

Conversation

carmocca
Copy link
Contributor

@carmocca carmocca commented Dec 1, 2021

What does this PR do?

Fixes #9968

TODO:

  • Docs?
  • Test failures?

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

None

Before submitting

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

PR review

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

@carmocca carmocca added feature Is an improvement or enhancement breaking change Includes a breaking change loops Related to the Loop API labels Dec 1, 2021
@carmocca carmocca self-assigned this Dec 1, 2021
return acc


def test_no_depre_without_epoch_end(tmpdir):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was a check for a warning in #3849 but it doesn't exist anymore

@carmocca carmocca force-pushed the loops/respect-output-type branch from 3d39228 to 1254a35 Compare March 2, 2022 15:31
@carmocca carmocca changed the title [WIP] Keep the training_step* output type Keep the training_step* output type Mar 2, 2022
@@ -13,7 +13,7 @@
# limitations under the License.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Blocked by:

def test_kk():
    import numpy
    batch_output = [torch.tensor([0.1])]
    # FutureWarning: The input object of type 'Tensor' is an array-like implementing one of the corresponding protocols
    # (`__array__`, `__array_interface__` or `__array_struct__`); but not a sequence (or 0-D). In the future, this
    # object will be coerced as if it was first converted using `np.array(obj)`. To retain the old behaviour, you have
    # to either modify the type 'Tensor', or assign to an empty array created with
    # `np.empty(correct_shape, dtype=object)`.
    numpy.array(batch_output, dtype=object)

@carmocca carmocca added deprecation Includes a deprecation and removed breaking change Includes a breaking change labels Mar 3, 2022
@carmocca carmocca added this to the 1.7 milestone Mar 23, 2022
@carmocca carmocca removed this from the pl:1.7 milestone Jul 19, 2022
@carmocca carmocca closed this Feb 1, 2023
@carmocca carmocca deleted the loops/respect-output-type branch February 1, 2023 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Includes a deprecation feature Is an improvement or enhancement loops Related to the Loop API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return a tensor in training_step leads to a list of dictionaries in training_epoch_end
1 participant