Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Watermark fails to recognize all project used libraries #74

Closed
gloriamacia opened this issue Jan 11, 2021 · 3 comments
Closed

Watermark fails to recognize all project used libraries #74

gloriamacia opened this issue Jan 11, 2021 · 3 comments

Comments

@gloriamacia
Copy link

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.

@rasbt
Copy link
Owner

rasbt commented Jan 12, 2021

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

@d-kleine
Copy link
Contributor

the issue with the packages (fastai) has been fixed with #94 , the other issue (voila) is the extensions, that seem to be not (yet) covered by watermark

@rasbt
Copy link
Owner

rasbt commented Sep 22, 2024

Thanks for the note. It looks like the voila call is a terminal shell call outside Python, so that would be out of scope for watermark. But Python packages should be all supported now :)

@rasbt rasbt closed this as completed Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants