python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4302 -v ' -s datou_current_4302 -M 0 -S 0 -U 95,95,120 import MySQLdb succeeded Import error (python version) ['/Users/moilerat/Documents/Fotonower/install/caffe/distribute/python', '/home/admin/workarea/git/Velours/python/prod', '/home/admin/workarea/install/caffe_cuda8_python3/python', '/home/admin/workarea/install/darknet', '/home/admin/workarea/git/Velours/python', '/home/admin/workarea/install/caffe_frcnn_python3/py-faster-rcnn/caffe-fast-rcnn/python', '/home/admin/mtr/.credentials', '/home/admin/workarea/install/caffe/python', '/home/admin/workarea/install/caffe_frcnn/py-faster-rcnn/tools', '/home/admin/workarea/git/fotonowerpip', '/home/admin/workarea/install/segment-anything', '/home/admin/workarea/git/pyfvs', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/admin/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Namespace(auto=False, cert_args='/home/fotonower/https/cert.pem', contextDataFile='', custom_size=0, database='', datou_id='4302', datou_id_excluded='', fifo=False, host='', is_cpu_mode=False, job='batch_current', json_args='', key_args='/home/fotonower/https/vision.fotonower.com.key', limit=1000, list_photo_ids='', local='', mtr_current_id=0, mtr_portfolio_ids='', nb_thread=1, no_current=False, offset=0, only_client=False, output_file='', password='', port=5100, rand=0, save=2, use_client=False, user_id=440, username='', verbose=True) process id : 3987320 load datou : 4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3930718) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3930718) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721566 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3930718'] with mtr_portfolio_ids : ['27721566'] and first list_photo_ids : [] new path : /proc/3987320/ Name: python3 Umask: 0002 State: R (running) Tgid: 3987320 Ngid: 0 Pid: 3987320 PPid: 3987318 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3987320 NSpid: 3987320 NSpgid: 3986889 NSsid: 3986889 VmPeak: 1106856 kB VmSize: 1106856 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100444 kB VmRSS: 100444 kB RssAnon: 59836 kB RssFile: 40608 kB RssShmem: 0 kB VmData: 865608 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 548 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 42 nonvoluntary_ctxt_switches: 169 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3987320', 'Ngid': '0', 'Pid': '3987320', 'PPid': '3987318', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3987320', 'NSpid': '3987320', 'NSpgid': '3986889', 'NSsid': '3986889', 'VmPeak': '1106856 kB', 'VmSize': '1106856 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100444 kB', 'VmRSS': '100444 kB', 'RssAnon': '59836 kB', 'RssFile': '40608 kB', 'RssShmem': '0 kB', 'VmData': '865608 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '548 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '42', 'nonvoluntary_ctxt_switches': '169'} ('datou_batch_current', '3987320', '1106856', '0', '1106856', '865608', '100444', b'', 'marlene', '3930718') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27721566) and hide_status = 0 ) AND ph.photo_id not in (SELECT mtr_photo_id from MTRPhoto.mtr_datou_result_search where mtr_current_id in (3930718 ) ) ORDER BY ph.photo_id DESC LIMIT 0, 200 We have 1 , {} SELECT mtr_photo_id, mtr_portfolio_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27721566) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1388864924, 'portfolio_id': 27721566}, {'photo_id': 1388864244, 'portfolio_id': 27721566}, {'photo_id': 1388864241, 'portfolio_id': 27721566}, {'photo_id': 1388863630, 'portfolio_id': 27721566}, {'photo_id': 1388863566, 'portfolio_id': 27721566}, {'photo_id': 1388863564, 'portfolio_id': 27721566}, {'photo_id': 1388863551, 'portfolio_id': 27721566}, {'photo_id': 1388863431, 'portfolio_id': 27721566}, {'photo_id': 1388863386, 'portfolio_id': 27721566}, {'photo_id': 1388863358, 'portfolio_id': 27721566}, {'photo_id': 1388863347, 'portfolio_id': 27721566}, {'photo_id': 1388863339, 'portfolio_id': 27721566}, {'photo_id': 1388863321, 'portfolio_id': 27721566}, {'photo_id': 1388863319, 'portfolio_id': 27721566}] map_portfolio_id_photo_id: {27721566: [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319]} ##### Call download_photos : nb_thread : 1 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos ##### After load_data_input time to download the photos : 0.05142569541931152 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sun Oct 12 05:36:28 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27721566) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} beginning of datou step ventilate_hashtags_in_portfolio : To implement ! To do loadFromThcl(), then load ParamDescType : thcl2725 get_desc_type_from_thcl : type of cat SELECT id, mtr_user_id, name, pb_hashtag_id, hashtag_id_list, button_legend_list, portfolio_id_lists, photo_hashtag_type, photo_desc_type, svm_limit, limit_tagging, is_public, live, created_at, updated_at, type_classification FROM MTRDatou.classification_theme WHERE `id` IN (2725) thcls : [{'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'}] thcl {'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'} Update svm_hashtag_type_desc : 5186 remove imagettes from duplicated photo Iterating over portfolio : 27721566 get user id for portfolio 27721566 get sub ptf for main ptf 27721566, type 3726 and hashtags ['autre_refus', 'plastique', 'environnement', 'Carton_brun', 'papier', 'cartonnette', 'Teint_Dans_La_Masse', 'Carton_gris', 'kraft', 'mal_croppe', 'flou', 'metal'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721566 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','environnement','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse','Carton_gris','kraft','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721566 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','environnement','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse','Carton_gris','kraft','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 27721566, 'sub_port_id': 27721594, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701317, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'papier': {'main_port_id': 27721566, 'sub_port_id': 27721595, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701318, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'flou': {'main_port_id': 27721566, 'sub_port_id': 27721596, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701319, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'Carton_brun': {'main_port_id': 27721566, 'sub_port_id': 27721597, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701320, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'plastique': {'main_port_id': 27721566, 'sub_port_id': 27721598, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701321, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'metal': {'main_port_id': 27721566, 'sub_port_id': 27721599, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701322, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'Carton_gris': {'main_port_id': 27721566, 'sub_port_id': 27721600, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701323, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 27721566, 'sub_port_id': 27721601, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701324, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'cartonnette': {'main_port_id': 27721566, 'sub_port_id': 27721602, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701325, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'environnement': {'main_port_id': 27721566, 'sub_port_id': 27721603, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701326, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'kraft': {'main_port_id': 27721566, 'sub_port_id': 27721604, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701327, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}, 'autre_refus': {'main_port_id': 27721566, 'sub_port_id': 27721605, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701328, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 30)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721594 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='mal_croppe' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721594) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721595 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721595) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721596 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721596) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721597 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721597) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721598 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721598) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721599 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721599) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721600 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_gris' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721600) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721601 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721601) result : ((1388863366,), (1388863418,), (1388864955,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721602 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721602) result : ((1388863367,), (1388863419,), (1388864956,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721603 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='environnement' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721603) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721604 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721604) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27721605 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=27721566 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721605) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27721566) result : ((1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721566 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','environnement','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse','Carton_gris','kraft','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721566 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','environnement','Carton_brun','papier','cartonnette','Teint_Dans_La_Masse','Carton_gris','kraft','mal_croppe','flou','metal')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 27721566, 'sub_port_id': 27721606, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701329, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'papier': {'main_port_id': 27721566, 'sub_port_id': 27721607, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701330, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'flou': {'main_port_id': 27721566, 'sub_port_id': 27721608, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701331, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'Carton_brun': {'main_port_id': 27721566, 'sub_port_id': 27721609, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701332, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'plastique': {'main_port_id': 27721566, 'sub_port_id': 27721610, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701333, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'metal': {'main_port_id': 27721566, 'sub_port_id': 27721611, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701334, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'Carton_gris': {'main_port_id': 27721566, 'sub_port_id': 27721612, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701335, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'Teint_Dans_La_Masse': {'main_port_id': 27721566, 'sub_port_id': 27721613, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701336, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'cartonnette': {'main_port_id': 27721566, 'sub_port_id': 27721614, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701337, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'environnement': {'main_port_id': 27721566, 'sub_port_id': 27721615, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701338, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'kraft': {'main_port_id': 27721566, 'sub_port_id': 27721616, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701339, 'last_updated_at': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 2, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}, 'autre_refus': {'main_port_id': 27721566, 'sub_port_id': 27721617, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18701340, 'last_updated_at': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_desc': datetime.datetime(2025, 10, 11, 6, 8, 2), 'last_updated_at_asc': datetime.datetime(2025, 10, 11, 2, 47, 36)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721606,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721594 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721607,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721595 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721608,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721596 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721609,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721597 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721610,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721598 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721611,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721599 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721612,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721600 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721613,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721601 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721614,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721602 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721615,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721603 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721616,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721604 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27721617,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27721605 lien utilise dans velours : https://marlene.fotonower.com/velours/27721606,27721607,27721608,27721609,27721610,27721611,27721612,27721613,27721614,27721615,27721616,27721617?tags=mal_croppe,papier,flou,Carton_brun,plastique,metal,Carton_gris,Teint_Dans_La_Masse,cartonnette,environnement,kraft,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27721566]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] map_info['map_portfolio_photo'] : {27721566: [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319]} final : False mtd_id 4302 list_pids : [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] Looping around the photos to save general results len do output : 1 /27721566. before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864924', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864244', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864241', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863630', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863566', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863564', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863551', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863431', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863386', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863358', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863347', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863339', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863321', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863319', None, None, None, None, None, '3930718') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27721566', "{'mal_croppe': 27721594, 'papier': 27721595, 'flou': 27721596, 'Carton_brun': 27721597, 'plastique': 27721598, 'metal': 27721599, 'Carton_gris': 27721600, 'Teint_Dans_La_Masse': 27721601, 'cartonnette': 27721602, 'environnement': 27721603, 'kraft': 27721604, 'autre_refus': 27721605}", None, None, None, None, '3930718'), ('4302', '27721566', '1388864924', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388864244', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388864241', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863630', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863566', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863564', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863551', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863431', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863386', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863358', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863347', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863339', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863321', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863319', None, None, None, None, None, '3930718')] time used for this insertion : 0.038207292556762695 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.2313549518585205 time spend to save output : 0.038573265075683594 total time spend for step 1 : 5.269928216934204 step2:final Sun Oct 12 05:36:33 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27721566) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} Beginning of datou step final ! query to retrieve results for portfolio 27721566 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1388863321,1388863358,1388863319,1388863347,1388863339,1388863431,1388863386,1388863551,1388863566,1388863564,1388864244,1388863630,1388864241,1388864924); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27721566]) Inside saveOutput : final : False verbose : True original output for save of step final : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} new output for save of step final : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] map_info['map_portfolio_photo'] : {27721566: [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319]} final : False mtd_id 4302 list_pids : [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] Looping around the photos to save general results len do output : 14 /1388864924.Didn't retrieve data . /1388864244.Didn't retrieve data . /1388864241.Didn't retrieve data . /1388863630.Didn't retrieve data . /1388863566.Didn't retrieve data . /1388863564.Didn't retrieve data . /1388863551.Didn't retrieve data . /1388863431.Didn't retrieve data . /1388863386.Didn't retrieve data . /1388863358.Didn't retrieve data . /1388863347.Didn't retrieve data . /1388863339.Didn't retrieve data . /1388863321.Didn't retrieve data . /1388863319.Didn't retrieve data . before output type Used above Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864924', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864244', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864241', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863630', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863566', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863564', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863551', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863431', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863386', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863358', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863347', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863339', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863321', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863319', None, None, None, None, None, '3930718') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27721566', '1388864924', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388864244', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388864241', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863630', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863566', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863564', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863551', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863431', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863386', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863358', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863347', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863339', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863321', '0.02089089469195817', None, None, None, None, '3930718'), ('4302', '27721566', '1388863319', '0.02089089469195817', None, None, None, None, '3930718')] time used for this insertion : 0.04033851623535156 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.23862743377685547 time spend to save output : 0.04088187217712402 total time spend for step 2 : 0.2795093059539795 step3:velours_tree Sun Oct 12 05:36:34 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {27721566: [{'mal_croppe': 27721594, 'papier': 27721595, 'flou': 27721596, 'Carton_brun': 27721597, 'plastique': 27721598, 'metal': 27721599, 'Carton_gris': 27721600, 'Teint_Dans_La_Masse': 27721601, 'cartonnette': 27721602, 'environnement': 27721603, 'kraft': 27721604, 'autre_refus': 27721605}]} input_args_next_step : {27721566: ()} output_args : {27721566: [{'mal_croppe': 27721594, 'papier': 27721595, 'flou': 27721596, 'Carton_brun': 27721597, 'plastique': 27721598, 'metal': 27721599, 'Carton_gris': 27721600, 'Teint_Dans_La_Masse': 27721601, 'cartonnette': 27721602, 'environnement': 27721603, 'kraft': 27721604, 'autre_refus': 27721605}]} args : 27721566 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'mal_croppe': 27721594, 'papier': 27721595, 'flou': 27721596, 'Carton_brun': 27721597, 'plastique': 27721598, 'metal': 27721599, 'Carton_gris': 27721600, 'Teint_Dans_La_Masse': 27721601, 'cartonnette': 27721602, 'environnement': 27721603, 'kraft': 27721604, 'autre_refus': 27721605},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27721566) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} can't find the photo_desc_type After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27721566]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 0.290769100189209 time spend to save output : 5.125999450683594e-05 total time spend for step 3 : 0.2908203601837158 step4:send_mail_cod Sun Oct 12 05:36:34 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} input_args_next_step : {1388864924: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388864924 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388864244 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388864241 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863630 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863566 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863564 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863551 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863431 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863386 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863358 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863347 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863339 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863321 depend.output_id : 0 input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ()} output_args : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',)} args : 1388863319 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {27721566: [{'mal_croppe': 27721594, 'papier': 27721595, 'flou': 27721596, 'Carton_brun': 27721597, 'plastique': 27721598, 'metal': 27721599, 'Carton_gris': 27721600, 'Teint_Dans_La_Masse': 27721601, 'cartonnette': 27721602, 'environnement': 27721603, 'kraft': 27721604, 'autre_refus': 27721605}]} input_args_next_step : {1388864924: ('0.02089089469195817',), 1388864244: ('0.02089089469195817',), 1388864241: ('0.02089089469195817',), 1388863630: ('0.02089089469195817',), 1388863566: ('0.02089089469195817',), 1388863564: ('0.02089089469195817',), 1388863551: ('0.02089089469195817',), 1388863431: ('0.02089089469195817',), 1388863386: ('0.02089089469195817',), 1388863358: ('0.02089089469195817',), 1388863347: ('0.02089089469195817',), 1388863339: ('0.02089089469195817',), 1388863321: ('0.02089089469195817',), 1388863319: ('0.02089089469195817',), 27721566: ()} output_args : {27721566: [{'mal_croppe': 27721594, 'papier': 27721595, 'flou': 27721596, 'Carton_brun': 27721597, 'plastique': 27721598, 'metal': 27721599, 'Carton_gris': 27721600, 'Teint_Dans_La_Masse': 27721601, 'cartonnette': 27721602, 'environnement': 27721603, 'kraft': 27721604, 'autre_refus': 27721605}]} args : 27721566 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :15, first value : ('0.02089089469195817',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27721566) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1388864924,1388864244,1388864241,1388863630,1388863566,1388863564,1388863551,1388863431,1388863386,1388863358,1388863347,1388863339,1388863321,1388863319) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1388863319 begin to download photo : 1388863347 begin to download photo : 1388863431 begin to download photo : 1388863566 begin to download photo : 1388864244 download finish for photo 1388863319 begin to download photo : 1388863321 download finish for photo 1388863431 begin to download photo : 1388863551 download finish for photo 1388863347 begin to download photo : 1388863358 download finish for photo 1388863566 begin to download photo : 1388863630 download finish for photo 1388864244 begin to download photo : 1388864924 download finish for photo 1388863551 begin to download photo : 1388863564 download finish for photo 1388863358 begin to download photo : 1388863386 download finish for photo 1388863321 begin to download photo : 1388863339 download finish for photo 1388864924 download finish for photo 1388863630 begin to download photo : 1388864241 download finish for photo 1388863339 download finish for photo 1388863564 download finish for photo 1388863386 download finish for photo 1388864241 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette277215941760240194/ imagette277215961760240194/ imagette277215981760240194/ imagette277215991760240194/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P27721566_12-10-2025_05_36_34.pdf 27721594 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721594 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277215941760240194 27721596 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721596 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277215961760240194 27721598 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721598 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277215981760240194 27721599 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721599 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277215991760240194 27721602 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721602 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1388863367: '1760143624_2488504_1388863319_d53f1c2550c99f70caf8063f0edc2f8a_rle_crop_3993964459_0.png', 1388863419: '1760143744_2493827_1388863347_9eeb87d4778adc5112dee4b63bb058ba_rle_crop_3993964630_0.png', 1388864956: '1760144583_2512152_1388864924_6ba2954565143046404fe43d8ef75019_rle_crop_3993991535_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/41373173556ed5f2f5ee3b84a16ed957_70993594.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/41373173556ed5f2f5ee3b84a16ed957_35459409.png change filename to text .imagette277216021760240195/ imagette277216021760240195/1760143624_2488504_1388863319_d53f1c2550c99f70caf8063f0edc2f8a_rle_crop_3993964459_0.png.png imagette277216021760240195/1760143744_2493827_1388863347_9eeb87d4778adc5112dee4b63bb058ba_rle_crop_3993964630_0.png.png imagette277216021760240195/1760144583_2512152_1388864924_6ba2954565143046404fe43d8ef75019_rle_crop_3993991535_0.png.png imagette277216041760240195/ imagette277216051760240195/ imagette277215971760240195/ imagette277216001760240195/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/b4640398a0fae15ff47a68406bf33662_17021114.png imagette277216021760240195 27721604 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721604 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277216041760240195 27721605 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721605 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277216051760240195 27721597 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721597 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277215971760240195 27721600 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721600 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette277216001760240195 27721601 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721601 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1388863366: '1760143624_2488504_1388863321_003e280d30cd7c5786322e310c1dd06c_rle_crop_3993964449_0.png', 1388863418: '1760143744_2493827_1388863358_d2a250d931f1cfcb67c68ea8371b40b1_rle_crop_3993964620_0.png', 1388864955: '1760144583_2512152_1388864924_6ba2954565143046404fe43d8ef75019_rle_crop_3993991539_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/dbbb17178195da939bd98b7e32f856f6_63209402.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/dbbb17178195da939bd98b7e32f856f6_67382185.png change filename to text .imagette277216011760240195/ imagette277216011760240195/1760143744_2493827_1388863358_d2a250d931f1cfcb67c68ea8371b40b1_rle_crop_3993964620_0.png.png imagette277216011760240195/1760144583_2512152_1388864924_6ba2954565143046404fe43d8ef75019_rle_crop_3993991539_0.png.png imagette277216011760240195/1760143624_2488504_1388863321_003e280d30cd7c5786322e310c1dd06c_rle_crop_3993964449_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/f343003d4fb78753d19ff8c2e5d4b466_97710757.png imagette277216011760240195 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27721566 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27721606,27721607,27721608,27721609,27721610,27721611,27721612,27721613,27721614,27721615,27721616,27721617?tags=mal_croppe,papier,flou,Carton_brun,plastique,metal,Carton_gris,Teint_Dans_La_Masse,cartonnette,environnement,kraft,autre_refus your option no_mail is active, we will not send the real mail to your client args[1388864924] : ('0.02089089469195817',) no score found for photo 1388864924 We are sending mail with results at report@fotonower.com args[1388864244] : ('0.02089089469195817',) no score found for photo 1388864244 We are sending mail with results at report@fotonower.com args[1388864241] : ('0.02089089469195817',) no score found for photo 1388864241 We are sending mail with results at report@fotonower.com args[1388863630] : ('0.02089089469195817',) no score found for photo 1388863630 We are sending mail with results at report@fotonower.com args[1388863566] : ('0.02089089469195817',) no score found for photo 1388863566 We are sending mail with results at report@fotonower.com args[1388863564] : ('0.02089089469195817',) no score found for photo 1388863564 We are sending mail with results at report@fotonower.com args[1388863551] : ('0.02089089469195817',) no score found for photo 1388863551 We are sending mail with results at report@fotonower.com args[1388863431] : ('0.02089089469195817',) no score found for photo 1388863431 We are sending mail with results at report@fotonower.com args[1388863386] : ('0.02089089469195817',) no score found for photo 1388863386 We are sending mail with results at report@fotonower.com args[1388863358] : ('0.02089089469195817',) no score found for photo 1388863358 We are sending mail with results at report@fotonower.com args[1388863347] : ('0.02089089469195817',) no score found for photo 1388863347 We are sending mail with results at report@fotonower.com args[1388863339] : ('0.02089089469195817',) no score found for photo 1388863339 We are sending mail with results at report@fotonower.com args[1388863321] : ('0.02089089469195817',) no score found for photo 1388863321 We are sending mail with results at report@fotonower.com args[1388863319] : ('0.02089089469195817',) no score found for photo 1388863319 We are sending mail with results at report@fotonower.com refus_total : 0.02089089469195817 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721566 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 1000 start upload file to ovh https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721566_12-10-2025_05_36_34.pdf results_Auto_P27721566_12-10-2025_05_36_34.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721566_12-10-2025_05_36_34.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','27721566','results_Auto_P27721566_12-10-2025_05_36_34.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721566_12-10-2025_05_36_34.pdf','pdf','','0.13','0.02089089469195817') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27721566]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] map_info['map_portfolio_photo'] : {27721566: [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319]} final : False mtd_id 4302 list_pids : [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] Looping around the photos to save general results len do output : 0 before output type Used above Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864924', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864244', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864241', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863630', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863566', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863564', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863551', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863431', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863386', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863358', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863347', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863339', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863321', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863319', None, None, None, None, None, '3930718') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27721566', '1388864924', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388864244', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388864241', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863630', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863566', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863564', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863551', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863431', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863386', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863358', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863347', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863339', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863321', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863319', None, None, None, None, None, '3930718')] time used for this insertion : 0.03978133201599121 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.3449065685272217 time spend to save output : 0.04003024101257324 total time spend for step 4 : 3.384936809539795 step5:split_time_score Sun Oct 12 05:36:37 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['27721566'] We expect there is only one output and this part is used while all output are not tuple or array Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 1 : VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : [('27721566',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27721566) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1388864244: {'path': 'temp/1760240194_3987320_1388864244_421e3613a455335e81eb35c22b9643a4.jpg', 'extension': 'jpg'}, 1388864924: {'path': 'temp/1760240194_3987320_1388864924_6ba2954565143046404fe43d8ef75019.jpg', 'extension': 'jpg'}, 1388863319: {'path': 'temp/1760240194_3987320_1388863319_d53f1c2550c99f70caf8063f0edc2f8a.jpg', 'extension': 'jpg'}, 1388863321: {'path': 'temp/1760240194_3987320_1388863321_003e280d30cd7c5786322e310c1dd06c.jpg', 'extension': 'jpg'}, 1388863339: {'path': 'temp/1760240194_3987320_1388863339_19a9a207fa0b11880b92f19ad6c5ebfc.jpg', 'extension': 'jpg'}, 1388863431: {'path': 'temp/1760240194_3987320_1388863431_5d380afa8928cff230afc3ca63d1fff0.jpg', 'extension': 'jpg'}, 1388863551: {'path': 'temp/1760240194_3987320_1388863551_4bdc4a0703ce3419139f919b01acb900.jpg', 'extension': 'jpg'}, 1388863564: {'path': 'temp/1760240194_3987320_1388863564_c195a4db9896d311d0b863ca5a3d0367.jpg', 'extension': 'jpg'}, 1388863347: {'path': 'temp/1760240194_3987320_1388863347_9eeb87d4778adc5112dee4b63bb058ba.jpg', 'extension': 'jpg'}, 1388863358: {'path': 'temp/1760240194_3987320_1388863358_d2a250d931f1cfcb67c68ea8371b40b1.jpg', 'extension': 'jpg'}, 1388863386: {'path': 'temp/1760240194_3987320_1388863386_0db67a1d95d83236b189c9cd77f491f6.jpg', 'extension': 'jpg'}, 1388863566: {'path': 'temp/1760240194_3987320_1388863566_544e725277bd2ed1a6fcb82b198ff17d.jpg', 'extension': 'jpg'}, 1388863630: {'path': 'temp/1760240194_3987320_1388863630_f70b92a00f6ba8e42542291e11093565.jpg', 'extension': 'jpg'}, 1388864241: {'path': 'temp/1760240194_3987320_1388864241_22f91f91778dafd6e39b0121cb6cdd48.jpg', 'extension': 'jpg'}} map_subphoto_mainphoto : {} begin split time score SELECT app_name, token FROM MTRUser.mtr_app_api_token WHERE mtr_user_id=979 AND app_name="token_split_time_score" AND expire_at > NOW() select distinct dp.name from MTRPhoto.dashboard_entry_day ded, MTRPhoto.dashboard_places dp, MTRPhoto.dashboard_results dr where ded.dashboard_place_id = dp.id and ded.last_run_id = dr.dashboard_run_id and dp.id = ded.dashboard_place_id and dr.mtr_portfolio_id = 27721566; (('arc_en_ciel_jrm',), ('arc_en_ciel_jrm_bis',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27721566 group by h (('02', 14),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27721566 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (27721566) AND cps.thcl in (861) order by cps.score desc LIMIT 0, 100000 SELECT cps.photo_id, cps.score, h.hashtag, cps.hashtag_id, mpp1.mtr_portfolio_id FROM MTRPhoto.class_photo_score cps, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp1 where mpp1.mtr_photo_id=cps.photo_id AND h.hashtag_id=cps.hashtag_id AND mpp1.hide_status=0 AND mpp1.mtr_portfolio_id in (27721566) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 11102025 27721566 Nombre de photos uploadées : 14 / 23040 (0%) 11102025 27721566 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 11102025 27721566 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1388863321, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/003e280d30cd7c5786322e310c1dd06c.jpg', 'username': None, 'uploaded_at': 1760143567, 'text': 'image_11102025_02_45_04_010149m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1388863358, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/d2a250d931f1cfcb67c68ea8371b40b1.jpg', 'username': None, 'uploaded_at': 1760143633, 'text': 'image_11102025_02_45_04_010149m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1388863319, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/d53f1c2550c99f70caf8063f0edc2f8a.jpg', 'username': None, 'uploaded_at': 1760143567, 'text': 'image_11102025_02_45_13_009125m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1388863347, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/11/9eeb87d4778adc5112dee4b63bb058ba.jpg', 'username': None, 'uploaded_at': 1760143633, 'text': 'image_11102025_02_45_13_009125m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 3.5762786865234375e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005121231079101562 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27721566, '2025-10-11' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-10-11' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2429009,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6609289646148682 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 2429009 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27720054, 'dashboard_result_id': 16314293, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720054_12-10-2025_05_34_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720056, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720057, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720058, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720059, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720060, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720061, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720062, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720064, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720065, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720066, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720067, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27720417, 'dashboard_result_id': 16314294, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720417_12-10-2025_05_35_04.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720418, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720420, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720421, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720422, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720423, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720424, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720425, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720426, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720428, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720429, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27720501, 'dashboard_result_id': 16314295, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720501_12-10-2025_05_35_27.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720504, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720505, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720507, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720510, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720511, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720512, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720514, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27720897, 'dashboard_result_id': 16314296, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720897_12-10-2025_05_35_35.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720899, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720900, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720902, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720903, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720904, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720905, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720906, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720907, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720908, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720909, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27720979, 'dashboard_result_id': 16314297, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720979_12-10-2025_05_35_45.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27720980, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720981, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720986, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720987, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720990, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720991, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27721184, 'dashboard_result_id': 16314298, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721184_12-10-2025_05_36_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721185, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721186, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721187, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721188, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721190, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721191, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721192, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721193, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721194, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721195, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721196, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27721358, 'dashboard_result_id': 16314299, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721358_12-10-2025_05_36_07.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721361, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721363, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721364, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721366, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721367, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721368, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721369, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721370, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27721437, 'dashboard_result_id': 16314300, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721437_12-10-2025_05_36_26.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27721462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721464, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721465, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721468, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721469, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721470, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721471, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721472, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721473, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27721566, 'dashboard_result_id': 16314301, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721566_11-10-2025_06_08_03.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721594, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721595, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721596, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721598, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721599, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721600, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721601, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721602, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721603, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721604, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721605, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27721863, 'dashboard_result_id': 16314302, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721863_11-10-2025_06_08_35.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721864, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721865, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721866, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721867, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721868, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721869, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721870, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721871, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721872, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721873, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721875, 'pht': 3726}}"}, {'dashboat_entry_day': 2429009, 'dashboard_run_id': 2442241, 'mtr_portfolio_id': 27722073, 'dashboard_result_id': 16314303, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27722073_11-10-2025_06_09_03.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27722075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27722076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27722077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27722078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27722079, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27722080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27722081, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27722082, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27722083, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27722084, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27722085, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27722086, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27720054 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930710, 'mtr_portfolio_id': 27720054, 'created_at': datetime.datetime(2025, 10, 12, 5, 34, 27), 'result': '0.0468442416829823', 'result_long': None, 'result_double': None}] Qualite : 0.0468442416829823 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27720054 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720054_12-10-2025_05_34_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27720054 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720054_12-10-2025_05_34_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720056, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720057, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720058, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720059, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720060, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720061, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720062, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720064, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720065, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720066, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720067, 'pht': 3726}}" where mtr_portfolio_id = 27720054 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27720054 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314293, 0.0468442416829823, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720054_12-10-2025_05_34_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720056, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720057, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720058, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720059, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720060, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720061, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720062, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720063, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720064, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720065, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720066, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720067, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27720417 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930711, 'mtr_portfolio_id': 27720417, 'created_at': datetime.datetime(2025, 10, 12, 5, 35, 3), 'result': '0.0626138292444683', 'result_long': None, 'result_double': None}] Qualite : 0.0626138292444683 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27720417 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720417_12-10-2025_05_35_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27720417 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720417_12-10-2025_05_35_04.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720418, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720420, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720421, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720422, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720423, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720424, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720425, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720426, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720428, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720429, 'pht': 3726}}" where mtr_portfolio_id = 27720417 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27720417 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314294, 0.0626138292444683, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720417_12-10-2025_05_35_04.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720418, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720419, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720420, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720421, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720422, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720423, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720424, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720425, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720426, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720427, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720428, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720429, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27720501 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930712, 'mtr_portfolio_id': 27720501, 'created_at': datetime.datetime(2025, 10, 12, 5, 35, 26), 'result': '0.07002479285765437', 'result_long': None, 'result_double': None}] Qualite : 0.07002479285765437 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27720501 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720501_12-10-2025_05_35_27.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27720501 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720501_12-10-2025_05_35_27.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720504, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720505, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720507, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720510, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720511, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720512, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720514, 'pht': 3726}}" where mtr_portfolio_id = 27720501 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27720501 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314295, 0.07002479285765437, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720501_12-10-2025_05_35_27.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720504, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720505, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720507, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720508, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720510, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720511, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720512, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720513, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720514, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27720897 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930713, 'mtr_portfolio_id': 27720897, 'created_at': datetime.datetime(2025, 10, 12, 5, 35, 34), 'result': '0.060460946225977606', 'result_long': None, 'result_double': None}] Qualite : 0.060460946225977606 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27720897 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720897_12-10-2025_05_35_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27720897 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720897_12-10-2025_05_35_35.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720899, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720900, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720902, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720903, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720904, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720905, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720906, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720907, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720908, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720909, 'pht': 3726}}" where mtr_portfolio_id = 27720897 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27720897 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314296, 0.060460946225977606, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720897_12-10-2025_05_35_35.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720899, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720900, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720902, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720903, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720904, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720905, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720906, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27720907, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720908, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720909, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27720979 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930714, 'mtr_portfolio_id': 27720979, 'created_at': datetime.datetime(2025, 10, 12, 5, 35, 44), 'result': '0.06281841436019006', 'result_long': None, 'result_double': None}] Qualite : 0.06281841436019006 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27720979 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720979_12-10-2025_05_35_45.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27720979 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720979_12-10-2025_05_35_45.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27720980, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720981, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720986, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720987, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720990, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720991, 'pht': 3726}}" where mtr_portfolio_id = 27720979 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27720979 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314297, 0.06281841436019006, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27720979_12-10-2025_05_35_45.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27720980, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27720981, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27720982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27720983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27720984, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27720985, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27720986, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27720987, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27720988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27720989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27720990, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27720991, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27721184 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930715, 'mtr_portfolio_id': 27721184, 'created_at': datetime.datetime(2025, 10, 12, 5, 36, 1), 'result': '0.12864993259132962', 'result_long': None, 'result_double': None}] Qualite : 0.12864993259132962 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27721184 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721184_12-10-2025_05_36_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27721184 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721184_12-10-2025_05_36_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721185, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721186, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721187, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721188, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721190, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721191, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721192, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721193, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721194, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721195, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721196, 'pht': 3726}}" where mtr_portfolio_id = 27721184 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721184 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314298, 0.12864993259132962, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721184_12-10-2025_05_36_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721185, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721186, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721187, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721188, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721190, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721191, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721192, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721193, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721194, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721195, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721196, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27721358 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930716, 'mtr_portfolio_id': 27721358, 'created_at': datetime.datetime(2025, 10, 12, 5, 36, 6), 'result': '0.03473683332091325', 'result_long': None, 'result_double': None}] Qualite : 0.03473683332091325 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27721358 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721358_12-10-2025_05_36_07.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27721358 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721358_12-10-2025_05_36_07.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721361, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721363, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721364, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721366, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721367, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721368, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721369, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721370, 'pht': 3726}}" where mtr_portfolio_id = 27721358 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721358 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314299, 0.03473683332091325, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721358_12-10-2025_05_36_07.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721360, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721361, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721362, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721363, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721364, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721365, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721366, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721367, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721368, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721369, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721370, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27721437 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930717, 'mtr_portfolio_id': 27721437, 'created_at': datetime.datetime(2025, 10, 12, 5, 36, 25), 'result': '0.06084642124898767', 'result_long': None, 'result_double': None}] Qualite : 0.06084642124898767 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27721437 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721437_12-10-2025_05_36_26.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27721437 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721437_12-10-2025_05_36_26.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27721462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721464, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721465, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721468, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721469, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721470, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721471, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721472, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721473, 'pht': 3726}}" where mtr_portfolio_id = 27721437 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721437 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314300, 0.06084642124898767, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721437_12-10-2025_05_36_26.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27721462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721464, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721465, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721468, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721469, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721470, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721471, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721472, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721473, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27721566 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3930718, 'mtr_portfolio_id': 27721566, 'created_at': datetime.datetime(2025, 10, 12, 5, 36, 33), 'result': '0.02089089469195817', 'result_long': None, 'result_double': None}] Qualite : 0.02089089469195817 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27721566 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721566_12-10-2025_05_36_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27721566 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721566_12-10-2025_05_36_34.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721594, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721595, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721596, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721598, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721599, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721600, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721601, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721602, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721603, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721604, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721605, 'pht': 3726}}" where mtr_portfolio_id = 27721566 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721566 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314301, 0.02089089469195817, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721566_12-10-2025_05_36_34.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721594, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721595, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721596, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721597, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721598, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721599, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721600, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721601, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721602, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721603, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721604, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721605, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27721863 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3927940, 'mtr_portfolio_id': 27721863, 'created_at': datetime.datetime(2025, 10, 11, 6, 8, 34), 'result': '0.03115759325088575', 'result_long': None, 'result_double': None}] Qualite : 0.03115759325088575 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27721863 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721863_11-10-2025_06_08_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27721863 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721863_11-10-2025_06_08_35.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721864, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721865, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721866, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721867, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721868, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721869, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721870, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721871, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721872, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721873, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721875, 'pht': 3726}}" where mtr_portfolio_id = 27721863 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27721863 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314302, 0.03115759325088575, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27721863_11-10-2025_06_08_35.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27721864, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27721865, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27721866, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27721867, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27721868, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27721869, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27721870, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27721871, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27721872, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27721873, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27721874, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27721875, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27722073 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3927941, 'mtr_portfolio_id': 27722073, 'created_at': datetime.datetime(2025, 10, 11, 6, 9, 1), 'result': '0.02425278874265168', 'result_long': None, 'result_double': None}] Qualite : 0.02425278874265168 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27722073 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27722073_11-10-2025_06_09_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27722073 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27722073_11-10-2025_06_09_03.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27722075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27722076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27722077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27722078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27722079, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27722080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27722081, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27722082, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27722083, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27722084, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27722085, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27722086, 'pht': 3726}}" where mtr_portfolio_id = 27722073 and dashboard_run_id = 2442241 SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify TODO Duplicate data, are they consistent 3 ? Duplicate data, are they consistent 4 ? SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=27722073 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16314303, 0.02425278874265168, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27722073_11-10-2025_06_09_03.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27722075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27722076, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27722077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27722078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27722079, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27722080, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27722081, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27722082, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27722083, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27722084, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27722085, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27722086, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27720054,27720417,27720501,27720897,27720979,27721184,27721358,27721437,27721566,27721863,27722073) result : ((1388847167,), (1388848359,), (1388848941,), (1388848944,), (1388848998,), (1388849882,), (1388850046,), (1388850241,), (1388852175,), (1388852190,), (1388852192,), (1388852317,), (1388852331,), (1388852353,), (1388852372,), (1388852374,), (1388852464,), (1388852481,), (1388852526,), (1388852524,), (1388852665,), (1388852682,), (1388852684,), (1388852696,), (1388852841,), (1388852844,), (1388852846,), (1388856989,), (1388856976,), (1388857045,), (1388857047,), (1388857063,), (1388857078,), (1388857096,), (1388857098,), (1388857187,), (1388857262,), (1388857260,), (1388857363,), (1388857416,), (1388857489,), (1388857490,), (1388857512,), (1388857627,), (1388857629,), (1388858391,), (1388859334,), (1388859563,), (1388861720,), (1388861962,), (1388862236,), (1388862321,), (1388862323,), (1388862431,), (1388862492,), (1388862616,), (1388862629,), (1388862782,), (1388862784,), (1388862866,), (1388862868,), (1388862870,), (1388862887,), (1388862911,), (1388862909,), (1388862935,), (1388862963,), (1388862985,), (1388862986,), (1388863005,), (1388863160,), (1388863162,), (1388863164,), (1388863215,), (1388863217,), (1388863264,), (1388863281,), (1388863283,), (1388863300,), (1388863323,), (1388863370,), (1388863319,), (1388863321,), (1388863339,), (1388863347,), (1388863358,), (1388863386,), (1388863431,), (1388863551,), (1388863564,), (1388863566,), (1388863630,), (1388864241,), (1388864244,), (1388864924,), (1388864978,), (1388864980,), (1388864982,), (1388864996,), (1388866235,), (1388866236,), (1388866284,), (1388866791,), (1388866886,), (1388866888,), (1388866890,), (1388866910,), (1388866911,), (1388866979,), (1388866982,), (1388867027,), (1388867047,), (1388867109,), (1388867130,), (1388867131,), (1388867154,), (1388867196,), (1388867248,), (1388867267,), (1388867268,), (1388867328,), (1388867397,), (1388867516,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'11102025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27721566]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] map_info['map_portfolio_photo'] : {27721566: [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319]} final : True mtd_id 4302 list_pids : [1388864924, 1388864244, 1388864241, 1388863630, 1388863566, 1388863564, 1388863551, 1388863431, 1388863386, 1388863358, 1388863347, 1388863339, 1388863321, 1388863319] Looping around the photos to save general results len do output : 1 /27721566Didn't retrieve data . before output type Here is an output not treated by saveGeneral : Managing all output in save final without adding information in the mtr_datou_result ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864924', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864244', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388864241', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863630', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863566', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863564', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863551', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863431', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863386', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863358', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863347', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863339', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863321', None, None, None, None, None, '3930718') ('4302', None, None, None, None, None, None, None, '3930718') ('4302', '27721566', '1388863319', None, None, None, None, None, '3930718') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27721566', 'None', None, None, None, None, '3930718'), ('4302', '27721566', '1388864924', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388864244', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388864241', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863630', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863566', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863564', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863551', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863431', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863386', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863358', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863347', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863339', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863321', None, None, None, None, None, '3930718'), ('4302', '27721566', '1388863319', None, None, None, None, None, '3930718')] time used for this insertion : 0.03591346740722656 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.8094265460968018 time spend to save output : 0.03614544868469238 total time spend for step 5 : 3.845571994781494 caffe_path_current : About to save ! 2 After save, about to update current ! ret : 2 len(input) + len(total_photo_id_missing) : 1 set_done_treatment DELETE from MTRPhoto.mtr_datou_current where id in (3930718) 2.31user 2.01system 0:15.20elapsed 28%CPU (0avgtext+0avgdata 162396maxresident)k 288inputs+8232outputs (0major+77603minor)pagefaults 0swaps