Transkribus / TranskribusDU

Document Understanding tools
BSD 3-Clause "New" or "Revised" License
21 stars 7 forks source link

local variable 'doer' referenced before assignment #10

Closed DRRV closed 5 years ago

DRRV commented 5 years ago

python /nfs/project/read/rv_git/TranskribusDU/TranskribusDU/tasks/DU_ABPTable_BIO.py models ecn_bio_datasetnaf3_3032 --trn datasetnaf3_30 --trn datasetnaf3_32/ --ecn --ecn_con ecn8Lay1Cnotext.json /nfs/project/read/VIRTUALENV_DU3/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type. from ._conv import register_converters as _register_converters Traceback (most recent call last): File "/nfs/project/read/rv_git/TranskribusDU/TranskribusDU/tasks/DU_ABPTable_BIO.py", line 519, in main(sModelDir, sModelName, options) File "/nfs/project/read/rv_git/TranskribusDU/TranskribusDU/tasks/DU_ABPTable_BIO.py", line 429, in main traceln("- classes: ", doer.getGraphClass().getLabelNameList()) UnboundLocalError: local variable 'doer' referenced before assignment

sclincha commented 5 years ago

Is there a problem with our command line ? -ecn_con ecn8Lay1Cnotext.json --ecn_config instead ?

On my side, I have no error: when doing make ecn_8L1C here

PYTHONPATH="/nfs/team/mlo/sclincha/Transkribus3/" ROOTDIR="/nfs/team/mlo/sclincha/Transkribus3/"

EXPDIR=/nfs/project/read/space_sc/abp_1098_BIO_models DATADIR=/nfs/project/read/space_sc/abp_1098_BIO/ data: rm -rf /nfs/project/read/space_sc/abp_1098_BIO/ cp -r /nfs/team/mlo/sclincha/Transkribus3/usecases/ABP/resources/abp_1098/ /nfs/project/read/space_sc/abp_1098_BIO/ cd /nfs/project/read/space_sc/abp_1098_BIO/col && sed -i -- 's/DU_row="S/DU_row="B/g' .mpxml cd /nfs/project/read/space_sc/abp_1098_BIO/col && sed -i -- 's/DU_row="E/DU_row="I/g' .mpxml

ecn_8L1C: PYTHONPATH=$(PYTHONPATH) python $(ROOTDIR)TranskribusDU/tasks/DU_ABPTable_BIO.py $(EXPDIR) ecn8Lay1C_notext --fold-run 1 --ecn --ecn_config ecn_8Lay1Conv.json

DRRV commented 5 years ago

the json file seems to require keys I don't see in my json fils: ecn_learner_config, ecn_ensemble, gat_learner_config

DRRV commented 5 years ago

found the new config format. ex: { "ecn_learner_config": { "name":"8Lay1Conv", "dropout_rate_edge": 0.2, "dropout_rate_edge_feat": 0.2, "dropout_rate_node": 0.2, "lr": 0.001, "mu": 0.0001, "nb_iter": 50, "nconv_edge": 1, "node_indim": 32, "num_layers": 2, "ratio_train_val": 0.3, "patience":2, "activation_name":"relu", "stack_convolutions": false } }