Closed weissenh closed 3 years ago
Note: got a TypeError: unhashable type: 'de.up.ling.irtg.automata.Rule'
with pyjnius==1.3.0 (the version downloaded when I called pip install pyjnius
). After replacing it with an older version (pip install pyjnius==1.2.1
, thanks to @jgroschwitz for this suggestion ) this error disappeared. Just like with overrides package, we might want to mention which version we used.
Pyjnius is probably not relevant for the current main/master branch, but for the unsupervised one and the cogs-unsupervised one.
@weissenh Did you not run into problems with Python2 / how did you solve that? Or did you simply not use the part of the Code where it is needed?
@AinaIanemahy I didn't use python2 here. It's not needed to get train.py --help
to work, right? And I don't think I'm going to need python2 in the near future (I'm not doing anything with AMR or EDS right now). I know that python2
is needed in the predict.sh
, but I guess you actually only need to use it there if you're dealing with EDS (and mb AMR, idk).
I added the information on the packages to the wiki and the readme.
Background:
I was trying to get the following command to run on my local computer (not the coli-servers):
To do so, I followed the installation requirements (cited from the README):
Here are installation commands I used:
I also added an
am-tools.jar
file (I wasn't using the command line for that but for the errors I got I don't think it's relevant).Note: I wasn't working on the main branch for that, but the command I was trying to get to run
python3 train.py --help
, at least the train.py is the same file (checked with diff) with the one on the main branch. Also, this isn't actually training anything, I just want to see the help message. It would be cool to replicate this on the main branch, however (for instance the pyjnius import seems to be absent in the main branchimportant_imports
, but happens to exist on my current branch)l The branch I was on iscogs_unsupervised
which I just recently started and which in turn is based onunsupervised2020
.I know that there is an conda environment on the coli-servers that I have access to, but for trying things on my local computer and also for other researchers not at UdS who would like to reproduce our experiments, I think this is relevant.
Problem:
After the installation as described above, I tried to display the usage info for the
train.py
file:Turns out I have to install
comet_ml
too::bulb: Insight number 1: add
comet_ml
to the requirements maybe?Then I tried again, but it's failing again although with a different error:
According to @namednil 's suggestion (thanks a lot!), I installed a different version of overrides (he said that's the one we use on the coli-servers):
:bulb: Insight number 2: maybe specify which
overrides
versions are fine?Afterwards I tried again to display the help message of
train.py
. Yet another error message - different from the previous ones- pops up (note: probably not relevant for work on the main branch):So the solution to that error is to install
pyjnius
.:bulb: Insight number 3: For the branches for which it is relevant (
unsupervised2020
,cogs_unsupervised
, ...?), addpyjnius
to the requirements maybe?Afterwards I again called train.py with the help-flag and finally got the output I would expect :partying_face: (ok, minus the first 3-4 lines of warnings/info messages maybe):
Related issues
Other issues also contributed to the topic of what needs to be installed:
Slightly related: #85 part of the documentation of each experiment could be detailed installation instructions (or maybe just a requirements.txt file).
Proposed solution
I would advocate to be more precise about installation instructions/requirements (coli-servers are not always the solution). Maybe we can offer some
requirements.txt
file orenvironment.yml
file, a sequence of commands or something else? This could be even marked as just a suggestion like "we can't always check which versions of all the packages work together nicely, but we found this set of package versions to work".So I have only tried to run
python3 train.py --help
which doesn't involve any serious computations, so I don't know whether more problems will occur for other commands (like actually training the parser).Note again that I wasn't working on the main branch, so I suggest to first try to replicate this on the main branch. As I said the
train.py
file on my branch was line by line the same as the one on the main branch, but this is not everything. (I'm pretty confident that it's reproducible on the main branch, minus the pyjnius thing, but who knows?).I'm assigning @AinaIanemahy to this as a question to her whether you want to look into this and maybe update the README or the wiki?
For reference, output of pip freeze after I finally got
python3 train.py --help
to work without error messages.