# The purpose of the example below is to demonstrate the use of registry for external objects for training.
# - We train mobilenet_v2 on a user dataset which is not defined in ALL_DATASETS using the dataloader registry.
# - We leverage predefined configs from cifar_10 training recipe in our repo.
#
# In order for the registry to work, we must trigger the registry of the user's objects by importing their module at
# the top of the training script. Hence, we created a similar script to our classic train_from_recipe but with the imports
# on top. Once imported, all the registry decorated objects will be resolved (i.e user_mnist_train will be resolved
# to the dataloader of our user's)
#
# Differently from user_recipe_mnist_example, here we demonstrate how to use train_from_recipe, without the need to implement a DataLoader class for registry.
# Instead- we work straight with the user defined datasets, which is the simpler option when one does not need their own DataLoader implementation.
# We do so by Dropping the train_datalaoder, valid_dataloader fields from the recipe's config, while specifying the dataset arg in