nextml-code / template-nvae

Simple NVAE implementation intended for effective reuse and learning purposes
19 stars 1 forks source link

Support of python 3.6 ? #1

Closed vfdev-5 closed 4 years ago

vfdev-5 commented 4 years ago

Hi,

I'm trying to run this code on colab with python 3.6.

EDIT : Wrong dependency. Correct one is installed with pip install pytorch-datastream

But seems like your library works starting python 3.7

Preparation script fails with datastream library (which looks unmaintained). Installed withpip install datastream. I'm installing manually the deps as on colab there are already fresh torch and torchvision installed instead of installed previous versions with requirements.txt

How to reproduce:

!git clone https://github.com/Aiwizo/template-nvae
!cd template-nvae && pip install pandas tqdm pytorch-ignite pydantic datastream
!cd template-nvae && python prepare.py
>   File "/usr/local/lib/python3.6/dist-packages/datastream/api.py", line 179
    except KeyError, exception:

Even patching this syntax error, there are others inside the same file. Haven't try to run the code inside python 3.8 but I assume to have similar issues.

samedii commented 4 years ago

Sorry we wanted to find out how much interest there was for this kind of thing and the release was a little rushed. I've updated the requirements and a bunch of other things now.

I recognized you from the pytorch/ignite repos. Thanks for all your hard work! :)

We had to drop 3.6 some time ago, I think it was because of annotation support (pydantic) but I'm not sure.

I want to note that this repo is mostly a big refactor of https://github.com/GlassyWing/nvae with a couple of notable changes:

The performance is not on the same level as https://github.com/GlassyWing/nvae yet and the KL weights are a little messed up from running experiments. I'll try to reset them to better values today but finding the optimal weights is very likely a large part of making the model work. The original paper talks about having stability issues so we might expect it to be difficult to get good performance.

vfdev-5 commented 4 years ago

@samedii thanks for the details !

We had to drop 3.6 some time ago, I think it was because of annotation support (pydantic) but I'm not sure.

I see. I'm also using a higher version of python, but unfortunately Colab is still on python 3.6 and it is a bit restricting to try out newer things like your repository without installing manually reinstalling python 3.7.

The performance is not on the same level as https://github.com/GlassyWing/nvae yet and the KL weights are a little messed up from running experiments.

Once you are done with stabilizing the code, it would be nice to some results in your README :)

I recognized you from the pytorch/ignite repos. Thanks for all your hard work! :)

Thanks ! For the context, I'm trying to find some nice implementations with Ignite and to check/retrain them to add to ignite's showcase list and to our public online experiment tracking system: https://app.ignite.trains.allegro.ai/dashboard for more visibility etc. If you guys are interested in mutually promoting some of your work like this repository or another template or even ml-workflow, we can discuss about that (in case you can reach out me vfdev.5 at gmail). I also had some questions about pytorch-datastream as it may respond to some of our needs. Such that we haven't to recode it... Maybe, I can ask my questions on its own repo.

samedii commented 4 years ago

... unfortunately Colab is still on python 3.6 ...

Fair point. I'll talk to the others and see if can revisit the issue.

Once you are done with stabilizing the code, it would be nice to some results in your README :)

Yes that's a good idea :)

If you guys are interested in mutually promoting some of your work like this repository or another template or even ml-workflow, we can discuss about that (in case you can reach out me vfdev.5 at gmail). I also had some questions about pytorch-datastream as it may respond to some of our needs. Such that we haven't to recode it... Maybe, I can ask my questions on its own repo.

Great I will let the others know as well :) Sure, you can post on that repo or send an email if you prefer!