vanderschaarlab / synthcity

A library for generating and evaluating synthetic tabular data for privacy, fairness and data augmentation.
https://www.vanderschaar-lab.com/
Apache License 2.0
451 stars 61 forks source link

Upgrade PyTorch requirements from ">=1.10.0,<2.0" to "2.0.1" #234

Closed kacpersh closed 1 month ago

kacpersh commented 1 year ago

https://github.com/vanderschaarlab/synthcity/blob/7c1d9b5d3397334ce8d79ffd48ac31449d72b730/setup.cfg#L36

Hello synthcity Team,

Are there any plans to update the library file from ">=1.10.0,<2.0" to "2.0.1"?

At the moment pip install synthcity installs the package successfully, but raises the following error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. torchaudio 2.0.2+cu118 requires torch==2.0.1, but you have torch 1.13.1 which is incompatible. torchdata 0.6.1 requires torch==2.0.1, but you have torch 1.13.1 which is incompatible.

I need to reinstall torch with the newest version afterwards to avoid import issues from the synthcity package. It also prevents from using tools like pipenv due to conflicts in sub-dependencies.

Also, pip installation of the synthcity package requires PyTorch to be installed beforehand. Is it intended?

Best, Kacper

robsdavis commented 1 year ago

Hi Kacper,

Yes, this work is planned for development soon and an issue already exists for this work, #171. Unfortunately, because of various dependencies it is quite a big job, requiring careful consideration. Nevertheless, I hope to get back to you with this improvement soon.

Until then there is a solution to your issue that doesn't involve breaking Synthcity's requirements. torchaudio comes pre-installed on some environments, for example the most recent google Colab environment, however Synthcity does not require torchaudio at all. So, you can simply pip uninstall torchaudio and the conflict should disappear. If you do in fact need torchaudio for your work, you will need to install an earlier version that is compatible with torch 1.13.1.

And on the issue of the PyTorch installation prior to installing synthcity, yes that is necessary in order for everything to resolve correctly. If you have cloned the repo, you can do it simply with pip install -r prereq.txt.

HLasse commented 10 months ago

Any updates on this,@robsdavis? Is is being worked on or is it off the table for now? Upgrading the supported pytorch versions would be of immense help for us! :)

paulduf commented 8 months ago

I'm also asking for this upgrade, please.