Description
Several PyTorch beginner tutorials that use torchvision.datasets.FashionMNIST now fail after the torchvision import chain has been fixed, because Candle does not expose torch.frombuffer.
Repro
import candle as torch
import torchvision.datasets.mnist as mnist
# Simplest API-level repro
buf = bytearray(range(16))
t = torch.frombuffer(buf, dtype=torch.uint8, offset=4)
Current result:
AttributeError: module 'candle' has no attribute 'frombuffer'
Real-world failure site
torchvision.datasets.mnist.read_sn3_pascalvincent_tensor() uses:
parsed = torch.frombuffer(bytearray(data), dtype=torch_type, offset=(4 * (nd + 1)))
This currently blocks these tutorials under Candle's torch compat mode:
quickstart_tutorial.py
data_tutorial.py
transforms_tutorial.py
optimization_tutorial.py
Root cause
Candle uses np.frombuffer(...) internally in several places, but does not expose a public torch.frombuffer-compatible API at the top level. Once torchvision import succeeds, MNIST dataset loading reaches this missing API and fails immediately.
Notes
This appears to be a general PyTorch compatibility gap, not a tutorial-specific issue.
Description
Several PyTorch beginner tutorials that use
torchvision.datasets.FashionMNISTnow fail after the torchvision import chain has been fixed, because Candle does not exposetorch.frombuffer.Repro
Current result:
Real-world failure site
torchvision.datasets.mnist.read_sn3_pascalvincent_tensor()uses:This currently blocks these tutorials under Candle's torch compat mode:
quickstart_tutorial.pydata_tutorial.pytransforms_tutorial.pyoptimization_tutorial.pyRoot cause
Candle uses
np.frombuffer(...)internally in several places, but does not expose a publictorch.frombuffer-compatible API at the top level. Once torchvision import succeeds, MNIST dataset loading reaches this missing API and fails immediately.Notes
This appears to be a general PyTorch compatibility gap, not a tutorial-specific issue.