The BinaryIO, str, and PathLike in the type dispatch are from torchaudio.load. It's missing (str,object) and (Path,object). This incorrect dispatch prevents from TensorAudio.create dispatching in a fastai datablock.
Previous versions of fastcore did not have this interplay between delegates and TypeDispatch, but I am not sure when it cropped up.
Adding a
delegates
decorator to a method preventsTypeDispatch
from creating the correct dispatching table.Without
delegates
, the dispatch forTensorAudio.create
is correct:TypeDispatch(TensorAudio.create)
returnsBut with delegates,
TypeDispatch
doesn't create the correct dispatch table:Instead
TypeDispatch(TensorAudio.create)
returns:The
BinaryIO
,str
, andPathLike
in the type dispatch are fromtorchaudio.load
. It's missing(str,object)
and(Path,object)
. This incorrect dispatch prevents fromTensorAudio.create
dispatching in a fastai datablock.Previous versions of fastcore did not have this interplay between
delegates
andTypeDispatch
, but I am not sure when it cropped up.