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

from autovideo import extract_frames is nor working #9

Open
amitvermanit opened this issue Mar 28, 2022 · 11 comments
Open

from autovideo import extract_frames is nor working #9

amitvermanit opened this issue Mar 28, 2022 · 11 comments

Comments

@amitvermanit
Copy link

when i ran

"from autovideo import extract_frames"

I get following error

"ImportError: cannot import name 'extract_frames' from 'autovideo' (/Volumes/Disk-Data/pose estimation/autovideo-main/autovideo/init.py)"

@daochenzha
Copy link
Member

@amitvermanit Hi, thanks for the feedback. This interface is deprecated. Currently it is wrapped as a pipeline primitive. See https://github.com/datamllab/autovideo/blob/main/autovideo/utils/d3m_utils.py#L125-L132

@amitvermanit
Copy link
Author

After installing all the libraries. I ran
python3 examples/fit.py

as suggested in the github link provided.

I got following error
cInvalidPrimitiveCodeError: Method 'fit_multi_produce' has an argument 'produce_methods' with type 'collections.abc.Sequence[str]' and not an expected type: typing.Sequence[str]

Can you tell the autovideo version which I should install. I am using macbook. As you mentioned in the github link the code is only tested in linux, will it work in mac or not. Is there any other updated code. Please reply.

@daochenzha
Copy link
Member

daochenzha commented Mar 30, 2022

@amitvermanit Hi, thanks for the feedback. It should be able to work in Mac (at least for Python 3.6). Could you provide more details for me to reproduce the errors, like what Python version you are using, and which command you used to install (i.e., whether you used pip3 install autovideo or clone it and run pip3 instal -e .. Thanks!

@amitvermanit
Copy link
Author

python version 3.9.
I have installed with pip3 install autovideo.
the error usually comes at the 'config' part.

@daochenzha
Copy link
Member

@amitvermanit I have just tried Mac with Python 3.8.2, torch==1.9.0, torchvision==0.10.0. It seems to work well in my side when setting the number of workers for the torch data loading to 0 here https://github.com/datamllab/autovideo/blob/main/autovideo/recognition/tsn_primitive.py#L64 (two workers will cause some issues in pickle and we are looking into this) Could you try downgrading your python to see whether it works?

We didn't fully tested on Mac since most users will use Linux GPU servers. But thanks for the feedback. We will take more efforts to better support Mac system.

@amitvermanit
Copy link
Author

I have tested with Python 3.8.2, torch==1.9.0, torchvision==0.10.0 as suggested. one of the issue I was able to understand is there is a folder named 'autovideo' which is conflicting with python package 'autovideo'.
For example: when I ran "python3 examples/fit.py". I got following error "No module named 'autovideo.transformation'" (it pops inside 'pipeline = build_pipeline(config)' part.)
It has to call the file 'transformation' inside autovideo folder but it is looking in the 'autovideo' python package library. Is there any suggestion how it can be resolved. In windows and linux, it might not be causing the issue.

@daochenzha
Copy link
Member

@amitvermanit Thanks for the feedback. This is bug. This is because we didn't put a __init__.py under the transformation folder. I have just fixed it and uploaded to PyPI. Please try again.

@amitvermanit
Copy link
Author

Thanks for the reply. As suggested I have installed the newer version of i.e. 1.2.2 with torch==1.9.0, torchvision==0.10.0.
Now I have getting this error
ModuleNotFoundError: No module named 'autovideo.augmentation.meta'
I have seen that similar to previous code it should go to the folder 'autovideo'. Is the cause of this error is similar to previous one?
Screenshot 2022-04-01 at 3 06 00 PM

@daochenzha
Copy link
Member

@amitvermanit Yes, this is a similar issue. I just fixed it. Please try again.

@shaleenanuj
Copy link

when i ran

"from autovideo import extract_frames"

I get following error

"ImportError: cannot import name 'extract_frames' from 'autovideo' (/Volumes/Disk-Data/pose estimation/autovideo-main/autovideo/init.py)"

I still get the error how to rectify it and make it run?

@ruchiiii
Copy link

I am also getting same error. How to run it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants