Carlos Mocholí

Results 427 comments of Carlos Mocholí

Yes, let's go with the 3rd option. This is my suggested implementation: ```python class _DeprecatedException(type): def __instancecheck__(cls: Type, instance: object) -> bool: # https://peps.python.org/pep-3119/ return any(cls.__subclasscheck__(c, stacklevel=7) for c in...

Note that not all of them should be `ValueError`. `TypeError`, `RuntimeError`, or a different exception might fit better depending on the case. I just wrote `_ValueError` in my previous message...

Also, only when we instantiate the exception you should use the `_*Error` class. For `isinstance`, `issubclass`, or `except *` checks you should use the Python builtin class

> Deprecating the MisconfigurationError is definitely not the first step. First we need to replace the usages. Only at the end, when only the definition of MisconfigurationError is left can...

Looks great so far @calebbuffa. Left minor comments

Can you try launching this script instead? It's simpler and the one we use for bug reports https://github.com/Lightning-AI/lightning/blob/master/examples/pl_bug_report/bug_report_model.py Also, `os.environ['CUDA_LAUNCH_BLOCKING'] = '1'` is for debugging and will make your run...

Examples: https://github.com/Lightning-AI/lightning-flash/blob/674232381ad9e984a256037749fa714fcfd1b627/flash/core/utilities/imports.py#L31-L75 https://github.com/Lightning-AI/lightning-flash/blob/674232381ad9e984a256037749fa714fcfd1b627/flash/core/utilities/apply_func.py#L34-L41 There should be `DeprecationWarning`s for utilities imported from PL that should start using `lightning_utilities`

The two I pointed out in my previous message are the only ones I could find. These are the ones we currently have in the utilities: https://github.com/Lightning-AI/utilities/tree/main/src/lightning_utilities/core Should be a...

For examples of the PR in lightning: https://github.com/Lightning-AI/lightning/pull/14475, and https://github.com/Lightning-AI/lightning/pull/14537

Nothing missed. That's perfect :)