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 : 1565457 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 (4251140) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4251140) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572936 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4251140'] with mtr_portfolio_ids : ['29572936'] and first list_photo_ids : [] new path : /proc/1565457/ Name: python3 Umask: 0002 State: R (running) Tgid: 1565457 Ngid: 0 Pid: 1565457 PPid: 1565456 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1565457 NSpid: 1565457 NSpgid: 1564119 NSsid: 1564119 VmPeak: 1113360 kB VmSize: 1113360 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 103904 kB VmRSS: 103904 kB RssAnon: 66292 kB RssFile: 37612 kB RssShmem: 0 kB VmData: 872088 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 620 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: 52 nonvoluntary_ctxt_switches: 151 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1565457', 'Ngid': '0', 'Pid': '1565457', 'PPid': '1565456', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1565457', 'NSpid': '1565457', 'NSpgid': '1564119', 'NSsid': '1564119', 'VmPeak': '1113360 kB', 'VmSize': '1113360 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '103904 kB', 'VmRSS': '103904 kB', 'RssAnon': '66292 kB', 'RssFile': '37612 kB', 'RssShmem': '0 kB', 'VmData': '872088 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '620 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': '52', 'nonvoluntary_ctxt_switches': '151'} ('datou_batch_current', '1565457', '1113360', '0', '1113360', '872088', '103904', b'', 'marlene', '4251140') 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 (29572936) 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 (4251140 ) ) 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 (29572936) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1400179574, 'portfolio_id': 29572936}, {'photo_id': 1400179540, 'portfolio_id': 29572936}, {'photo_id': 1400179538, 'portfolio_id': 29572936}, {'photo_id': 1400179536, 'portfolio_id': 29572936}, {'photo_id': 1400179534, 'portfolio_id': 29572936}, {'photo_id': 1400179331, 'portfolio_id': 29572936}, {'photo_id': 1400179328, 'portfolio_id': 29572936}, {'photo_id': 1400179326, 'portfolio_id': 29572936}, {'photo_id': 1400179324, 'portfolio_id': 29572936}, {'photo_id': 1400179322, 'portfolio_id': 29572936}, {'photo_id': 1400179320, 'portfolio_id': 29572936}, {'photo_id': 1400179281, 'portfolio_id': 29572936}, {'photo_id': 1400179279, 'portfolio_id': 29572936}, {'photo_id': 1400179277, 'portfolio_id': 29572936}] map_portfolio_id_photo_id: {29572936: [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320, 1400179281, 1400179279, 1400179277]} ##### 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.019257068634033203 #### 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 Fri Dec 19 19:18:59 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 (29572936) 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 : 29572936 get user id for portfolio 29572936 get sub ptf for main ptf 29572936, type 3726 and hashtags ['metal', 'cartonnette', 'papier', 'Teint_Dans_La_Masse', 'flou', 'Carton_gris', 'kraft', 'mal_croppe', 'plastique', 'autre_refus', 'environnement', 'Carton_brun'] 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`=29572936 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','papier','Teint_Dans_La_Masse','flou','Carton_gris','kraft','mal_croppe','plastique','autre_refus','environnement','Carton_brun')) 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`=29572936 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','papier','Teint_Dans_La_Masse','flou','Carton_gris','kraft','mal_croppe','plastique','autre_refus','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 29572936, 'sub_port_id': 29572944, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180161, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'mal_croppe': {'main_port_id': 29572936, 'sub_port_id': 29572945, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180162, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'Carton_gris': {'main_port_id': 29572936, 'sub_port_id': 29572946, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180163, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'flou': {'main_port_id': 29572936, 'sub_port_id': 29572948, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180164, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'cartonnette': {'main_port_id': 29572936, 'sub_port_id': 29572949, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180165, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 29572936, 'sub_port_id': 29572950, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180166, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'autre_refus': {'main_port_id': 29572936, 'sub_port_id': 29572951, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180167, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'metal': {'main_port_id': 29572936, 'sub_port_id': 29572952, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180168, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'environnement': {'main_port_id': 29572936, 'sub_port_id': 29572953, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180169, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'papier': {'main_port_id': 29572936, 'sub_port_id': 29572954, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180170, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'plastique': {'main_port_id': 29572936, 'sub_port_id': 29572955, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180171, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}, 'Carton_brun': {'main_port_id': 29572936, 'sub_port_id': 29572956, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180172, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29572944 , 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=29572936 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 (29572944) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572945 , 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=29572936 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 (29572945) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572946 , 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=29572936 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 (29572946) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572948 , 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=29572936 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 (29572948) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572949 , 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=29572936 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 (29572949) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572950 , 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=29572936 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 (29572950) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572951 , 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=29572936 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 (29572951) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572952 , 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=29572936 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 (29572952) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572953 , 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=29572936 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 (29572953) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572954 , 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=29572936 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 (29572954) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572955 , 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=29572936 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 (29572955) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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 29572956 , 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=29572936 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 (29572956) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29572936) result : ((1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) 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`=29572936 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','papier','Teint_Dans_La_Masse','flou','Carton_gris','kraft','mal_croppe','plastique','autre_refus','environnement','Carton_brun')) 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`=29572936 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','papier','Teint_Dans_La_Masse','flou','Carton_gris','kraft','mal_croppe','plastique','autre_refus','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 29572936, 'sub_port_id': 29572958, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180173, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'mal_croppe': {'main_port_id': 29572936, 'sub_port_id': 29572959, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180174, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'Carton_gris': {'main_port_id': 29572936, 'sub_port_id': 29572960, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180175, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'flou': {'main_port_id': 29572936, 'sub_port_id': 29572961, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180176, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'cartonnette': {'main_port_id': 29572936, 'sub_port_id': 29572962, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180177, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 29572936, 'sub_port_id': 29572963, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180178, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'autre_refus': {'main_port_id': 29572936, 'sub_port_id': 29572964, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180179, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'metal': {'main_port_id': 29572936, 'sub_port_id': 29572965, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180180, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'environnement': {'main_port_id': 29572936, 'sub_port_id': 29572966, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180181, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'papier': {'main_port_id': 29572936, 'sub_port_id': 29572967, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180182, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'plastique': {'main_port_id': 29572936, 'sub_port_id': 29572968, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180183, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}, 'Carton_brun': {'main_port_id': 29572936, 'sub_port_id': 29572969, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20180184, 'last_updated_at': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_desc': datetime.datetime(2025, 12, 19, 19, 17, 35), 'last_updated_at_asc': datetime.datetime(2025, 12, 19, 19, 17, 35)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572958,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572944 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572959,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572945 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572960,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572946 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572961,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572948 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572962,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572949 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572963,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572950 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572964,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572951 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572965,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572952 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572966,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572953 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572967,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572954 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572968,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572955 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29572969,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29572956 lien utilise dans velours : https://marlene.fotonower.com/velours/29572958,29572959,29572960,29572961,29572962,29572963,29572964,29572965,29572966,29572967,29572968,29572969?tags=kraft,mal_croppe,Carton_gris,flou,cartonnette,Teint_Dans_La_Masse,autre_refus,metal,environnement,papier,plastique,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29572936]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] map_info['map_portfolio_photo'] : {29572936: [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320, 1400179281, 1400179279, 1400179277]} final : False mtd_id 4302 list_pids : [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] Looping around the photos to save general results len do output : 1 /29572936. 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, '4251140') ('4302', '29572936', '1400179574', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179540', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179538', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179536', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179534', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179331', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179328', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179326', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179324', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179322', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179320', None, None, None, None, None, '4251140') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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, '29572936', "{'kraft': 29572944, 'mal_croppe': 29572945, 'Carton_gris': 29572946, 'flou': 29572948, 'cartonnette': 29572949, 'Teint_Dans_La_Masse': 29572950, 'autre_refus': 29572951, 'metal': 29572952, 'environnement': 29572953, 'papier': 29572954, 'plastique': 29572955, 'Carton_brun': 29572956}", None, None, None, None, '4251140'), ('4302', '29572936', '1400179574', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179540', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179538', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179536', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179534', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179331', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179328', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179326', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179324', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179322', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179320', None, None, None, None, None, '4251140')] time used for this insertion : 0.0189511775970459 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7805461883544922 time spend to save output : 0.019283294677734375 total time spend for step 1 : 1.7998294830322266 step2:final Fri Dec 19 19:19:00 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 (29572936) 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 29572936 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1400179281,1400179279,1400179277,1400179331,1400179328,1400179326,1400179324,1400179322,1400179320,1400179574,1400179540,1400179538,1400179536,1400179534); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29572936]) Inside saveOutput : final : False verbose : True original output for save of step final : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} new output for save of step final : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] map_info['map_portfolio_photo'] : {29572936: [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320, 1400179281, 1400179279, 1400179277]} final : False mtd_id 4302 list_pids : [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] Looping around the photos to save general results len do output : 11 /1400179574.Didn't retrieve data . /1400179540.Didn't retrieve data . /1400179538.Didn't retrieve data . /1400179536.Didn't retrieve data . /1400179534.Didn't retrieve data . /1400179331.Didn't retrieve data . /1400179328.Didn't retrieve data . /1400179326.Didn't retrieve data . /1400179324.Didn't retrieve data . /1400179322.Didn't retrieve data . /1400179320.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, '4251140') ('4302', '29572936', '1400179574', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179540', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179538', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179536', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179534', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179331', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179328', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179326', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179324', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179322', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179320', None, None, None, None, None, '4251140') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '29572936', '1400179574', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179540', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179538', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179536', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179534', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179331', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179328', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179326', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179324', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179322', '0.0', None, None, None, None, '4251140'), ('4302', '29572936', '1400179320', '0.0', None, None, None, None, '4251140')] time used for this insertion : 0.01723003387451172 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06420350074768066 time spend to save output : 0.017958402633666992 total time spend for step 2 : 0.08216190338134766 step3:velours_tree Fri Dec 19 19:19:00 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 : {29572936: [{'kraft': 29572944, 'mal_croppe': 29572945, 'Carton_gris': 29572946, 'flou': 29572948, 'cartonnette': 29572949, 'Teint_Dans_La_Masse': 29572950, 'autre_refus': 29572951, 'metal': 29572952, 'environnement': 29572953, 'papier': 29572954, 'plastique': 29572955, 'Carton_brun': 29572956}]} input_args_next_step : {29572936: ()} output_args : {29572936: [{'kraft': 29572944, 'mal_croppe': 29572945, 'Carton_gris': 29572946, 'flou': 29572948, 'cartonnette': 29572949, 'Teint_Dans_La_Masse': 29572950, 'autre_refus': 29572951, 'metal': 29572952, 'environnement': 29572953, 'papier': 29572954, 'plastique': 29572955, 'Carton_brun': 29572956}]} args : 29572936 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 : ({'kraft': 29572944, 'mal_croppe': 29572945, 'Carton_gris': 29572946, 'flou': 29572948, 'cartonnette': 29572949, 'Teint_Dans_La_Masse': 29572950, 'autre_refus': 29572951, 'metal': 29572952, 'environnement': 29572953, 'papier': 29572954, 'plastique': 29572955, 'Carton_brun': 29572956},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29572936) 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([29572936]) 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.327988862991333 time spend to save output : 4.601478576660156e-05 total time spend for step 3 : 0.3280348777770996 step4:send_mail_cod Fri Dec 19 19:19:01 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 : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} input_args_next_step : {1400179574: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179574 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179540 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179538 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179536 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179534 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179331 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179328 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179326 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179324 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179322 depend.output_id : 0 input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ()} output_args : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',)} args : 1400179320 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 : {29572936: [{'kraft': 29572944, 'mal_croppe': 29572945, 'Carton_gris': 29572946, 'flou': 29572948, 'cartonnette': 29572949, 'Teint_Dans_La_Masse': 29572950, 'autre_refus': 29572951, 'metal': 29572952, 'environnement': 29572953, 'papier': 29572954, 'plastique': 29572955, 'Carton_brun': 29572956}]} input_args_next_step : {1400179574: ('0.0',), 1400179540: ('0.0',), 1400179538: ('0.0',), 1400179536: ('0.0',), 1400179534: ('0.0',), 1400179331: ('0.0',), 1400179328: ('0.0',), 1400179326: ('0.0',), 1400179324: ('0.0',), 1400179322: ('0.0',), 1400179320: ('0.0',), 29572936: ()} output_args : {29572936: [{'kraft': 29572944, 'mal_croppe': 29572945, 'Carton_gris': 29572946, 'flou': 29572948, 'cartonnette': 29572949, 'Teint_Dans_La_Masse': 29572950, 'autre_refus': 29572951, 'metal': 29572952, 'environnement': 29572953, 'papier': 29572954, 'plastique': 29572955, 'Carton_brun': 29572956}]} args : 29572936 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 :12, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29572936) 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 (1400179574,1400179540,1400179538,1400179536,1400179534,1400179331,1400179328,1400179326,1400179324,1400179322,1400179320) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1400179320 begin to download photo : 1400179326 begin to download photo : 1400179534 begin to download photo : 1400179540 download finish for photo 1400179320 begin to download photo : 1400179322 download finish for photo 1400179534 begin to download photo : 1400179536 download finish for photo 1400179540 begin to download photo : 1400179574 download finish for photo 1400179326 begin to download photo : 1400179328 download finish for photo 1400179322 begin to download photo : 1400179324 download finish for photo 1400179536 begin to download photo : 1400179538 download finish for photo 1400179574 download finish for photo 1400179328 begin to download photo : 1400179331 download finish for photo 1400179324 download finish for photo 1400179538 download finish for photo 1400179331 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette295729441766168341/ imagette295729451766168341/ imagette295729481766168341/ imagette295729491766168341/ imagette295729511766168341/ imagette295729521766168341/ imagette295729551766168341/ imagette295729461766168341/ imagette295729501766168341/ imagette295729561766168341/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P29572936_19-12-2025_19_19_01.pdf 29572944 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=29572944 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729441766168341 29572945 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=29572945 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729451766168341 29572948 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=29572948 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729481766168341 29572949 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=29572949 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729491766168341 29572951 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=29572951 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729511766168341 29572952 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=29572952 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729521766168341 29572955 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=29572955 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729551766168341 29572946 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=29572946 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729461766168341 29572950 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=29572950 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729501766168341 29572956 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=29572956 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette295729561766168341 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29572936 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29572958,29572959,29572960,29572961,29572962,29572963,29572964,29572965,29572966,29572967,29572968,29572969?tags=kraft,mal_croppe,Carton_gris,flou,cartonnette,Teint_Dans_La_Masse,autre_refus,metal,environnement,papier,plastique,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1400179574] : ('0.0',) no score found for photo 1400179574 We are sending mail with results at report@fotonower.com args[1400179540] : ('0.0',) no score found for photo 1400179540 We are sending mail with results at report@fotonower.com args[1400179538] : ('0.0',) no score found for photo 1400179538 We are sending mail with results at report@fotonower.com args[1400179536] : ('0.0',) no score found for photo 1400179536 We are sending mail with results at report@fotonower.com args[1400179534] : ('0.0',) no score found for photo 1400179534 We are sending mail with results at report@fotonower.com args[1400179331] : ('0.0',) no score found for photo 1400179331 We are sending mail with results at report@fotonower.com args[1400179328] : ('0.0',) no score found for photo 1400179328 We are sending mail with results at report@fotonower.com args[1400179326] : ('0.0',) no score found for photo 1400179326 We are sending mail with results at report@fotonower.com args[1400179324] : ('0.0',) no score found for photo 1400179324 We are sending mail with results at report@fotonower.com args[1400179322] : ('0.0',) no score found for photo 1400179322 We are sending mail with results at report@fotonower.com args[1400179320] : ('0.0',) no score found for photo 1400179320 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=29572936 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_P29572936_19-12-2025_19_19_01.pdf results_Auto_P29572936_19-12-2025_19_19_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29572936_19-12-2025_19_19_01.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','29572936','results_Auto_P29572936_19-12-2025_19_19_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29572936_19-12-2025_19_19_01.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29572936]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] map_info['map_portfolio_photo'] : {29572936: [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320, 1400179281, 1400179279, 1400179277]} final : False mtd_id 4302 list_pids : [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] 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, '4251140') ('4302', '29572936', '1400179574', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179540', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179538', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179536', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179534', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179331', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179328', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179326', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179324', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179322', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179320', None, None, None, None, None, '4251140') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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', '29572936', '1400179574', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179540', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179538', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179536', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179534', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179331', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179328', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179326', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179324', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179322', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179320', None, None, None, None, None, '4251140')] time used for this insertion : 0.015522480010986328 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.575073480606079 time spend to save output : 0.01582479476928711 total time spend for step 4 : 1.5908982753753662 step5:split_time_score Fri Dec 19 19:19:02 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 : ['29572936'] 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 : [('29572936',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29572936) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1400179540: {'path': 'temp/1766168341_1565457_1400179540_dd791eb57bfed4fee8d53c7d62ff1f60.jpg', 'extension': 'jpg'}, 1400179574: {'path': 'temp/1766168341_1565457_1400179574_02fc2456672f189c3580186f0f5cbb87.jpg', 'extension': 'jpg'}, 1400179320: {'path': 'temp/1766168341_1565457_1400179320_e50721df86cf70e31a6ac20eb2513396.jpg', 'extension': 'jpg'}, 1400179322: {'path': 'temp/1766168341_1565457_1400179322_fef285e0241a1c851f1fa962b845ad07.jpg', 'extension': 'jpg'}, 1400179324: {'path': 'temp/1766168341_1565457_1400179324_667e0ebe017ec91f205ca92769e724ce.jpg', 'extension': 'jpg'}, 1400179534: {'path': 'temp/1766168341_1565457_1400179534_e280d2b1e07ec9a69dcd8121da5ccdbd.jpg', 'extension': 'jpg'}, 1400179536: {'path': 'temp/1766168341_1565457_1400179536_6717b2c3d97c40709d8bbea828a062ba.jpg', 'extension': 'jpg'}, 1400179538: {'path': 'temp/1766168341_1565457_1400179538_9d2451c1023c83f8722ada32d29382e5.jpg', 'extension': 'jpg'}, 1400179326: {'path': 'temp/1766168341_1565457_1400179326_9facf95d1c1d9b9fb78c9d0a0e28446c.jpg', 'extension': 'jpg'}, 1400179328: {'path': 'temp/1766168341_1565457_1400179328_959809fbd872c7b65f98e4bef507eab1.jpg', 'extension': 'jpg'}, 1400179331: {'path': 'temp/1766168341_1565457_1400179331_0e5a046c1e70c56ad464d523da4f0d08.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 = 29572936; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) 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 = 29572936 group by h (('19', 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=29572936 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 (29572936) 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 (29572936) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 19122025 29572936 Nombre de photos uploadées : 14 / 23040 (0%) 19122025 29572936 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 19122025 29572936 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1400179281, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/19/a737adb78e04a51b7850ccc22dc49b58.jpg', 'username': None, 'uploaded_at': 1766168167, 'text': 'image_19122025_19_15_04_10138.jpg'}, {'photo_id': 1400179279, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/19/fa2ef69cad1c63b015c03b2d229d633f.jpg', 'username': None, 'uploaded_at': 1766168167, 'text': 'image_19122025_19_15_14_9637.jpg'}, {'photo_id': 1400179277, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/19/7d088a9e479898be5b13e18bb8c04a16.jpg', 'username': None, 'uploaded_at': 1766168167, 'text': 'image_19122025_19_15_24_10138.jpg'}, {'photo_id': 1400179331, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/19/0e5a046c1e70c56ad464d523da4f0d08.jpg', 'username': None, 'uploaded_at': 1766168227, 'text': 'image_19122025_19_15_55_10138.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.814697265625e-06 elapsed_time : order_list_meta_photo_and_scores 1.239776611328125e-05 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0007762908935546875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29572936, '2025-12-19' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2761642,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2600364685058594 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= 2761642 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29564719, 'dashboard_result_id': 18562247, '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_P29564719_19-12-2025_12_04_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29564721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29564722, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29564723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29564724, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29564725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29564726, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29564727, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29564728, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29564729, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29564730, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29564731, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29564732, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29565006, 'dashboard_result_id': 18562248, '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_P29565006_19-12-2025_12_19_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29565055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29565056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29565057, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29565058, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29565059, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29565060, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29565061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29565062, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29565063, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29565064, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29565065, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29565066, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29565580, 'dashboard_result_id': 18562249, '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_P29565580_19-12-2025_13_59_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29565582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29565583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29565584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29565585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29565586, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29565587, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29565588, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29565589, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29565590, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29565591, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29565592, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29565593, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29566373, 'dashboard_result_id': 18562250, '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_P29566373_19-12-2025_13_46_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566391, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566393, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566394, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29566395, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566396, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566397, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566398, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566399, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566400, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566401, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566402, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29566511, 'dashboard_result_id': 18562251, '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_P29566511_19-12-2025_14_21_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29566515, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566516, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566517, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566518, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566519, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566520, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566521, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566522, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566523, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566524, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566525, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566526, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29566883, 'dashboard_result_id': 18562252, '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_P29566883_19-12-2025_14_33_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566889, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566890, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566891, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566892, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566893, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29566896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566897, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29567114, 'dashboard_result_id': 18562253, '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_P29567114_19-12-2025_14_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29567117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29567118, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29567119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29567120, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29567121, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29567122, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29567123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29567124, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29567125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29567126, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29567127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29567128, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29567531, 'dashboard_result_id': 18562254, '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_P29567531_19-12-2025_15_07_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29567535, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29567536, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29567537, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29567538, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29567539, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29567540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29567541, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29567542, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29567543, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29567544, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29567545, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29567546, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29568017, 'dashboard_result_id': 18562255, '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_P29568017_19-12-2025_15_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29568022, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29568023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29568024, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29568025, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29568026, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29568027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29568028, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29568029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29568030, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29568031, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29568032, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29568033, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29568563, 'dashboard_result_id': 18562256, '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_P29568563_19-12-2025_18_00_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29568573, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29568574, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29568575, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29568576, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29568577, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29568578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29568579, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29568580, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29568581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29568582, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29568583, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29568584, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29569699, 'dashboard_result_id': 18562257, '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_P29569699_19-12-2025_17_19_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29569703, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29569704, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29569705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29569706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29569707, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29569708, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29569709, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29569710, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29569711, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29569712, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29569713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29569714, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29570185, 'dashboard_result_id': 18562258, '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_P29570185_19-12-2025_18_04_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29570189, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29570190, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29570191, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29570192, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29570193, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29570194, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29570195, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29570196, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29570197, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29570198, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29570199, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29570200, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29570915, 'dashboard_result_id': 18562259, '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_P29570915_19-12-2025_18_16_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29570918, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29570919, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29570920, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29570921, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29570922, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29570923, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29570924, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29570925, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29570926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29570927, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29570928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29570929, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29571357, 'dashboard_result_id': 18562260, '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_P29571357_19-12-2025_18_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571361, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571362, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571363, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571364, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571365, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571366, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571367, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571368, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571369, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571370, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571371, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571372, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29571617, 'dashboard_result_id': 18562261, '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_P29571617_19-12-2025_18_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571632, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571633, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571635, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571636, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571637, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571638, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571639, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571641, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571643, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29571950, 'dashboard_result_id': 18562262, '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_P29571950_19-12-2025_19_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571959, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571961, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571962, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571963, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571964, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571965, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571966, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571967, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571968, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29572386, 'dashboard_result_id': 18562263, '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_P29572386_19-12-2025_19_16_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29572421, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29572422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29572423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29572424, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29572425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29572426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29572427, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29572428, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29572429, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29572430, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29572431, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29572432, 'pht': 3726}}"}, {'dashboat_entry_day': 2761642, 'dashboard_run_id': 2772871, 'mtr_portfolio_id': 29572936, 'dashboard_result_id': 18562264, '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_P29572936_19-12-2025_19_17_36.pdf'}"}] 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 = 29564719 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': 4249873, 'mtr_portfolio_id': 29564719, 'created_at': datetime.datetime(2025, 12, 19, 12, 4, 30), 'result': '0.050184588004834836', 'result_long': None, 'result_double': None}] Qualite : 0.050184588004834836 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29564719 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29564719_19-12-2025_12_04_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29564719 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_P29564719_19-12-2025_12_04_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29564721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29564722, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29564723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29564724, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29564725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29564726, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29564727, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29564728, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29564729, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29564730, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29564731, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29564732, 'pht': 3726}}" where mtr_portfolio_id = 29564719 and dashboard_run_id = 2772871 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`=29564719 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562247, 0.050184588004834836, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29564719_19-12-2025_12_04_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29564721, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29564722, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29564723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29564724, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29564725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29564726, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29564727, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29564728, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29564729, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29564730, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29564731, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29564732, '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 = 29565006 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': 4249918, 'mtr_portfolio_id': 29565006, 'created_at': datetime.datetime(2025, 12, 19, 12, 19, 28), 'result': '0.04119182523231964', 'result_long': None, 'result_double': None}] Qualite : 0.04119182523231964 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29565006 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29565006_19-12-2025_12_19_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29565006 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_P29565006_19-12-2025_12_19_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29565055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29565056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29565057, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29565058, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29565059, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29565060, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29565061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29565062, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29565063, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29565064, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29565065, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29565066, 'pht': 3726}}" where mtr_portfolio_id = 29565006 and dashboard_run_id = 2772871 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`=29565006 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562248, 0.04119182523231964, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29565006_19-12-2025_12_19_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29565055, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29565056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29565057, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29565058, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29565059, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29565060, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29565061, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29565062, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29565063, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29565064, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29565065, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29565066, '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 = 29565580 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': 4249966, 'mtr_portfolio_id': 29565580, 'created_at': datetime.datetime(2025, 12, 19, 13, 59, 58), 'result': '0.08827084236664978', 'result_long': None, 'result_double': None}] Qualite : 0.08827084236664978 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29565580 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29565580_19-12-2025_13_59_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29565580 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_P29565580_19-12-2025_13_59_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29565582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29565583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29565584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29565585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29565586, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29565587, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29565588, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29565589, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29565590, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29565591, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29565592, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29565593, 'pht': 3726}}" where mtr_portfolio_id = 29565580 and dashboard_run_id = 2772871 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`=29565580 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562249, 0.08827084236664978, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29565580_19-12-2025_13_59_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29565582, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29565583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29565584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29565585, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29565586, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29565587, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29565588, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29565589, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29565590, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29565591, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29565592, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29565593, '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 = 29566373 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': 4250139, 'mtr_portfolio_id': 29566373, 'created_at': datetime.datetime(2025, 12, 19, 13, 46, 32), 'result': '0.02809548758660227', 'result_long': None, 'result_double': None}] Qualite : 0.02809548758660227 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29566373 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29566373_19-12-2025_13_46_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29566373 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_P29566373_19-12-2025_13_46_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566391, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566393, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566394, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29566395, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566396, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566397, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566398, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566399, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566400, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566401, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566402, 'pht': 3726}}" where mtr_portfolio_id = 29566373 and dashboard_run_id = 2772871 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`=29566373 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562250, 0.02809548758660227, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29566373_19-12-2025_13_46_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566391, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566393, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566394, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29566395, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566396, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566397, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566398, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566399, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566400, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566401, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566402, '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 = 29566511 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': 4250151, 'mtr_portfolio_id': 29566511, 'created_at': datetime.datetime(2025, 12, 19, 14, 21, 1), 'result': '0.03225211747858353', 'result_long': None, 'result_double': None}] Qualite : 0.03225211747858353 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29566511 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29566511_19-12-2025_14_21_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29566511 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_P29566511_19-12-2025_14_21_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29566515, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566516, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566517, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566518, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566519, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566520, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566521, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566522, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566523, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566524, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566525, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566526, 'pht': 3726}}" where mtr_portfolio_id = 29566511 and dashboard_run_id = 2772871 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`=29566511 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562251, 0.03225211747858353, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29566511_19-12-2025_14_21_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29566515, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566516, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566517, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566518, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566519, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566520, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566521, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566522, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566523, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566524, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566525, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566526, '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 = 29566883 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': 4250223, 'mtr_portfolio_id': 29566883, 'created_at': datetime.datetime(2025, 12, 19, 14, 33), 'result': '0.06617863041027004', 'result_long': None, 'result_double': None}] Qualite : 0.06617863041027004 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29566883 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29566883_19-12-2025_14_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29566883 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_P29566883_19-12-2025_14_33_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566889, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566890, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566891, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566892, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566893, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29566896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566897, 'pht': 3726}}" where mtr_portfolio_id = 29566883 and dashboard_run_id = 2772871 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`=29566883 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562252, 0.06617863041027004, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29566883_19-12-2025_14_33_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29566886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29566887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29566888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29566889, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29566890, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29566891, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29566892, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29566893, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29566894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29566895, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29566896, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29566897, '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 = 29567114 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': 4250256, 'mtr_portfolio_id': 29567114, 'created_at': datetime.datetime(2025, 12, 19, 14, 46, 58), 'result': '0.04439790217047148', 'result_long': None, 'result_double': None}] Qualite : 0.04439790217047148 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29567114 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29567114_19-12-2025_14_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29567114 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_P29567114_19-12-2025_14_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29567117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29567118, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29567119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29567120, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29567121, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29567122, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29567123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29567124, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29567125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29567126, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29567127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29567128, 'pht': 3726}}" where mtr_portfolio_id = 29567114 and dashboard_run_id = 2772871 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`=29567114 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562253, 0.04439790217047148, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29567114_19-12-2025_14_46_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29567117, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29567118, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29567119, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29567120, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29567121, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29567122, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29567123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29567124, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29567125, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29567126, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29567127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29567128, '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 = 29567531 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': 4250299, 'mtr_portfolio_id': 29567531, 'created_at': datetime.datetime(2025, 12, 19, 15, 7, 28), 'result': '0.05742196965303342', 'result_long': None, 'result_double': None}] Qualite : 0.05742196965303342 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29567531 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29567531_19-12-2025_15_07_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29567531 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_P29567531_19-12-2025_15_07_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29567535, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29567536, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29567537, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29567538, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29567539, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29567540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29567541, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29567542, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29567543, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29567544, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29567545, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29567546, 'pht': 3726}}" where mtr_portfolio_id = 29567531 and dashboard_run_id = 2772871 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`=29567531 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562254, 0.05742196965303342, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29567531_19-12-2025_15_07_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29567535, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29567536, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29567537, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29567538, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29567539, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29567540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29567541, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29567542, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29567543, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29567544, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29567545, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29567546, '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 = 29568017 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': 4250398, 'mtr_portfolio_id': 29568017, 'created_at': datetime.datetime(2025, 12, 19, 15, 16, 59), 'result': '0.039215349978794826', 'result_long': None, 'result_double': None}] Qualite : 0.039215349978794826 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29568017 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29568017_19-12-2025_15_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29568017 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_P29568017_19-12-2025_15_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29568022, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29568023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29568024, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29568025, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29568026, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29568027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29568028, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29568029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29568030, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29568031, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29568032, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29568033, 'pht': 3726}}" where mtr_portfolio_id = 29568017 and dashboard_run_id = 2772871 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`=29568017 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562255, 0.039215349978794826, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29568017_19-12-2025_15_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29568022, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29568023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29568024, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29568025, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29568026, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29568027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29568028, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29568029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29568030, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29568031, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29568032, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29568033, '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 = 29568563 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': 4250431, 'mtr_portfolio_id': 29568563, 'created_at': datetime.datetime(2025, 12, 19, 18, 0), 'result': '0.04741017060875666', 'result_long': None, 'result_double': None}] Qualite : 0.04741017060875666 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29568563 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29568563_19-12-2025_18_00_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29568563 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_P29568563_19-12-2025_18_00_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29568573, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29568574, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29568575, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29568576, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29568577, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29568578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29568579, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29568580, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29568581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29568582, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29568583, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29568584, 'pht': 3726}}" where mtr_portfolio_id = 29568563 and dashboard_run_id = 2772871 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`=29568563 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562256, 0.04741017060875666, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29568563_19-12-2025_18_00_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29568573, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29568574, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29568575, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29568576, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29568577, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29568578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29568579, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29568580, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29568581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29568582, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29568583, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29568584, '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 = 29569699 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': 4250713, 'mtr_portfolio_id': 29569699, 'created_at': datetime.datetime(2025, 12, 19, 17, 19, 30), 'result': '0.06554988990755059', 'result_long': None, 'result_double': None}] Qualite : 0.06554988990755059 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29569699 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29569699_19-12-2025_17_19_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29569699 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_P29569699_19-12-2025_17_19_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29569703, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29569704, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29569705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29569706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29569707, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29569708, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29569709, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29569710, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29569711, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29569712, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29569713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29569714, 'pht': 3726}}" where mtr_portfolio_id = 29569699 and dashboard_run_id = 2772871 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`=29569699 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562257, 0.06554988990755059, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29569699_19-12-2025_17_19_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29569703, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29569704, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29569705, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29569706, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29569707, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29569708, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29569709, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29569710, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29569711, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29569712, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29569713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29569714, '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 = 29570185 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': 4250757, 'mtr_portfolio_id': 29570185, 'created_at': datetime.datetime(2025, 12, 19, 18, 4, 30), 'result': '0.05350439556757996', 'result_long': None, 'result_double': None}] Qualite : 0.05350439556757996 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29570185 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29570185_19-12-2025_18_04_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29570185 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_P29570185_19-12-2025_18_04_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29570189, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29570190, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29570191, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29570192, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29570193, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29570194, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29570195, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29570196, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29570197, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29570198, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29570199, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29570200, 'pht': 3726}}" where mtr_portfolio_id = 29570185 and dashboard_run_id = 2772871 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`=29570185 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562258, 0.05350439556757996, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29570185_19-12-2025_18_04_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29570189, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29570190, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29570191, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29570192, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29570193, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29570194, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29570195, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29570196, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29570197, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29570198, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29570199, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29570200, '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 = 29570915 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': 4250894, 'mtr_portfolio_id': 29570915, 'created_at': datetime.datetime(2025, 12, 19, 18, 16, 58), 'result': '0.042094489677878946', 'result_long': None, 'result_double': None}] Qualite : 0.042094489677878946 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29570915 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29570915_19-12-2025_18_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29570915 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_P29570915_19-12-2025_18_16_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29570918, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29570919, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29570920, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29570921, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29570922, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29570923, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29570924, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29570925, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29570926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29570927, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29570928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29570929, 'pht': 3726}}" where mtr_portfolio_id = 29570915 and dashboard_run_id = 2772871 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`=29570915 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562259, 0.042094489677878946, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29570915_19-12-2025_18_16_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29570918, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29570919, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29570920, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29570921, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29570922, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29570923, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29570924, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29570925, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29570926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29570927, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29570928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29570929, '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 = 29571357 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': 4250920, 'mtr_portfolio_id': 29571357, 'created_at': datetime.datetime(2025, 12, 19, 18, 32, 59), 'result': '0.035466887502801615', 'result_long': None, 'result_double': None}] Qualite : 0.035466887502801615 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29571357 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29571357_19-12-2025_18_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29571357 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_P29571357_19-12-2025_18_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571361, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571362, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571363, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571364, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571365, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571366, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571367, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571368, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571369, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571370, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571371, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571372, 'pht': 3726}}" where mtr_portfolio_id = 29571357 and dashboard_run_id = 2772871 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`=29571357 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562260, 0.035466887502801615, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29571357_19-12-2025_18_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571361, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571362, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571363, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571364, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571365, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571366, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571367, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571368, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571369, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571370, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571371, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571372, '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 = 29571617 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': 4250958, 'mtr_portfolio_id': 29571617, 'created_at': datetime.datetime(2025, 12, 19, 18, 47), 'result': '0.04509067348043214', 'result_long': None, 'result_double': None}] Qualite : 0.04509067348043214 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29571617 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29571617_19-12-2025_18_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29571617 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_P29571617_19-12-2025_18_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571632, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571633, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571635, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571636, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571637, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571638, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571639, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571641, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571643, 'pht': 3726}}" where mtr_portfolio_id = 29571617 and dashboard_run_id = 2772870 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`=29571617 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562261, 0.04509067348043214, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29571617_19-12-2025_18_47_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571632, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571633, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571634, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571635, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571636, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571637, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571638, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571639, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571641, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571643, '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 = 29571950 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': 4251001, 'mtr_portfolio_id': 29571950, 'created_at': datetime.datetime(2025, 12, 19, 19, 2, 59), 'result': '0.05273583029770781', 'result_long': None, 'result_double': None}] Qualite : 0.05273583029770781 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29571950 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29571950_19-12-2025_19_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29571950 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_P29571950_19-12-2025_19_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571959, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571961, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571962, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571963, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571964, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571965, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571966, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571967, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571968, 'pht': 3726}}" where mtr_portfolio_id = 29571950 and dashboard_run_id = 2772870 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`=29571950 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562262, 0.05273583029770781, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29571950_19-12-2025_19_02_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29571957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29571958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29571959, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29571960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29571961, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29571962, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29571963, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29571964, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29571965, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29571966, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29571967, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29571968, '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 = 29572386 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': 4251087, 'mtr_portfolio_id': 29572386, 'created_at': datetime.datetime(2025, 12, 19, 19, 16, 58), 'result': '0.04299652380822086', 'result_long': None, 'result_double': None}] Qualite : 0.04299652380822086 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29572386 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29572386_19-12-2025_19_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29572386 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_P29572386_19-12-2025_19_16_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29572421, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29572422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29572423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29572424, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29572425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29572426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29572427, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29572428, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29572429, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29572430, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29572431, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29572432, 'pht': 3726}}" where mtr_portfolio_id = 29572386 and dashboard_run_id = 2772870 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`=29572386 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18562263, 0.04299652380822086, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29572386_19-12-2025_19_16_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29572421, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29572422, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29572423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29572424, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29572425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29572426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29572427, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29572428, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29572429, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29572430, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29572431, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29572432, '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 = 29572936 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 29572936 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29572936 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29572936 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29572936 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29572936 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29572936_19-12-2025_19_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29572936 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_P29572936_19-12-2025_19_19_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29572944, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29572945, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29572946, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29572948, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29572949, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29572950, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29572951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29572952, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29572953, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29572954, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29572955, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29572956, 'pht': 3726}}" where mtr_portfolio_id = 29572936 and dashboard_run_id = 2772870 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29564719,29565006,29565580,29566373,29566511,29566883,29567114,29567531,29568017,29568563,29569699,29570185,29570915,29571357,29571617,29571950,29572386,29572936) result : ((1400135021,), (1400135026,), (1400135062,), (1400135065,), (1400135101,), (1400135103,), (1400135137,), (1400135148,), (1400135151,), (1400135193,), (1400135195,), (1400135215,), (1400135217,), (1400135219,), (1400135221,), (1400135223,), (1400135239,), (1400135251,), (1400135256,), (1400135258,), (1400135287,), (1400135290,), (1400135293,), (1400135295,), (1400135299,), (1400135696,), (1400135701,), (1400135705,), (1400135708,), (1400135711,), (1400135713,), (1400135987,), (1400136173,), (1400136250,), (1400136313,), (1400136361,), (1400136409,), (1400136456,), (1400136708,), (1400136723,), (1400136727,), (1400136729,), (1400135942,), (1400135944,), (1400135975,), (1400135982,), (1400135984,), (1400136576,), (1400136608,), (1400136644,), (1400136678,), (1400136735,), (1400136737,), (1400136739,), (1400136748,), (1400136790,), (1400136825,), (1400136995,), (1400137007,), (1400137037,), (1400137059,), (1400137062,), (1400137140,), (1400137175,), (1400137212,), (1400137249,), (1400137383,), (1400137386,), (1400137405,), (1400137410,), (1400137412,), (1400137433,), (1400137435,), (1400137437,), (1400137440,), (1400137443,), (1400137444,), (1400137455,), (1400137457,), (1400137475,), (1400137510,), (1400137548,), (1400137700,), (1400137734,), (1400137771,), (1400138024,), (1400138056,), (1400138091,), (1400138123,), (1400138159,), (1400138196,), (1400138308,), (1400138311,), (1400138334,), (1400138380,), (1400138414,), (1400138452,), (1400138597,), (1400138599,), (1400138614,), (1400138649,), (1400138681,), (1400138694,), (1400138716,), (1400138721,), (1400138722,), (1400138725,), (1400138726,), (1400138728,), (1400138770,), (1400138785,), (1400138788,), (1400138791,), (1400138793,), (1400138827,), (1400138869,), (1400138816,), (1400138818,), (1400138820,), (1400138822,), (1400138825,), (1400138835,), (1400138837,), (1400138848,), (1400138860,), (1400138866,), (1400139654,), (1400139700,), (1400139715,), (1400146205,), (1400145844,), (1400146245,), (1400146247,), (1400146249,), (1400146392,), (1400146394,), (1400146396,), (1400146414,), (1400146417,), (1400146420,), (1400146422,), (1400146425,), (1400146451,), (1400146454,), (1400146466,), (1400146571,), (1400146569,), (1400146740,), (1400146762,), (1400146779,), (1400146877,), (1400146879,), (1400146881,), (1400146883,), (1400146886,), (1400146889,), (1400146941,), (1400146943,), (1400146945,), (1400146947,), (1400146950,), (1400146953,), (1400146963,), (1400146966,), (1400146969,), (1400146985,), (1400146987,), (1400146989,), (1400146991,), (1400146994,), (1400146997,), (1400147060,), (1400148533,), (1400148531,), (1400148532,), (1400148545,), (1400148547,), (1400148549,), (1400148552,), (1400148556,), (1400148559,), (1400148574,), (1400148575,), (1400148576,), (1400148577,), (1400148615,), (1400148616,), (1400148617,), (1400148618,), (1400148620,), (1400148622,), (1400148636,), (1400148657,), (1400148659,), (1400148662,), (1400148665,), (1400148685,), (1400148686,), (1400148688,), (1400148691,), (1400148695,), (1400148698,), (1400148724,), (1400148726,), (1400148728,), (1400148729,), (1400148731,), (1400148739,), (1400148740,), (1400148741,), (1400148742,), (1400148839,), (1400148838,), (1400148864,), (1400148866,), (1400148868,), (1400148869,), (1400148873,), (1400148883,), (1400148884,), (1400148906,), (1400148937,), (1400148969,), (1400149000,), (1400149487,), (1400149488,), (1400149506,), (1400149541,), (1400149871,), (1400149928,), (1400149946,), (1400149947,), (1400149950,), (1400149953,), (1400149964,), (1400149965,), (1400149966,), (1400149967,), (1400149970,), (1400149973,), (1400150029,), (1400150032,), (1400150036,), (1400150051,), (1400150065,), (1400150070,), (1400150108,), (1400150109,), (1400150117,), (1400150120,), (1400150124,), (1400150128,), (1400150130,), (1400150132,), (1400150135,), (1400150143,), (1400150145,), (1400150146,), (1400150147,), (1400150180,), (1400150181,), (1400150182,), (1400150193,), (1400150204,), (1400150209,), (1400150215,), (1400150216,), (1400150217,), (1400150218,), (1400150220,), (1400150233,), (1400150234,), (1400150235,), (1400150236,), (1400150239,), (1400150263,), (1400150264,), (1400150265,), (1400150266,), (1400150268,), (1400150270,), (1400150297,), (1400150298,), (1400150299,), (1400150300,), (1400150314,), (1400150316,), (1400150317,), (1400150318,), (1400150321,), (1400150324,), (1400150388,), (1400150381,), (1400150383,), (1400150384,), (1400150385,), (1400150397,), (1400150398,), (1400150399,), (1400150400,), (1400150416,), (1400150417,), (1400150418,), (1400150419,), (1400150422,), (1400150425,), (1400150441,), (1400150442,), (1400150443,), (1400150477,), (1400150484,), (1400150485,), (1400150486,), (1400150489,), (1400150492,), (1400150501,), (1400150503,), (1400150505,), (1400150509,), (1400150512,), (1400150516,), (1400150532,), (1400150534,), (1400150541,), (1400150542,), (1400150543,), (1400150545,), (1400150547,), (1400150550,), (1400150553,), (1400150572,), (1400150573,), (1400150574,), (1400150575,), (1400150576,), (1400150577,), (1400150645,), (1400150646,), (1400150647,), (1400150648,), (1400150668,), (1400150669,), (1400150670,), (1400150671,), (1400150674,), (1400150676,), (1400150692,), (1400150693,), (1400150694,), (1400150695,), (1400150698,), (1400150700,), (1400150706,), (1400150707,), (1400150708,), (1400150709,), (1400150744,), (1400150745,), (1400150746,), (1400150747,), (1400150750,), (1400150753,), (1400150775,), (1400150776,), (1400150778,), (1400150781,), (1400151718,), (1400151501,), (1400151564,), (1400151625,), (1400151683,), (1400151863,), (1400151901,), (1400151906,), (1400151907,), (1400152297,), (1400152307,), (1400152308,), (1400152328,), (1400152347,), (1400152350,), (1400152723,), (1400152769,), (1400152800,), (1400152994,), (1400153028,), (1400153065,), (1400153071,), (1400153074,), (1400153241,), (1400153274,), (1400153312,), (1400153349,), (1400153602,), (1400153645,), (1400153667,), (1400153682,), (1400153686,), (1400153691,), (1400153733,), (1400153734,), (1400153735,), (1400153853,), (1400153874,), (1400153896,), (1400153953,), (1400153966,), (1400154056,), (1400154058,), (1400154132,), (1400154221,), (1400155044,), (1400155046,), (1400155048,), (1400155052,), (1400155069,), (1400155434,), (1400155455,), (1400155456,), (1400155491,), (1400155505,), (1400155507,), (1400155562,), (1400155570,), (1400155577,), (1400155582,), (1400155693,), (1400155758,), (1400155823,), (1400155889,), (1400155919,), (1400155921,), (1400156012,), (1400156034,), (1400156035,), (1400156473,), (1400156504,), (1400156536,), (1400156566,), (1400156597,), (1400156930,), (1400156927,), (1400156928,), (1400156929,), (1400157026,), (1400157147,), (1400157253,), (1400158138,), (1400158171,), (1400158196,), (1400158197,), (1400158245,), (1400158638,), (1400158639,), (1400158641,), (1400158643,), (1400158646,), (1400158649,), (1400158669,), (1400164074,), (1400164541,), (1400164578,), (1400165062,), (1400165097,), (1400165130,), (1400165166,), (1400165199,), (1400165774,), (1400165780,), (1400165782,), (1400165804,), (1400165823,), (1400166081,), (1400166116,), (1400166169,), (1400166256,), (1400167277,), (1400167343,), (1400167410,), (1400168146,), (1400168216,), (1400168281,), (1400168346,), (1400168414,), (1400168453,), (1400168588,), (1400168589,), (1400168590,), (1400168593,), (1400168611,), (1400168646,), (1400168771,), (1400168807,), (1400168841,), (1400168917,), (1400168918,), (1400168919,), (1400168930,), (1400168968,), (1400168998,), (1400169076,), (1400169078,), (1400169080,), (1400169082,), (1400169084,), (1400169085,), (1400169123,), (1400169129,), (1400169134,), (1400169152,), (1400169160,), (1400169172,), (1400169173,), (1400169174,), (1400169175,), (1400169208,), (1400169210,), (1400169212,), (1400169214,), (1400169247,), (1400169249,), (1400169251,), (1400169253,), (1400169256,), (1400169257,), (1400169287,), (1400169288,), (1400169304,), (1400169306,), (1400169309,), (1400169349,), (1400169339,), (1400169341,), (1400169342,), (1400169343,), (1400169346,), (1400169359,), (1400169361,), (1400169363,), (1400169367,), (1400169370,), (1400169385,), (1400169387,), (1400169388,), (1400169389,), (1400169402,), (1400169403,), (1400169404,), (1400169407,), (1400169410,), (1400169413,), (1400169433,), (1400169435,), (1400169437,), (1400169439,), (1400169441,), (1400169451,), (1400169453,), (1400169455,), (1400169457,), (1400169459,), (1400169480,), (1400169481,), (1400169482,), (1400169483,), (1400169486,), (1400169506,), (1400169507,), (1400169510,), (1400169513,), (1400169581,), (1400169584,), (1400169587,), (1400169588,), (1400169600,), (1400169601,), (1400169602,), (1400169603,), (1400169605,), (1400169634,), (1400169635,), (1400169636,), (1400169648,), (1400169649,), (1400169650,), (1400169652,), (1400169655,), (1400169658,), (1400169678,), (1400169680,), (1400169681,), (1400169682,), (1400169685,), (1400169688,), (1400169695,), (1400169696,), (1400169697,), (1400169698,), (1400169727,), (1400169730,), (1400169732,), (1400169733,), (1400169736,), (1400169737,), (1400173468,), (1400173979,), (1400173990,), (1400174009,), (1400174041,), (1400174076,), (1400174098,), (1400174356,), (1400174358,), (1400174360,), (1400174376,), (1400174378,), (1400174380,), (1400174382,), (1400174385,), (1400174387,), (1400174395,), (1400174397,), (1400174399,), (1400174401,), (1400174404,), (1400174407,), (1400174422,), (1400174428,), (1400174430,), (1400174432,), (1400174435,), (1400174456,), (1400174458,), (1400174460,), (1400174462,), (1400174464,), (1400174467,), (1400174515,), (1400174517,), (1400174519,), (1400174521,), (1400174524,), (1400174573,), (1400174576,), (1400174580,), (1400174583,), (1400174586,), (1400174592,), (1400174664,), (1400174665,), (1400174667,), (1400174669,), (1400174672,), (1400174833,), (1400174869,), (1400174892,), (1400174894,), (1400174897,), (1400174899,), (1400174942,), (1400174946,), (1400174955,), (1400174958,), (1400174961,), (1400175195,), (1400175197,), (1400175200,), (1400175334,), (1400175330,), (1400175332,), (1400175534,), (1400175536,), (1400175538,), (1400175540,), (1400175543,), (1400175553,), (1400175556,), (1400175558,), (1400175560,), (1400175571,), (1400175573,), (1400175575,), (1400175577,), (1400175580,), (1400175590,), (1400175591,), (1400175593,), (1400175595,), (1400175598,), (1400175601,), (1400175618,), (1400175620,), (1400175622,), (1400175624,), (1400175627,), (1400175636,), (1400175638,), (1400175640,), (1400175642,), (1400175645,), (1400175648,), (1400175678,), (1400175679,), (1400175681,), (1400175713,), (1400175697,), (1400175701,), (1400175703,), (1400175706,), (1400175710,), (1400175730,), (1400175732,), (1400175734,), (1400175736,), (1400175747,), (1400175749,), (1400175751,), (1400175753,), (1400175756,), (1400175759,), (1400175774,), (1400175776,), (1400175778,), (1400175780,), (1400175790,), (1400175792,), (1400175794,), (1400175796,), (1400175799,), (1400175802,), (1400175825,), (1400175826,), (1400175828,), (1400175830,), (1400175842,), (1400175844,), (1400175846,), (1400175849,), (1400175852,), (1400175855,), (1400175863,), (1400175866,), (1400175867,), (1400175868,), (1400175871,), (1400175873,), (1400175875,), (1400175878,), (1400175881,), (1400175889,), (1400175891,), (1400175893,), (1400175937,), (1400175941,), (1400175943,), (1400175945,), (1400175948,), (1400175973,), (1400175975,), (1400175977,), (1400175979,), (1400175982,), (1400175991,), (1400175993,), (1400175995,), (1400175997,), (1400176000,), (1400176001,), (1400176027,), (1400176029,), (1400176031,), (1400176033,), (1400176036,), (1400176046,), (1400176048,), (1400176051,), (1400176053,), (1400176056,), (1400176059,), (1400176085,), (1400176079,), (1400176081,), (1400176083,), (1400176095,), (1400176096,), (1400176098,), (1400176100,), (1400176103,), (1400176106,), (1400176126,), (1400176136,), (1400176138,), (1400176140,), (1400176153,), (1400176155,), (1400176156,), (1400176158,), (1400176160,), (1400176163,), (1400176186,), (1400176192,), (1400176194,), (1400176196,), (1400176199,), (1400176210,), (1400176212,), (1400176213,), (1400176215,), (1400176218,), (1400176219,), (1400176236,), (1400176240,), (1400176242,), (1400176244,), (1400176247,), (1400176255,), (1400176258,), (1400176259,), (1400176261,), (1400176297,), (1400176299,), (1400176301,), (1400176303,), (1400176306,), (1400176309,), (1400176318,), (1400176319,), (1400176321,), (1400176323,), (1400176343,), (1400176344,), (1400176346,), (1400176348,), (1400176351,), (1400176353,), (1400176365,), (1400176368,), (1400176371,), (1400176375,), (1400176379,), (1400176385,), (1400176389,), (1400176390,), (1400176391,), (1400176393,), (1400176397,), (1400176399,), (1400176402,), (1400176404,), (1400176406,), (1400176410,), (1400176899,), (1400176968,), (1400177046,), (1400177135,), (1400177784,), (1400177740,), (1400177751,), (1400178058,), (1400178090,), (1400178124,), (1400178158,), (1400178193,), (1400178227,), (1400178362,), (1400178382,), (1400178390,), (1400178401,), (1400178428,), (1400178430,), (1400178432,), (1400178434,), (1400178437,), (1400178440,), (1400178449,), (1400178452,), (1400178455,), (1400178459,), (1400178475,), (1400178478,), (1400178480,), (1400178494,), (1400178496,), (1400178498,), (1400178500,), (1400178503,), (1400178505,), (1400178518,), (1400178533,), (1400178536,), (1400178565,), (1400178569,), (1400178571,), (1400178601,), (1400178608,), (1400178619,), (1400178621,), (1400178624,), (1400178626,), (1400178665,), (1400178667,), (1400178670,), (1400178673,), (1400178697,), (1400178710,), (1400178712,), (1400178719,), (1400178724,), (1400179025,), (1400179027,), (1400179029,), (1400179031,), (1400179035,), (1400179038,), (1400179090,), (1400179092,), (1400179094,), (1400179096,), (1400179240,), (1400179243,), (1400179246,), (1400179249,), (1400179254,), (1400179258,), (1400179283,), (1400179277,), (1400179279,), (1400179281,), (1400179320,), (1400179322,), (1400179324,), (1400179326,), (1400179328,), (1400179331,), (1400179534,), (1400179536,), (1400179538,), (1400179540,), (1400179574,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'19122025': {'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([29572936]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] map_info['map_portfolio_photo'] : {29572936: [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320, 1400179281, 1400179279, 1400179277]} final : True mtd_id 4302 list_pids : [1400179574, 1400179540, 1400179538, 1400179536, 1400179534, 1400179331, 1400179328, 1400179326, 1400179324, 1400179322, 1400179320] Looping around the photos to save general results len do output : 1 /29572936Didn'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, '4251140') ('4302', '29572936', '1400179574', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179540', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179538', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179536', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179534', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179331', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179328', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179326', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179324', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179322', None, None, None, None, None, '4251140') ('4302', None, None, None, None, None, None, None, '4251140') ('4302', '29572936', '1400179320', None, None, None, None, None, '4251140') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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, '29572936', 'None', None, None, None, None, '4251140'), ('4302', '29572936', '1400179574', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179540', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179538', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179536', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179534', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179331', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179328', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179326', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179324', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179322', None, None, None, None, None, '4251140'), ('4302', '29572936', '1400179320', None, None, None, None, None, '4251140')] time used for this insertion : 0.018902301788330078 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.549962043762207 time spend to save output : 0.019036054611206055 total time spend for step 5 : 1.568998098373413 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 (4251140) 2.07user 2.45system 0:09.69elapsed 46%CPU (0avgtext+0avgdata 165972maxresident)k 27528inputs+7680outputs (218major+72716minor)pagefaults 0swaps