watermark
watermark copied to clipboard
Watermark fails to recognize all project used libraries
I find Colab pre-installed libraries convenient as well as AWS Sagemaker pre-defined kernels but this convenience becomes very annoying when gathering the requirements.txt file as I end up with many libraries I have not actually used in my project. I know I could create a virtual at the very beginning but I am wondering if there is a way to avoid it.
I have recently discovered watermark which partially solves this issue. Nevertheless, for this solution to be a perfect fit it still has two issues that I will exemplify below and that you can easily reproduce in Colab.
!pip install fastai --upgrade
!pip install voila
!jupyter serverextension enable voila --sys-prefix
!pip install watermark
from fastai.vision.all import *
from fastai.vision.widgets import *
%load_ext watermark
%watermark --iversion
Neither fastai nor voila appear in the output as I am not running import fastai and loading voila as an extension.
%watermark -p fastai
This would return the correct output for e.g. fastai but I would like to be able to generate automatically without having to manually check for the missing packages.
Thanks for the feedback!
I agree that this is currently an issue. I looked into this a few months ago but couldn't find an obvious way to make it work, yet. Would be great if someone has some ideas for how to address this