orasanen / ALICE

Automatic LInguistic Unit Count Estimator (ALICE)
44 stars 11 forks source link

Does ALICE require tensor flow 1.10.0? #26

Open jlhollowell opened 1 year ago

jlhollowell commented 1 year ago

Hello,

I am attempting to install ALICE and have succeeded in installing:

Conda (Miniconda actually on ARM architecture) CMake Sox

When I try to create the environment with conda env create -f ALICE_Linux.yml (on Ubuntu), I get the following error:

Solving environment: failed

ResolvePackageNotFound:

I have installed tensor flow 2.12.* as I could not find the older version. Am I correct in assuming that ALICE requires the older version? If so, is it possible to adjust to use a newer version? Or, maybe I simply need to dig more to find the older version...

Thanks, in advance, for your time and consideration.

orasanen commented 1 year ago

In fact, there is a new version of ALICE in progress that would be compatible with up-to-date versions of different libraries. However, it is not out yet.

Meanwhile, I think I managed to make a compatibility fix for SylNet to use TF2, if TF1 installation fails. However, it will take me a longer time to find out a combination of libraries that result in an internally compatible conda env definition.

If you want and are in a hurry, you can currently try the following:

1) Pull the updated ALICE repo (or at least the SylNet folder) from git
2) Edit the ALICE_Linux.yml by removing tensorflow-related packages.
3) Create the ALICE env from the modified .yml.
4) Try to install TF2 manually to the ALICE env.
5) Modify run_ALICE.sh by changing

if python3 $THISDIR/SylNet/run_SylNet.py $THISDIR/tmp_data/short/ $THISDIR/tmp_data/features/SylNet_out.txt $THISDIR/SylNet_model/model_1 &> $THISDIR/sylnet.log; then

to

if python3 $THISDIR/SylNet/run_SylNet_tf2.py $THISDIR/tmp_data/short/ $THISDIR/tmp_data/features/SylNet_out.txt $THISDIR/SylNet_model/model_1 &> $THISDIR/sylnet.log; then

orasanen commented 1 year ago

Actually, you can try to create the ALICE env now using the ALICE_Linux_tf2.yml instead of ALICE_Linux.yml, and then do the modification mentioned above.

jlhollowell commented 1 year ago

Thanks and apologies for not acknowledging the reply. I'm not in a huge hurry but will try the process you outlined (1~5) and see if I can get it working. Will also simultaneously await the new version update. I'm planning to use this in a Japanese language environment and am anxious to do some preliminary experimental trials to test the system.

jlhollowell commented 1 year ago

I'm having difficulties with incompatible packages it appears. I thought it could be solved by installing an older version of Python and went back to 3.7 but that simplistic thinking was overly optimistic I guess. I'm getting the following string of incompatibility errors when I run - conda env create -f ALICE_Linux_tf2.yml

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

Package pip conflicts for: python=3.6.7 -> pip tensorflow=2 -> python=3.9 -> pip

Package _openmp_mutex conflicts for: tensorflow=2 -> tensorflow-base==2.12.0=mkl_py39h1f3075e_0 -> _openmp_mutex python=3.6.7 -> libgcc-ng[version='>=7.3.0'] -> _openmp_mutex[version='>=4.5|>=5.1']

Package pypy3.8 conflicts for: tensorflow=2 -> python=3.8 -> pypy3.8[version='7.3.11.|7.3.9.|7.3.8.'] pip=21.1.1 -> python[version='>=3.6'] -> pypy3.8[version='7.3.11.|7.3.9.|7.3.8.|>=7.3.9|>=7.3.8']

Any advice you can provide would be appreciated.

jlhollowell commented 1 year ago

Just a quick followup here, switching to Python 3.9, for example, results in a slightly different incompatibility error set.

Output in format: Requested package -> Available versions

Package _openmp_mutex conflicts for: tensorflow=2 -> tensorflow-base==2.12.0=mkl_py39h1f3075e_0 -> _openmp_mutex python=3.6.7 -> libgcc-ng[version='>=7.3.0'] -> _openmp_mutex[version='>=4.5|>=5.1']

Package pip conflicts for: python=3.6.7 -> pip tensorflow=2 -> python=3.9 -> pip

Package pypy3.8 conflicts for: pip=21.1.1 -> python[version='>=3.6'] -> pypy3.8[version='7.3.11.|7.3.9.|7.3.8.|>=7.3.9|>=7.3.8'] tensorflow=2 -> python=3.8 -> pypy3.8[version='7.3.11.|7.3.9.|7.3.8.']

orasanen commented 1 year ago

Sorry to hear that the tf2 env doesn't seem to work. I'm trying to reproduce the problem, but on my Ubuntu (22.04.2 LTS) the conda create env -f ALICE_Linux_tf2.yml works properly. The env file tries to create and environment with pip=21.1.1 and python=3.6.7 which are compatible on my Ubuntu, so I'm not sure what is the issue with the compatibility error.

Could you confirm which version of Ubuntu you are using? Thanks!