-
Notifications
You must be signed in to change notification settings - Fork 922
Description
Problem
Several of the notebooks in the Openvino notebooks repository have a dependency on external data
and utility
functions. For instance, some notebooks import data from the utils
and data
folders, which are not always present in remote environments like Google Colab
(Muhc more accesible then Binder, I feel).
sys.path.append("../utils")
import notebook_utils as utils
This makes it difficult for users to run the notebooks without manually copying the require directory into the notebook.
Solution
There are a few potential solutions to this problem:
Add the utility functions to the notebook: This would eliminate the dependency on external data and utilities, but might lead to code duplication. However, the contribution guide explicitly states that "a small amount of duplication is okay if it improves the user experience."
Store images and model files in a separate directory: Instead of relying on external data, we could store required files in a directory within the repository. In case the files are not available, the notebook could download them automatically.
Provide a fallback option: If the required external data is not available, the notebook could fall back to an alternative data source.
Additional Considerations
It's important to keep in mind that users may be running these notebooks in environments other than Google Colab, so any solutions should be applicable to a variety of environments.
As per the contribution guide, adding a small amount of duplication is acceptable if it improves the user experience.
All related files, with the exception of Open Model Zoo models, should be saved to the notebook subdirectory, even if that means that there is a small amount of duplication.