Why is there not a single piece of documentation detailing the difference between saving and exporting models?

You would think that the process of actually saving a model and using it would be vital and in the forefront of the documentation, but there is seriously nothing. Going mad from trying to read a range of blog posts and forum links to extract this information. It would take someone just 20 minutes to show a working example - say extending the beginner tutorial to saving, and exporting the model and showing the difference, and how you load the models using the two techniques for saving the model. Why on earth haven’t this been done? By scouring over the whole internet it seems like you would want to export, not save the model when you want to save the model (found this in a notebook on kaggle from one of the people behind fastAI, weird how that couldn’t be in the documentation) - would be nice to mention this in the (also lacking) SaveModelCallback documentation.

Hi,
Fast.ai in bigger part it’s based on the Pytorch. So look into Pytorch’s docs for answer. Even someone called ‘jph’ is making magic tunnel when you call a ‘??’ string in fast.ai’s workspace which name is Fastbook, code:

# AUTOGENERATED! DO NOT EDIT! File to edit: ../nbs/99_pytorch_doc.ipynb.

# %% ../nbs/99_pytorch_doc.ipynb 5
from __future__ import annotations
from types import ModuleType

# %% auto 0
__all__ = ['PYTORCH_URL', 'pytorch_doc_link']

# %% ../nbs/99_pytorch_doc.ipynb 6
PYTORCH_URL = 'https://pytorch.org/docs/stable/'

# %% ../nbs/99_pytorch_doc.ipynb 7
def _mod2page(
    mod:ModuleType, # A PyTorch module
) -> str:
    "Get the webpage name for a PyTorch module"
    if mod == Tensor: return 'tensors.html'
    name = mod.__name__
    name = name.replace('torch.', '').replace('utils.', '')
    if name.startswith('nn.modules'): return 'nn.html'
    return f'{name}.html'

# %% ../nbs/99_pytorch_doc.ipynb 9
import importlib

# %% ../nbs/99_pytorch_doc.ipynb 10
def pytorch_doc_link(
    name:str # Name of a PyTorch module, class or function
) -> (str, None):
    "Get the URL to the documentation of a PyTorch module, class or function"
    if name.startswith('F'): name = 'torch.nn.functional' + name[1:]
    if not name.startswith('torch.'): name = 'torch.' + name
    if name == 'torch.Tensor': return f'{PYTORCH_URL}tensors.html'
    try:
        mod = importlib.import_module(name)
        return f'{PYTORCH_URL}{_mod2page(mod)}'
    except: pass
    splits = name.split('.')
    mod_name,fname = '.'.join(splits[:-1]),splits[-1]
    if mod_name == 'torch.Tensor': return f'{PYTORCH_URL}tensors.html#{name}'
    try:
        mod = importlib.import_module(mod_name)
        page = _mod2page(mod)
        return f'{PYTORCH_URL}{page}#{name}'
    except: return None

try to run in the Fastbook’s cell: ‘doc()’ or ‘doc’

EDIT: due to be more “politically” correct :wink: