Closed elodiepaupe closed 2 years ago
Hi, I'm not able to reproduce the problem, here is my output :
(kraken-env) [kuenzlip@gpu002.yggdrasil corpus_prevot_farine_fr]$ ketos train -t train.txt -e eval.txt -f alto -d cuda -r 0.0001 --normalization NFD B168/*.xml
Building training set [####################################] 2224/2224
Building validation set [####################################] 626/626 [1587.9705] alphabet mismatch: chars in training set only: {'̂', '#', '̈', '̀', '?', '☨'} (not included in accuracy test during training)
Initializing model ✓
stage 1/∞ [####################################] 2224/2224 Accuracy report (1) 0.0000 24173 24173
stage 2/∞ [####################################] 2224/2224 Accuracy report (2) 0.0000 24173 24173
stage 3/∞ [####################################] 2224/2224 Accuracy report (3) 0.3281 24173 16241
Could you run
pip list
with your python environment loaded to confirm we are using the same module versions ?
Package Version
----------------------------- -----------
absl-py 1.0.0
aiohttp 3.8.1
aiosignal 1.2.0
alabaster 0.7.12
appdirs 1.4.4
asn1crypto 1.4.0
async-timeout 4.0.2
atomicwrites 1.4.0
attrs 20.2.0
Babel 2.8.0
bcrypt 3.2.0
bitstring 3.1.7
blist 1.3.6
CacheControl 0.12.6
cachetools 5.0.0
cachy 0.3.0
certifi 2020.6.20
cffi 1.14.3
chardet 3.0.4
charset-normalizer 2.0.12
cleo 0.8.1
click 8.1.2
clikit 0.6.2
colorama 0.4.3
commonmark 0.9.1
coremltools 5.2.0
crashtest 0.3.1
cryptography 3.1.1
Cython 0.29.21
decorator 4.4.2
distlib 0.3.1
docopt 0.6.2
docutils 0.16
ecdsa 0.16.0
filelock 3.0.12
flit 3.0.0
flit-core 3.0.0
frozenlist 1.3.0
fsspec 2022.3.0
future 0.18.2
google-auth 2.6.6
google-auth-oauthlib 0.4.6
grpcio 1.44.0
html5lib 1.1
idna 2.10
imageio 2.18.0
imagesize 1.2.0
importlib-metadata 4.11.3
iniconfig 1.0.1
intervaltree 3.1.0
intreehooks 1.0
ipaddress 1.0.23
jeepney 0.4.3
Jinja2 2.11.2
joblib 0.17.0
jsonschema 3.2.0
keyring 21.4.0
keyrings.alt 4.0.0
kraken 4.1.2
liac-arff 2.5.0
lockfile 0.12.2
lxml 4.8.0
Markdown 3.3.6
MarkupSafe 1.1.1
mock 4.0.2
more-itertools 8.5.0
mpmath 1.2.1
msgpack 1.0.0
multidict 6.0.2
netaddr 0.8.0
netifaces 0.10.9
networkx 2.8
nose 1.3.7
numpy 1.22.3
oauthlib 3.2.0
packaging 20.4
paramiko 2.7.2
pastel 0.2.1
pathlib2 2.3.5
paycheck 1.0.2
pbr 5.5.0
pexpect 4.8.0
Pillow 9.1.0
pip 20.2.3
pkginfo 1.5.0.1
pluggy 0.13.1
poetry 1.1.3
poetry-core 1.0.0
protobuf 3.20.1
psutil 5.7.2
ptyprocess 0.6.0
py 1.9.0
py-expression-eval 0.3.10
pyarrow 7.0.0
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.20
pycrypto 2.6.1
pyDeprecate 0.3.2
Pygments 2.7.1
pylev 1.3.0
PyNaCl 1.4.0
pyparsing 2.4.7
pyrsistent 0.17.3
pytest 6.1.1
python-bidi 0.4.2
python-dateutil 2.8.1
pytoml 0.1.21
pytorch-lightning 1.6.1
pytz 2020.1
PyWavelets 1.3.0
PyYAML 6.0
regex 2020.10.11
requests 2.24.0
requests-oauthlib 1.3.1
requests-toolbelt 0.9.1
rich 12.2.0
rsa 4.8
scandir 1.10.0
scikit-image 0.19.2
scipy 1.8.0
SecretStorage 3.1.2
setuptools 50.3.0
setuptools-scm 4.1.2
Shapely 1.8.1.post1
shellingham 1.3.2
simplegeneric 0.8.1
simplejson 3.17.2
six 1.15.0
snowballstemmer 2.0.0
sortedcontainers 2.2.2
Sphinx 3.2.1
sphinx-bootstrap-theme 0.7.1
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 1.0.3
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.4
sphinxcontrib-websupport 1.2.4
sympy 1.10.1
tabulate 0.8.7
tensorboard 2.8.0
tensorboard-data-server 0.6.1
tensorboard-plugin-wit 1.8.1
threadpoolctl 2.1.0
tifffile 2022.4.22
toml 0.10.1
tomlkit 0.7.0
torch 1.11.0
torchmetrics 0.8.0
torchvision 0.12.0
tqdm 4.64.0
typing-extensions 4.2.0
ujson 4.0.1
urllib3 1.25.10
virtualenv 20.0.34
wcwidth 0.2.5
webencodings 0.5.1
Werkzeug 2.1.1
wheel 0.35.1
xlrd 1.2.0
yarl 1.7.2
zipp 3.3.0
This is actually due to an update in the parameters of ketos.
If you run
ketos train -t train.txt -e eval.txt -f alto -d cuda:0 -r 0.0001 --normalization NFD B168/*.xml
(notice the :0 after cuda) it should start... but then ends in the "dataloader killed" error ...
Could you try downgrading ketos to 3.0.4 (the one I manager to make work) with
pip install kraken==3.04
And try again ? (with your original command)
I think we should update the tutorial to explicitly set versions of modules to avoid this kind of situation (unidentified bugs or feature change of new versions of python modules)
So I install kraken 3.0.4 and try it with my original command:
(kraken-env) [paupeel1@login1.yggdrasil corpus_prevot_farine_fr]$ kraken --version
kraken, version 3.0.4
(kraken-env) [paupeel1@login1.yggdrasil corpus_prevot_farine_fr]$ sbatch submission_scripts.sh
Submitted batch job 10263649
(kraken-env) [paupeel1@login1.yggdrasil corpus_prevot_farine_fr]$ nano kraken-10263649.out
gpu008
KETOS training
Traceback (most recent call last):
File "/home/users/p/paupeel1/kraken-env/bin/ketos", line 8, in <module>
sys.exit(cli())
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/kraken/ketos.py", line 388, in train
from kraken.lib.train import KrakenTrainer
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/kraken/lib/train.py", line 36, in <module>
from kraken.lib.dataset import BaselineSet, GroundTruthDataset, PolygonGTDataset, generate_input_transforms, preparse_xml_data, Infi$
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/kraken/lib/dataset.py", line 29, in <module>
import torchvision.transforms.functional as tf
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/torchvision/__init__.py", line 6, in <module>
from torchvision import models
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/torchvision/models/__init__.py", line 8, in <module>
from .mobilenet import *
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/torchvision/models/mobilenet.py", line 1, in <module>
from .mobilenetv2 import MobileNetV2, mobilenet_v2, __all__ as mv2_all
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/torchvision/models/mobilenetv2.py", line 8, in <module>
from ..ops.misc import ConvNormActivation
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/torchvision/ops/__init__.py", line 12, in <module>
from .stochastic_depth import stochastic_depth, StochasticDepth
File "/home/users/p/paupeel1/kraken-env/lib/python3.8/site-packages/torchvision/ops/stochastic_depth.py", line 2, in <module>
import torch.fx
ModuleNotFoundError: No module named 'torch.fx'
srun: error: gpu008: task 0: Exited with exit code 1
During the installation of Kraken, torch 1.7.0 has been install and torch 1.10.2 has been uninstall. Is that the (new) problem?
Yes, python module versions can be tricky to manage and you can easily be trapped with incompatible module versions. Now I would advise to use a tool to pin versions of python packages (explicitly set versions of a python package and all of its dependencies).
Can you try the following :
With your python environment activated, run
pip install pip-tools==6.6.2 pip==22.1.2
pip-tools is the tool we will be using to pin packages versions.
Then, download and save
to the cluster. In requirements.txt
there are all the modules with the specific versions needed to make kraken 4.1.2 works.
Then, on the cluster, while being on the same directory as requirements.txt
and with the python environment loaded, run :
pip-sync
It should uninstall any installed module (so if you manually installed other modules, it will uninstall them) and install required modules.
Then, try to run a training task, but add --ntasks=4
to your salloc
command. As indicated here #7
Hello,
I have a problem when I launch these commands:
I've got this message:
I try
ketos train -t train.txt -e eval.txt -f alto -r 0.0001 --normalization NFD B168/*.xml
but I have another issueRuntimeError: DataLoader worker (pid 106408) is killed by signal: Killed.
Is there a solution?