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 : 2456176 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 (3947277) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3947277) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839774 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3947277'] with mtr_portfolio_ids : ['27839774'] and first list_photo_ids : [] new path : /proc/2456176/ Name: python3 Umask: 0002 State: R (running) Tgid: 2456176 Ngid: 0 Pid: 2456176 PPid: 2456175 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2456176 NSpid: 2456176 NSpgid: 2454845 NSsid: 2454845 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97780 kB VmRSS: 97780 kB RssAnon: 59848 kB RssFile: 37932 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 588 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: 50 nonvoluntary_ctxt_switches: 88 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2456176', 'Ngid': '0', 'Pid': '2456176', 'PPid': '2456175', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2456176', 'NSpid': '2456176', 'NSpgid': '2454845', 'NSsid': '2454845', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97780 kB', 'VmRSS': '97780 kB', 'RssAnon': '59848 kB', 'RssFile': '37932 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '588 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': '50', 'nonvoluntary_ctxt_switches': '88'} ('datou_batch_current', '2456176', '1106868', '0', '1106868', '865620', '97780', b'', 'marlene', '3947277') 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 (27839774) 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 (3947277 ) ) 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 (27839774) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1389629108, 'portfolio_id': 27839774}, {'photo_id': 1389629107, 'portfolio_id': 27839774}, {'photo_id': 1389629106, 'portfolio_id': 27839774}, {'photo_id': 1389627125, 'portfolio_id': 27839774}, {'photo_id': 1389627124, 'portfolio_id': 27839774}, {'photo_id': 1389627123, 'portfolio_id': 27839774}, {'photo_id': 1389627074, 'portfolio_id': 27839774}, {'photo_id': 1389627071, 'portfolio_id': 27839774}, {'photo_id': 1389627070, 'portfolio_id': 27839774}] map_portfolio_id_photo_id: {27839774: [1389629108, 1389629107, 1389629106, 1389627125, 1389627124, 1389627123, 1389627074, 1389627071, 1389627070]} ##### 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.0519261360168457 #### 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 Wed Oct 15 19:26:58 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 (27839774) 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 : 27839774 get user id for portfolio 27839774 get sub ptf for main ptf 27839774, type 3726 and hashtags ['kraft', 'mal_croppe', 'metal', 'flou', 'autre_refus', 'environnement', 'Teint_Dans_La_Masse', 'Carton_brun', 'Carton_gris', 'papier', 'cartonnette', 'plastique'] 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`=27839774 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','metal','flou','autre_refus','environnement','Teint_Dans_La_Masse','Carton_brun','Carton_gris','papier','cartonnette','plastique')) 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`=27839774 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','metal','flou','autre_refus','environnement','Teint_Dans_La_Masse','Carton_brun','Carton_gris','papier','cartonnette','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 27839774, 'sub_port_id': 27839785, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787189, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'flou': {'main_port_id': 27839774, 'sub_port_id': 27839786, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787190, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'plastique': {'main_port_id': 27839774, 'sub_port_id': 27839787, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787191, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'Carton_gris': {'main_port_id': 27839774, 'sub_port_id': 27839788, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787192, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'Teint_Dans_La_Masse': {'main_port_id': 27839774, 'sub_port_id': 27839789, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787193, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'environnement': {'main_port_id': 27839774, 'sub_port_id': 27839790, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787194, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'Carton_brun': {'main_port_id': 27839774, 'sub_port_id': 27839791, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787195, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'papier': {'main_port_id': 27839774, 'sub_port_id': 27839792, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787196, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'cartonnette': {'main_port_id': 27839774, 'sub_port_id': 27839793, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787197, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'autre_refus': {'main_port_id': 27839774, 'sub_port_id': 27839794, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787198, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'metal': {'main_port_id': 27839774, 'sub_port_id': 27839795, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787199, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}, 'mal_croppe': {'main_port_id': 27839774, 'sub_port_id': 27839796, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787200, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27839785 , 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=27839774 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 (27839785) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839786 , 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=27839774 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 (27839786) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839787 , 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=27839774 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 (27839787) result : ((1389628625,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839788 , 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=27839774 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 (27839788) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839789 , 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=27839774 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 (27839789) result : ((1389628414,), (1389628415,), (1389628622,), (1389628623,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839790 , 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=27839774 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 (27839790) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839791 , 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=27839774 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 (27839791) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839792 , 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=27839774 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 (27839792) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839793 , 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=27839774 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 (27839793) result : ((1389628624,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839794 , 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=27839774 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 (27839794) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839795 , 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=27839774 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 (27839795) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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 27839796 , 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=27839774 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 (27839796) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27839774) result : ((1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) 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`=27839774 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','metal','flou','autre_refus','environnement','Teint_Dans_La_Masse','Carton_brun','Carton_gris','papier','cartonnette','plastique')) 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`=27839774 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','metal','flou','autre_refus','environnement','Teint_Dans_La_Masse','Carton_brun','Carton_gris','papier','cartonnette','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 27839774, 'sub_port_id': 27839797, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787201, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'flou': {'main_port_id': 27839774, 'sub_port_id': 27839798, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787202, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'plastique': {'main_port_id': 27839774, 'sub_port_id': 27839799, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787203, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'Carton_gris': {'main_port_id': 27839774, 'sub_port_id': 27839800, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787204, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 27839774, 'sub_port_id': 27839801, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787205, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'environnement': {'main_port_id': 27839774, 'sub_port_id': 27839802, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787206, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'Carton_brun': {'main_port_id': 27839774, 'sub_port_id': 27839803, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787207, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'papier': {'main_port_id': 27839774, 'sub_port_id': 27839804, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787208, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'cartonnette': {'main_port_id': 27839774, 'sub_port_id': 27839805, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787209, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'autre_refus': {'main_port_id': 27839774, 'sub_port_id': 27839806, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787210, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'metal': {'main_port_id': 27839774, 'sub_port_id': 27839807, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787211, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}, 'mal_croppe': {'main_port_id': 27839774, 'sub_port_id': 27839808, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18787212, 'last_updated_at': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_desc': datetime.datetime(2025, 10, 15, 19, 19, 27), 'last_updated_at_asc': datetime.datetime(2025, 10, 15, 19, 19, 27)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839797,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839785 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839798,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839786 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839799,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839787 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839800,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839788 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839801,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839789 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839802,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839790 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839803,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839791 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839804,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839792 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839805,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839793 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839806,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839794 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839807,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839795 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27839808,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27839796 lien utilise dans velours : https://marlene.fotonower.com/velours/27839797,27839798,27839799,27839800,27839801,27839802,27839803,27839804,27839805,27839806,27839807,27839808?tags=kraft,flou,plastique,Carton_gris,Teint_Dans_La_Masse,environnement,Carton_brun,papier,cartonnette,autre_refus,metal,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27839774]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1389629108, 1389629107, 1389629106] map_info['map_portfolio_photo'] : {27839774: [1389629108, 1389629107, 1389629106, 1389627125, 1389627124, 1389627123, 1389627074, 1389627071, 1389627070]} final : False mtd_id 4302 list_pids : [1389629108, 1389629107, 1389629106] Looping around the photos to save general results len do output : 1 /27839774. 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, '3947277') ('4302', '27839774', '1389629108', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629107', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629106', None, None, None, None, None, '3947277') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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, '27839774', "{'kraft': 27839785, 'flou': 27839786, 'plastique': 27839787, 'Carton_gris': 27839788, 'Teint_Dans_La_Masse': 27839789, 'environnement': 27839790, 'Carton_brun': 27839791, 'papier': 27839792, 'cartonnette': 27839793, 'autre_refus': 27839794, 'metal': 27839795, 'mal_croppe': 27839796}", None, None, None, None, '3947277'), ('4302', '27839774', '1389629108', None, None, None, None, None, '3947277'), ('4302', '27839774', '1389629107', None, None, None, None, None, '3947277'), ('4302', '27839774', '1389629106', None, None, None, None, None, '3947277')] time used for this insertion : 0.03749561309814453 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.095902919769287 time spend to save output : 0.03770637512207031 total time spend for step 1 : 5.133609294891357 step2:final Wed Oct 15 19:27:04 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 (27839774) 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 27839774 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1389627074,1389627071,1389627070,1389627125,1389627124,1389627123,1389629108,1389629107,1389629106); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27839774]) Inside saveOutput : final : False verbose : True original output for save of step final : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ('0.01383787578910416',)} new output for save of step final : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ('0.01383787578910416',)} [1389629108, 1389629107, 1389629106] map_info['map_portfolio_photo'] : {27839774: [1389629108, 1389629107, 1389629106, 1389627125, 1389627124, 1389627123, 1389627074, 1389627071, 1389627070]} final : False mtd_id 4302 list_pids : [1389629108, 1389629107, 1389629106] Looping around the photos to save general results len do output : 3 /1389629108.Didn't retrieve data . /1389629107.Didn't retrieve data . /1389629106.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, '3947277') ('4302', '27839774', '1389629108', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629107', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629106', None, None, None, None, None, '3947277') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '27839774', '1389629108', '0.01383787578910416', None, None, None, None, '3947277'), ('4302', '27839774', '1389629107', '0.01383787578910416', None, None, None, None, '3947277'), ('4302', '27839774', '1389629106', '0.01383787578910416', None, None, None, None, '3947277')] time used for this insertion : 0.03814196586608887 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.24487781524658203 time spend to save output : 0.038458824157714844 total time spend for step 2 : 0.2833366394042969 step3:velours_tree Wed Oct 15 19:27:04 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 : {27839774: [{'kraft': 27839785, 'flou': 27839786, 'plastique': 27839787, 'Carton_gris': 27839788, 'Teint_Dans_La_Masse': 27839789, 'environnement': 27839790, 'Carton_brun': 27839791, 'papier': 27839792, 'cartonnette': 27839793, 'autre_refus': 27839794, 'metal': 27839795, 'mal_croppe': 27839796}]} input_args_next_step : {27839774: ()} output_args : {27839774: [{'kraft': 27839785, 'flou': 27839786, 'plastique': 27839787, 'Carton_gris': 27839788, 'Teint_Dans_La_Masse': 27839789, 'environnement': 27839790, 'Carton_brun': 27839791, 'papier': 27839792, 'cartonnette': 27839793, 'autre_refus': 27839794, 'metal': 27839795, 'mal_croppe': 27839796}]} args : 27839774 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': 27839785, 'flou': 27839786, 'plastique': 27839787, 'Carton_gris': 27839788, 'Teint_Dans_La_Masse': 27839789, 'environnement': 27839790, 'Carton_brun': 27839791, 'papier': 27839792, 'cartonnette': 27839793, 'autre_refus': 27839794, 'metal': 27839795, 'mal_croppe': 27839796},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27839774) 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([27839774]) 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.3088204860687256 time spend to save output : 5.435943603515625e-05 total time spend for step 3 : 0.30887484550476074 step4:send_mail_cod Wed Oct 15 19:27:04 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 : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ('0.01383787578910416',)} input_args_next_step : {1389629108: ()} output_args : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ('0.01383787578910416',)} args : 1389629108 depend.output_id : 0 input_args_next_step : {1389629108: ('0.01383787578910416',), 1389629107: ()} output_args : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ('0.01383787578910416',)} args : 1389629107 depend.output_id : 0 input_args_next_step : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ()} output_args : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ('0.01383787578910416',)} args : 1389629106 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 : {27839774: [{'kraft': 27839785, 'flou': 27839786, 'plastique': 27839787, 'Carton_gris': 27839788, 'Teint_Dans_La_Masse': 27839789, 'environnement': 27839790, 'Carton_brun': 27839791, 'papier': 27839792, 'cartonnette': 27839793, 'autre_refus': 27839794, 'metal': 27839795, 'mal_croppe': 27839796}]} input_args_next_step : {1389629108: ('0.01383787578910416',), 1389629107: ('0.01383787578910416',), 1389629106: ('0.01383787578910416',), 27839774: ()} output_args : {27839774: [{'kraft': 27839785, 'flou': 27839786, 'plastique': 27839787, 'Carton_gris': 27839788, 'Teint_Dans_La_Masse': 27839789, 'environnement': 27839790, 'Carton_brun': 27839791, 'papier': 27839792, 'cartonnette': 27839793, 'autre_refus': 27839794, 'metal': 27839795, 'mal_croppe': 27839796}]} args : 27839774 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 :4, first value : ('0.01383787578910416',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27839774) 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 (1389629108,1389629107,1389629106) Found this number of photos: 3 ##### Call download_photos : nb_thread : 5 begin to download photo : 1389629106 begin to download photo : 1389629107 begin to download photo : 1389629108 download finish for photo 1389629108 download finish for photo 1389629106 download finish for photo 1389629107 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette278397851760549224/ imagette278397861760549224/ length of list_filenames : 3 ; length of list_pids : 3 ; length of list_args : 3 results_Auto_P27839774_15-10-2025_19_27_04.pdf 27839785 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=27839785 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278397851760549224 27839786 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=27839786 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278397861760549224 27839787 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=27839787 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389628625: '1760548986_2491102_1389627070_8cc857cb98d82157b7cd7a7368435515_rle_crop_3999036210_0.png'} change filename to text .imagette278397871760549224/ imagette278397871760549224/1760548986_2491102_1389627070_8cc857cb98d82157b7cd7a7368435515_rle_crop_3999036210_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/bb6d4e6c19823158c689380a64f27279_83377712.png imagette278397871760549224 27839793 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=27839793 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389628624: '1760548986_2491102_1389627074_a5985910d59cfe91156bfdaf92ae1682_rle_crop_3999036187_0.png'} change filename to text .imagette278397931760549224/ imagette278397931760549224/1760548986_2491102_1389627074_a5985910d59cfe91156bfdaf92ae1682_rle_crop_3999036187_0.png.png imagette278397941760549225/ imagette278397951760549225/ imagette278397961760549225/ imagette278397881760549225/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/ec96e8261c4d5f70ec6b0e4dc760da80_34263299.png imagette278397931760549224 27839794 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=27839794 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278397941760549225 27839795 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=27839795 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278397951760549225 27839796 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=27839796 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278397961760549225 27839788 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=27839788 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278397881760549225 27839789 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=27839789 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1389628414: '1760548864_2483258_1389627124_f433992e3dd13a4de1efe1a00175d9af_rle_crop_3999036034_0.png', 1389628415: '1760548864_2483258_1389627123_593a9c2f6331084b94c35891bd222753_rle_crop_3999036041_0.png', 1389628622: '1760548986_2491102_1389627074_a5985910d59cfe91156bfdaf92ae1682_rle_crop_3999036184_0.png', 1389628623: '1760548986_2491102_1389627071_323bfc67f2f17f6803bffdb31afdfcb6_rle_crop_3999036200_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/b5087a8a36ea3247fa9760c189ab4216_18892448.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/0c64728f8664fe963eb04749265f233e_27343947.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/d54accff886267b84233c9cd592f5ff3_64874925.png change filename to text .imagette278397891760549225/ imagette278397891760549225/1760548864_2483258_1389627123_593a9c2f6331084b94c35891bd222753_rle_crop_3999036041_0.png.png imagette278397891760549225/1760548864_2483258_1389627124_f433992e3dd13a4de1efe1a00175d9af_rle_crop_3999036034_0.png.png imagette278397891760549225/1760548986_2491102_1389627071_323bfc67f2f17f6803bffdb31afdfcb6_rle_crop_3999036200_0.png.png imagette278397891760549225/1760548986_2491102_1389627074_a5985910d59cfe91156bfdaf92ae1682_rle_crop_3999036184_0.png.png imagette278397911760549225/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/e0af3777d52bffa536ccc072dd8f9ba4_69800189.png imagette278397891760549225 27839791 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=27839791 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette278397911760549225 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27839774 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27839797,27839798,27839799,27839800,27839801,27839802,27839803,27839804,27839805,27839806,27839807,27839808?tags=kraft,flou,plastique,Carton_gris,Teint_Dans_La_Masse,environnement,Carton_brun,papier,cartonnette,autre_refus,metal,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1389629108] : ('0.01383787578910416',) no score found for photo 1389629108 We are sending mail with results at report@fotonower.com args[1389629107] : ('0.01383787578910416',) no score found for photo 1389629107 We are sending mail with results at report@fotonower.com args[1389629106] : ('0.01383787578910416',) no score found for photo 1389629106 We are sending mail with results at report@fotonower.com refus_total : 0.01383787578910416 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=27839774 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_P27839774_15-10-2025_19_27_04.pdf results_Auto_P27839774_15-10-2025_19_27_04.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27839774_15-10-2025_19_27_04.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','27839774','results_Auto_P27839774_15-10-2025_19_27_04.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27839774_15-10-2025_19_27_04.pdf','pdf','','0.07','0.01383787578910416') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27839774]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1389629108, 1389629107, 1389629106] map_info['map_portfolio_photo'] : {27839774: [1389629108, 1389629107, 1389629106, 1389627125, 1389627124, 1389627123, 1389627074, 1389627071, 1389627070]} final : False mtd_id 4302 list_pids : [1389629108, 1389629107, 1389629106] 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, '3947277') ('4302', '27839774', '1389629108', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629107', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629106', None, None, None, None, None, '3947277') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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', '27839774', '1389629108', None, None, None, None, None, '3947277'), ('4302', '27839774', '1389629107', None, None, None, None, None, '3947277'), ('4302', '27839774', '1389629106', None, None, None, None, None, '3947277')] time used for this insertion : 0.036467790603637695 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.788980484008789 time spend to save output : 0.03662729263305664 total time spend for step 4 : 1.8256077766418457 step5:split_time_score Wed Oct 15 19:27:06 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 : ['27839774'] 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 : [('27839774',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27839774) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1389629108: {'path': 'temp/1760549224_2456176_1389629108_720bd5535207da6d2ec635c3025d0fec.jpg', 'extension': 'jpg'}, 1389629106: {'path': 'temp/1760549224_2456176_1389629106_5da8bb41919c06490158c3951a0abd51.jpg', 'extension': 'jpg'}, 1389629107: {'path': 'temp/1760549224_2456176_1389629107_82769ef0200a5b4c5281a8cd17c7c41c.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 = 27839774; (('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 = 27839774 group by h (('19', 9),) 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=27839774 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 (27839774) 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 (27839774) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15102025 27839774 Nombre de photos uploadées : 9 / 23040 (0%) 15102025 27839774 Nombre de photos taguées (types de déchets): 0 / 9 (0%) 15102025 27839774 Nombre de photos taguées (volume) : 0 / 9 (0%) [{'photo_id': 1389627074, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/a5985910d59cfe91156bfdaf92ae1682.jpg', 'username': None, 'uploaded_at': 1760548572, 'text': 'image_15102025_19_15_04_010139m0.jpg 1e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1389627071, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/323bfc67f2f17f6803bffdb31afdfcb6.jpg', 'username': None, 'uploaded_at': 1760548572, 'text': 'image_15102025_19_15_35_010137m0.jpg 2e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1389627070, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/8cc857cb98d82157b7cd7a7368435515.jpg', 'username': None, 'uploaded_at': 1760548572, 'text': 'image_15102025_19_15_44_009124m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1389627125, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/15/fb4ab06841e352a010b25d2e4f6c8cc6.jpg', 'username': None, 'uploaded_at': 1760548628, 'text': 'image_15102025_19_15_54_010134m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ????????? elapsed_time : fill_and_build_computed_from_old_data 0.0004863739013671875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27839774, '2025-10-15' ) 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 (2450453,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6624433994293213 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= 2450453 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27818432, 'dashboard_result_id': 16425679, '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_P27818432_15-10-2025_06_06_06.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818433, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818434, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818436, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818437, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818439, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818440, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818442, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818443, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818444, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27818482, 'dashboard_result_id': 16425680, '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_P27818482_15-10-2025_06_06_34.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27818486, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818487, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818492, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818493, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818497, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27818873, 'dashboard_result_id': 16425681, '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_P27818873_15-10-2025_06_07_34.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27818878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818879, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818883, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818884, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818885, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818889, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27819596, 'dashboard_result_id': 16425682, '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_P27819596_15-10-2025_06_08_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27819599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27819600, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27819601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27819602, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27819603, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27819604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27819605, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27819606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27819607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27819608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27819609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27819610, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27820246, 'dashboard_result_id': 16425683, '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_P27820246_15-10-2025_06_08_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27820247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820248, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820251, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820252, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820253, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820254, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820255, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820256, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820257, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820258, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27820351, 'dashboard_result_id': 16425684, '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_P27820351_15-10-2025_06_09_33.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820378, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820379, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820380, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820381, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820382, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820384, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820385, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820386, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820387, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820388, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820389, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27820632, 'dashboard_result_id': 16425685, '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_P27820632_15-10-2025_06_10_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820662, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820665, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820672, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27820994, 'dashboard_result_id': 16425686, '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_P27820994_15-10-2025_06_11_05.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27821000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821004, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821007, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821011, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27821801, 'dashboard_result_id': 16425687, '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_P27821801_15-10-2025_05_49_27.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821802, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821803, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821808, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821809, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821810, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821812, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821813, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27821853, 'dashboard_result_id': 16425688, '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_P27821853_15-10-2025_06_03_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821855, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821856, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821857, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821859, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821860, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821861, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821862, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821863, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821865, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821866, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27822193, 'dashboard_result_id': 16425689, '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_P27822193_15-10-2025_06_19_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822198, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822199, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822200, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822201, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27822202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822209, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27822707, 'dashboard_result_id': 16425690, '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_P27822707_15-10-2025_06_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27822731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822733, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822736, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822738, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822740, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822742, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27823105, 'dashboard_result_id': 16425691, '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_P27823105_15-10-2025_07_59_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27823137, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27823138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27823139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27823140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27823141, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27823142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27823143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27823144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27823145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27823146, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27823147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27823148, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27834475, 'dashboard_result_id': 16425692, '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_P27834475_15-10-2025_16_51_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27834476, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834479, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834481, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834485, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834487, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27834822, 'dashboard_result_id': 16425693, '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_P27834822_15-10-2025_17_03_37.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834823, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834824, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834827, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27834831, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834833, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834834, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27835066, 'dashboard_result_id': 16425694, '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_P27835066_15-10-2025_17_25_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27835071, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27835072, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27835073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27835074, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27835075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27835076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27835077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27835078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27835079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27835080, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27835082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27835083, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27836024, 'dashboard_result_id': 16425695, '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_P27836024_15-10-2025_18_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836028, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836031, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836032, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836036, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27836830, 'dashboard_result_id': 16425696, '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_P27836830_15-10-2025_18_19_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27836832, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836835, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836837, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836839, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836840, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836841, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836842, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836843, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27837435, 'dashboard_result_id': 16425697, '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_P27837435_15-10-2025_18_35_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27837464, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27837465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27837466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27837467, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27837468, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27837469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27837470, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27837471, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27837472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27837473, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27837474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27837475, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27837819, 'dashboard_result_id': 16425698, '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_P27837819_15-10-2025_18_49_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27837849, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27837850, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27837851, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27837852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27837853, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27837854, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27837855, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27837856, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27837857, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27837858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27837859, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27837860, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27838415, 'dashboard_result_id': 16425699, '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_P27838415_15-10-2025_19_03_04.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27838439, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27838440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27838441, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27838442, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27838443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27838444, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27838445, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27838446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27838447, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27838448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27838449, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27838450, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27838969, 'dashboard_result_id': 16425700, '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_P27838969_15-10-2025_19_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27839018, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27839019, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27839020, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27839021, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27839022, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27839023, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27839024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27839025, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27839026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27839027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27839028, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27839029, 'pht': 3726}}"}, {'dashboat_entry_day': 2450453, 'dashboard_run_id': 2464029, 'mtr_portfolio_id': 27839774, 'dashboard_result_id': 16425701, '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_P27839774_15-10-2025_19_19_27.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27839785, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27839786, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27839787, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27839788, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27839789, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27839790, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27839791, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27839792, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27839793, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27839794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27839795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27839796, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27818432 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': 3944650, 'mtr_portfolio_id': 27818432, 'created_at': datetime.datetime(2025, 10, 15, 6, 6, 5), 'result': '0.05544326831338731', 'result_long': None, 'result_double': None}] Qualite : 0.05544326831338731 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27818432 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818432_15-10-2025_06_06_06.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27818432 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_P27818432_15-10-2025_06_06_06.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818433, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818434, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818436, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818437, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818439, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818440, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818442, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818443, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818444, 'pht': 3726}}" where mtr_portfolio_id = 27818432 and dashboard_run_id = 2464029 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`=27818432 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425679, 0.05544326831338731, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818432_15-10-2025_06_06_06.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818433, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818434, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818435, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818436, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818437, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818439, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818440, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818442, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818443, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818444, '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 = 27818482 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': 3944651, 'mtr_portfolio_id': 27818482, 'created_at': datetime.datetime(2025, 10, 15, 6, 6, 30), 'result': '0.03591790016127145', 'result_long': None, 'result_double': None}] Qualite : 0.03591790016127145 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27818482 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818482_15-10-2025_06_06_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27818482 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_P27818482_15-10-2025_06_06_34.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27818486, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818487, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818492, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818493, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818497, 'pht': 3726}}" where mtr_portfolio_id = 27818482 and dashboard_run_id = 2464029 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`=27818482 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425680, 0.03591790016127145, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818482_15-10-2025_06_06_34.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27818486, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27818487, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818488, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818489, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818492, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818493, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818495, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818496, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818497, '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 = 27818873 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': 3944652, 'mtr_portfolio_id': 27818873, 'created_at': datetime.datetime(2025, 10, 15, 6, 7, 31), 'result': '0.053092943552620155', 'result_long': None, 'result_double': None}] Qualite : 0.053092943552620155 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27818873 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818873_15-10-2025_06_07_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27818873 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_P27818873_15-10-2025_06_07_34.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27818878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818879, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818883, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818884, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818885, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818889, 'pht': 3726}}" where mtr_portfolio_id = 27818873 and dashboard_run_id = 2464029 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`=27818873 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425681, 0.053092943552620155, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27818873_15-10-2025_06_07_34.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27818878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27818879, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27818880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27818881, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27818882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27818883, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27818884, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27818885, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27818886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27818887, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27818888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27818889, '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 = 27819596 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': 3944653, 'mtr_portfolio_id': 27819596, 'created_at': datetime.datetime(2025, 10, 15, 6, 8, 3), 'result': '0.044617789794046306', 'result_long': None, 'result_double': None}] Qualite : 0.044617789794046306 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27819596 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27819596_15-10-2025_06_08_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27819596 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_P27819596_15-10-2025_06_08_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27819599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27819600, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27819601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27819602, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27819603, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27819604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27819605, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27819606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27819607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27819608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27819609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27819610, 'pht': 3726}}" where mtr_portfolio_id = 27819596 and dashboard_run_id = 2464029 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`=27819596 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425682, 0.044617789794046306, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27819596_15-10-2025_06_08_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27819599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27819600, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27819601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27819602, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27819603, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27819604, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27819605, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27819606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27819607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27819608, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27819609, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27819610, '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 = 27820246 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': 3944654, 'mtr_portfolio_id': 27820246, 'created_at': datetime.datetime(2025, 10, 15, 6, 8, 34), 'result': '0.0508651783352559', 'result_long': None, 'result_double': None}] Qualite : 0.0508651783352559 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820246 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820246_15-10-2025_06_08_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820246 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_P27820246_15-10-2025_06_08_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27820247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820248, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820251, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820252, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820253, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820254, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820255, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820256, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820257, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820258, 'pht': 3726}}" where mtr_portfolio_id = 27820246 and dashboard_run_id = 2464029 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`=27820246 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425683, 0.0508651783352559, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820246_15-10-2025_06_08_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27820247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820248, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820251, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820252, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820253, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820254, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820255, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820256, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820257, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820258, '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 = 27820351 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': 3944655, 'mtr_portfolio_id': 27820351, 'created_at': datetime.datetime(2025, 10, 15, 6, 9, 31), 'result': '0.048644203198791335', 'result_long': None, 'result_double': None}] Qualite : 0.048644203198791335 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820351 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820351_15-10-2025_06_09_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820351 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_P27820351_15-10-2025_06_09_33.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820378, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820379, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820380, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820381, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820382, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820384, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820385, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820386, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820387, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820388, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820389, 'pht': 3726}}" where mtr_portfolio_id = 27820351 and dashboard_run_id = 2464029 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`=27820351 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425684, 0.048644203198791335, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820351_15-10-2025_06_09_33.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820378, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820379, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820380, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820381, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820382, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820384, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820385, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820386, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820387, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820388, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820389, '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 = 27820632 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': 3944656, 'mtr_portfolio_id': 27820632, 'created_at': datetime.datetime(2025, 10, 15, 6, 10, 1), 'result': '0.0576768016220554', 'result_long': None, 'result_double': None}] Qualite : 0.0576768016220554 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820632 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820632_15-10-2025_06_10_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820632 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_P27820632_15-10-2025_06_10_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820662, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820665, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820672, 'pht': 3726}}" where mtr_portfolio_id = 27820632 and dashboard_run_id = 2464029 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`=27820632 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425685, 0.0576768016220554, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820632_15-10-2025_06_10_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27820661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27820662, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27820663, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27820664, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27820665, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27820666, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27820667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27820668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27820669, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27820670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27820671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27820672, '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 = 27820994 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': 3944657, 'mtr_portfolio_id': 27820994, 'created_at': datetime.datetime(2025, 10, 15, 6, 11, 2), 'result': '0.04285134157784997', 'result_long': None, 'result_double': None}] Qualite : 0.04285134157784997 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27820994 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820994_15-10-2025_06_11_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27820994 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_P27820994_15-10-2025_06_11_05.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27821000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821004, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821007, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821011, 'pht': 3726}}" where mtr_portfolio_id = 27820994 and dashboard_run_id = 2464029 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`=27820994 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425686, 0.04285134157784997, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27820994_15-10-2025_06_11_05.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27821000, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821002, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821004, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821006, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821007, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821008, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821009, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821010, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821011, '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 = 27821801 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': 3944730, 'mtr_portfolio_id': 27821801, 'created_at': datetime.datetime(2025, 10, 15, 5, 49, 26), 'result': '0.015510548282426711', 'result_long': None, 'result_double': None}] Qualite : 0.015510548282426711 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27821801 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821801_15-10-2025_05_49_27.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27821801 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_P27821801_15-10-2025_05_49_27.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821802, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821803, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821808, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821809, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821810, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821812, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821813, 'pht': 3726}}" where mtr_portfolio_id = 27821801 and dashboard_run_id = 2464029 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`=27821801 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425687, 0.015510548282426711, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821801_15-10-2025_05_49_27.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821802, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821803, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821804, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821806, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821807, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821808, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821809, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821810, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821811, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821812, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821813, '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 = 27821853 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': 3944738, 'mtr_portfolio_id': 27821853, 'created_at': datetime.datetime(2025, 10, 15, 6, 3, 30), 'result': '0.04620731920449827', 'result_long': None, 'result_double': None}] Qualite : 0.04620731920449827 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27821853 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821853_15-10-2025_06_03_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27821853 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_P27821853_15-10-2025_06_03_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821855, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821856, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821857, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821859, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821860, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821861, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821862, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821863, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821865, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821866, 'pht': 3726}}" where mtr_portfolio_id = 27821853 and dashboard_run_id = 2464029 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`=27821853 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425688, 0.04620731920449827, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27821853_15-10-2025_06_03_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27821855, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27821856, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27821857, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27821858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27821859, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27821860, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27821861, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27821862, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27821863, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27821864, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27821865, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27821866, '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 = 27822193 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': 3944793, 'mtr_portfolio_id': 27822193, 'created_at': datetime.datetime(2025, 10, 15, 6, 19, 3), 'result': '0.042539943747026215', 'result_long': None, 'result_double': None}] Qualite : 0.042539943747026215 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27822193 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822193_15-10-2025_06_19_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27822193 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_P27822193_15-10-2025_06_19_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822198, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822199, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822200, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822201, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27822202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822209, 'pht': 3726}}" where mtr_portfolio_id = 27822193 and dashboard_run_id = 2464029 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`=27822193 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425689, 0.042539943747026215, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822193_15-10-2025_06_19_03.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822198, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822199, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822200, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822201, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27822202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822205, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822206, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822207, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822208, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822209, '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 = 27822707 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': 3944870, 'mtr_portfolio_id': 27822707, 'created_at': datetime.datetime(2025, 10, 15, 6, 33, 1), 'result': '0.0558267165472251', 'result_long': None, 'result_double': None}] Qualite : 0.0558267165472251 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27822707 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822707_15-10-2025_06_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27822707 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_P27822707_15-10-2025_06_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27822731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822733, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822736, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822738, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822740, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822742, 'pht': 3726}}" where mtr_portfolio_id = 27822707 and dashboard_run_id = 2464029 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`=27822707 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425690, 0.0558267165472251, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27822707_15-10-2025_06_33_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27822731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27822732, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27822733, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27822734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27822735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27822736, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27822737, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27822738, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27822739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27822740, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27822741, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27822742, '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 = 27823105 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': 3944952, 'mtr_portfolio_id': 27823105, 'created_at': datetime.datetime(2025, 10, 15, 7, 59, 33), 'result': '0.056218202327586536', 'result_long': None, 'result_double': None}] Qualite : 0.056218202327586536 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27823105 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27823105_15-10-2025_07_59_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27823105 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_P27823105_15-10-2025_07_59_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27823137, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27823138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27823139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27823140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27823141, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27823142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27823143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27823144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27823145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27823146, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27823147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27823148, 'pht': 3726}}" where mtr_portfolio_id = 27823105 and dashboard_run_id = 2464029 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`=27823105 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425691, 0.056218202327586536, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27823105_15-10-2025_07_59_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27823137, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27823138, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27823139, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27823140, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27823141, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27823142, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27823143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27823144, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27823145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27823146, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27823147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27823148, '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 = 27834475 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': 3946622, 'mtr_portfolio_id': 27834475, 'created_at': datetime.datetime(2025, 10, 15, 16, 51, 3), 'result': '0.029395392353123793', 'result_long': None, 'result_double': None}] Qualite : 0.029395392353123793 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27834475 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834475_15-10-2025_16_51_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27834475 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_P27834475_15-10-2025_16_51_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27834476, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834479, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834481, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834485, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834487, 'pht': 3726}}" where mtr_portfolio_id = 27834475 and dashboard_run_id = 2464029 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`=27834475 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425692, 0.029395392353123793, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834475_15-10-2025_16_51_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27834476, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834477, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834478, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834479, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834481, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834485, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834486, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834487, '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 = 27834822 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': 3946660, 'mtr_portfolio_id': 27834822, 'created_at': datetime.datetime(2025, 10, 15, 17, 3, 36), 'result': '0.06758046713286116', 'result_long': None, 'result_double': None}] Qualite : 0.06758046713286116 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27834822 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834822_15-10-2025_17_03_37.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27834822 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_P27834822_15-10-2025_17_03_37.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834823, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834824, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834827, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27834831, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834833, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834834, 'pht': 3726}}" where mtr_portfolio_id = 27834822 and dashboard_run_id = 2464029 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`=27834822 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425693, 0.06758046713286116, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27834822_15-10-2025_17_03_37.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27834823, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27834824, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27834825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27834826, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27834827, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27834828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27834829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27834830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27834831, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27834832, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27834833, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27834834, '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 = 27835066 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': 3946701, 'mtr_portfolio_id': 27835066, 'created_at': datetime.datetime(2025, 10, 15, 17, 25, 3), 'result': '0.04634305409620517', 'result_long': None, 'result_double': None}] Qualite : 0.04634305409620517 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27835066 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27835066_15-10-2025_17_25_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27835066 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_P27835066_15-10-2025_17_25_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27835071, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27835072, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27835073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27835074, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27835075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27835076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27835077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27835078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27835079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27835080, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27835082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27835083, 'pht': 3726}}" where mtr_portfolio_id = 27835066 and dashboard_run_id = 2464029 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`=27835066 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425694, 0.04634305409620517, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27835066_15-10-2025_17_25_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27835071, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27835072, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27835073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27835074, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27835075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27835076, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27835077, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27835078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27835079, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27835080, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27835082, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27835083, '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 = 27836024 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': 3946774, 'mtr_portfolio_id': 27836024, 'created_at': datetime.datetime(2025, 10, 15, 18, 3, 7), 'result': '0.032285443654389546', 'result_long': None, 'result_double': None}] Qualite : 0.032285443654389546 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27836024 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836024_15-10-2025_18_03_08.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27836024 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_P27836024_15-10-2025_18_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836028, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836031, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836032, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836036, 'pht': 3726}}" where mtr_portfolio_id = 27836024 and dashboard_run_id = 2464029 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`=27836024 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425695, 0.032285443654389546, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836024_15-10-2025_18_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836028, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836029, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27836030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836031, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836032, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836033, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836034, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836035, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836036, '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 = 27836830 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': 3946875, 'mtr_portfolio_id': 27836830, 'created_at': datetime.datetime(2025, 10, 15, 18, 19, 2), 'result': '0.06528735494041381', 'result_long': None, 'result_double': None}] Qualite : 0.06528735494041381 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27836830 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836830_15-10-2025_18_19_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27836830 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_P27836830_15-10-2025_18_19_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27836832, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836835, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836837, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836839, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836840, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836841, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836842, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836843, 'pht': 3726}}" where mtr_portfolio_id = 27836830 and dashboard_run_id = 2464029 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`=27836830 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425696, 0.06528735494041381, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27836830_15-10-2025_18_19_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27836832, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27836833, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27836834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27836835, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27836836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27836837, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27836838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27836839, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27836840, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27836841, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27836842, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27836843, '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 = 27837435 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': 3946917, 'mtr_portfolio_id': 27837435, 'created_at': datetime.datetime(2025, 10, 15, 18, 35, 1), 'result': '0.04456281340339618', 'result_long': None, 'result_double': None}] Qualite : 0.04456281340339618 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27837435 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27837435_15-10-2025_18_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27837435 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_P27837435_15-10-2025_18_35_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27837464, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27837465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27837466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27837467, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27837468, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27837469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27837470, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27837471, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27837472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27837473, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27837474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27837475, 'pht': 3726}}" where mtr_portfolio_id = 27837435 and dashboard_run_id = 2464029 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`=27837435 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425697, 0.04456281340339618, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27837435_15-10-2025_18_35_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27837464, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27837465, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27837466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27837467, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27837468, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27837469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27837470, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27837471, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27837472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27837473, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27837474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27837475, '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 = 27837819 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': 3946970, 'mtr_portfolio_id': 27837819, 'created_at': datetime.datetime(2025, 10, 15, 18, 48, 59), 'result': '0.04655902992311416', 'result_long': None, 'result_double': None}] Qualite : 0.04655902992311416 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27837819 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27837819_15-10-2025_18_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27837819 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_P27837819_15-10-2025_18_49_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27837849, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27837850, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27837851, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27837852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27837853, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27837854, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27837855, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27837856, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27837857, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27837858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27837859, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27837860, 'pht': 3726}}" where mtr_portfolio_id = 27837819 and dashboard_run_id = 2464028 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`=27837819 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425698, 0.04655902992311416, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27837819_15-10-2025_18_49_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27837849, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27837850, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27837851, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27837852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27837853, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27837854, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27837855, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27837856, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27837857, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27837858, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27837859, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27837860, '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 = 27838415 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': 3947059, 'mtr_portfolio_id': 27838415, 'created_at': datetime.datetime(2025, 10, 15, 19, 3, 4), 'result': '0.06539349589315256', 'result_long': None, 'result_double': None}] Qualite : 0.06539349589315256 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27838415 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27838415_15-10-2025_19_03_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27838415 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_P27838415_15-10-2025_19_03_04.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27838439, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27838440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27838441, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27838442, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27838443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27838444, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27838445, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27838446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27838447, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27838448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27838449, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27838450, 'pht': 3726}}" where mtr_portfolio_id = 27838415 and dashboard_run_id = 2464028 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`=27838415 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425699, 0.06539349589315256, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27838415_15-10-2025_19_03_04.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27838439, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27838440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27838441, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27838442, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27838443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27838444, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27838445, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27838446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27838447, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27838448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27838449, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27838450, '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 = 27838969 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': 3947151, 'mtr_portfolio_id': 27838969, 'created_at': datetime.datetime(2025, 10, 15, 19, 18, 59), 'result': '0.04411928847032071', 'result_long': None, 'result_double': None}] Qualite : 0.04411928847032071 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27838969 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27838969_15-10-2025_19_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27838969 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_P27838969_15-10-2025_19_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27839018, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27839019, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27839020, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27839021, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27839022, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27839023, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27839024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27839025, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27839026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27839027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27839028, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27839029, 'pht': 3726}}" where mtr_portfolio_id = 27838969 and dashboard_run_id = 2464028 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`=27838969 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425700, 0.04411928847032071, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27838969_15-10-2025_19_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27839018, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27839019, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27839020, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27839021, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27839022, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27839023, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27839024, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27839025, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27839026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27839027, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27839028, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27839029, '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 = 27839774 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': 3947277, 'mtr_portfolio_id': 27839774, 'created_at': datetime.datetime(2025, 10, 15, 19, 27, 4), 'result': '0.01383787578910416', 'result_long': None, 'result_double': None}] Qualite : 0.01383787578910416 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27839774 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27839774_15-10-2025_19_27_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27839774 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_P27839774_15-10-2025_19_27_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27839785, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27839786, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27839787, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27839788, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27839789, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27839790, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27839791, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27839792, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27839793, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27839794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27839795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27839796, 'pht': 3726}}" where mtr_portfolio_id = 27839774 and dashboard_run_id = 2464028 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`=27839774 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16425701, 0.01383787578910416, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27839774_15-10-2025_19_27_04.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27839785, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27839786, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27839787, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27839788, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27839789, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27839790, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27839791, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27839792, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27839793, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27839794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27839795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27839796, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27818432,27818482,27818873,27819596,27820246,27820351,27820632,27820994,27821801,27821853,27822193,27822707,27823105,27834475,27834822,27835066,27836024,27836830,27837435,27837819,27838415,27838969,27839774) result : ((1389500533,), (1389500687,), (1389500688,), (1389500689,), (1389500719,), (1389500721,), (1389500723,), (1389500726,), (1389500728,), (1389500776,), (1389500779,), (1389500781,), (1389500782,), (1389500783,), (1389500784,), (1389500756,), (1389500760,), (1389500767,), (1389500772,), (1389500785,), (1389500789,), (1389500793,), (1389500795,), (1389500801,), (1389500802,), (1389500804,), (1389500807,), (1389500810,), (1389500818,), (1389500861,), (1389500862,), (1389500864,), (1389500867,), (1389500870,), (1389500873,), (1389500878,), (1389500880,), (1389500881,), (1389500903,), (1389500905,), (1389500907,), (1389500909,), (1389500910,), (1389500911,), (1389500919,), (1389500920,), (1389500923,), (1389500924,), (1389500927,), (1389500928,), (1389500948,), (1389500949,), (1389500950,), (1389500953,), (1389500957,), (1389500960,), (1389500971,), (1389500972,), (1389500974,), (1389500977,), (1389500980,), (1389500983,), (1389500988,), (1389500989,), (1389500990,), (1389500991,), (1389500992,), (1389500996,), (1389501000,), (1389501005,), (1389501012,), (1389501039,), (1389501042,), (1389501044,), (1389501047,), (1389501050,), (1389501053,), (1389501061,), (1389501062,), (1389501063,), (1389501065,), (1389501083,), (1389501084,), (1389501086,), (1389501089,), (1389501092,), (1389501095,), (1389501127,), (1389501128,), (1389501130,), (1389501156,), (1389501157,), (1389501159,), (1389501162,), (1389501165,), (1389501167,), (1389501172,), (1389501177,), (1389501179,), (1389501183,), (1389501188,), (1389501194,), (1389501228,), (1389501221,), (1389501222,), (1389501223,), (1389501225,), (1389501237,), (1389501238,), (1389501239,), (1389501241,), (1389501244,), (1389501273,), (1389501276,), (1389501277,), (1389501279,), (1389501282,), (1389501285,), (1389501327,), (1389501328,), (1389501330,), (1389501333,), (1389501359,), (1389501360,), (1389501361,), (1389501363,), (1389501367,), (1389501369,), (1389501377,), (1389501378,), (1389501380,), (1389501385,), (1389501388,), (1389501390,), (1389501409,), (1389501411,), (1389501421,), (1389501427,), (1389501428,), (1389501429,), (1389501433,), (1389501435,), (1389501438,), (1389501440,), (1389501444,), (1389501445,), (1389501446,), (1389501448,), (1389501451,), (1389501453,), (1389501484,), (1389501504,), (1389501509,), (1389501511,), (1389501514,), (1389501517,), (1389501536,), (1389501537,), (1389501538,), (1389501540,), (1389501567,), (1389501568,), (1389501569,), (1389501572,), (1389501576,), (1389501578,), (1389501585,), (1389501586,), (1389501587,), (1389501589,), (1389501776,), (1389501934,), (1389501935,), (1389501936,), (1389501938,), (1389501955,), (1389501958,), (1389501961,), (1389501963,), (1389501967,), (1389501972,), (1389501977,), (1389502017,), (1389504900,), (1389504898,), (1389504920,), (1389504922,), (1389504923,), (1389504926,), (1389504929,), (1389504932,), (1389504962,), (1389504963,), (1389504965,), (1389504968,), (1389504971,), (1389504974,), (1389504979,), (1389504980,), (1389505005,), (1389505012,), (1389505013,), (1389505014,), (1389505015,), (1389505017,), (1389505026,), (1389505027,), (1389505031,), (1389505033,), (1389505036,), (1389505038,), (1389505040,), (1389505051,), (1389505053,), (1389505054,), (1389505055,), (1389505056,), (1389505061,), (1389505062,), (1389505247,), (1389512777,), (1389512872,), (1389513090,), (1389513148,), (1389513149,), (1389513150,), (1389513167,), (1389513168,), (1389513170,), (1389513172,), (1389513175,), (1389513179,), (1389513276,), (1389513247,), (1389513260,), (1389513274,), (1389513275,), (1389513301,), (1389513303,), (1389513304,), (1389513306,), (1389513310,), (1389513318,), (1389513319,), (1389513320,), (1389513333,), (1389513334,), (1389513335,), (1389513360,), (1389513361,), (1389513363,), (1389513365,), (1389513377,), (1389513379,), (1389513383,), (1389513388,), (1389513398,), (1389513401,), (1389513406,), (1389513407,), (1389513408,), (1389513410,), (1389513431,), (1389513432,), (1389513433,), (1389513435,), (1389513438,), (1389513444,), (1389513464,), (1389513465,), (1389513466,), (1389513469,), (1389513482,), (1389513483,), (1389513487,), (1389513491,), (1389513498,), (1389513500,), (1389513506,), (1389513511,), (1389513513,), (1389513523,), (1389513514,), (1389513515,), (1389513516,), (1389513519,), (1389513533,), (1389513534,), (1389513535,), (1389513538,), (1389513565,), (1389513566,), (1389513567,), (1389513569,), (1389513572,), (1389513587,), (1389513588,), (1389513589,), (1389513591,), (1389513595,), (1389513623,), (1389513624,), (1389513626,), (1389513641,), (1389513642,), (1389513644,), (1389513646,), (1389513673,), (1389513674,), (1389513676,), (1389513679,), (1389513682,), (1389513691,), (1389513692,), (1389513693,), (1389513696,), (1389513700,), (1389513724,), (1389513725,), (1389513726,), (1389513728,), (1389513741,), (1389513742,), (1389513744,), (1389513748,), (1389513755,), (1389513760,), (1389513768,), (1389513769,), (1389513770,), (1389513771,), (1389513774,), (1389513777,), (1389513779,), (1389513782,), (1389513785,), (1389513789,), (1389513790,), (1389513791,), (1389513829,), (1389513830,), (1389513831,), (1389513837,), (1389513840,), (1389513843,), (1389514624,), (1389514957,), (1389514961,), (1389514964,), (1389514966,), (1389515238,), (1389515225,), (1389515227,), (1389515229,), (1389515233,), (1389515265,), (1389515267,), (1389515269,), (1389515273,), (1389515285,), (1389515287,), (1389515289,), (1389515451,), (1389515728,), (1389515732,), (1389515929,), (1389515931,), (1389515968,), (1389515973,), (1389515978,), (1389515981,), (1389515993,), (1389515995,), (1389515999,), (1389516004,), (1389516007,), (1389516013,), (1389516026,), (1389516028,), (1389516030,), (1389516033,), (1389516035,), (1389516040,), (1389516045,), (1389516049,), (1389516051,), (1389516053,), (1389516054,), (1389516065,), (1389516067,), (1389516069,), (1389516072,), (1389516096,), (1389516098,), (1389516101,), (1389516105,), (1389516118,), (1389516120,), (1389516123,), (1389516128,), (1389516132,), (1389516139,), (1389516151,), (1389516153,), (1389516155,), (1389516169,), (1389516173,), (1389516177,), (1389516183,), (1389516187,), (1389516190,), (1389518757,), (1389519610,), (1389519627,), (1389519632,), (1389519633,), (1389519635,), (1389519646,), (1389519660,), (1389519662,), (1389519686,), (1389519679,), (1389519680,), (1389519681,), (1389519683,), (1389519697,), (1389519698,), (1389519700,), (1389519715,), (1389519716,), (1389519717,), (1389519719,), (1389519722,), (1389519726,), (1389519741,), (1389519743,), (1389519746,), (1389519750,), (1389519753,), (1389519762,), (1389519763,), (1389519764,), (1389519766,), (1389519769,), (1389519782,), (1389519783,), (1389519784,), (1389519786,), (1389519790,), (1389519816,), (1389519818,), (1389519821,), (1389519823,), (1389519827,), (1389519835,), (1389519837,), (1389519838,), (1389519840,), (1389519842,), (1389519852,), (1389519878,), (1389519880,), (1389519881,), (1389519883,), (1389519903,), (1389519906,), (1389519909,), (1389519912,), (1389519922,), (1389519929,), (1389519933,), (1389519935,), (1389519937,), (1389519940,), (1389519946,), (1389519949,), (1389519952,), (1389519954,), (1389519956,), (1389519962,), (1389519965,), (1389519967,), (1389519970,), (1389519973,), (1389519978,), (1389519997,), (1389520000,), (1389520002,), (1389520006,), (1389520308,), (1389520311,), (1389520314,), (1389520317,), (1389520320,), (1389520325,), (1389520331,), (1389520333,), (1389520334,), (1389520335,), (1389521412,), (1389520349,), (1389520353,), (1389520823,), (1389521365,), (1389521427,), (1389521428,), (1389521626,), (1389521637,), (1389521667,), (1389522074,), (1389522081,), (1389522104,), (1389522131,), (1389522135,), (1389522161,), (1389522165,), (1389522167,), (1389522171,), (1389522175,), (1389522178,), (1389522183,), (1389522185,), (1389522189,), (1389522193,), (1389522209,), (1389522216,), (1389522221,), (1389522225,), (1389522228,), (1389522231,), (1389522235,), (1389522239,), (1389522241,), (1389522243,), (1389522245,), (1389522246,), (1389522252,), (1389522254,), (1389522256,), (1389522259,), (1389522262,), (1389522287,), (1389522288,), (1389522289,), (1389522292,), (1389522296,), (1389522304,), (1389522305,), (1389522306,), (1389522309,), (1389522315,), (1389522321,), (1389522324,), (1389522325,), (1389522329,), (1389522335,), (1389522337,), (1389522341,), (1389522342,), (1389522343,), (1389522345,), (1389522386,), (1389522387,), (1389522388,), (1389522390,), (1389522393,), (1389522408,), (1389522409,), (1389522410,), (1389522412,), (1389522414,), (1389522440,), (1389522443,), (1389522444,), (1389522446,), (1389522449,), (1389522452,), (1389522462,), (1389522463,), (1389522466,), (1389522472,), (1389522479,), (1389522481,), (1389522487,), (1389522494,), (1389522495,), (1389522496,), (1389522512,), (1389522499,), (1389522501,), (1389522504,), (1389522507,), (1389522510,), (1389522518,), (1389522519,), (1389522520,), (1389522522,), (1389522563,), (1389522565,), (1389522566,), (1389522568,), (1389522571,), (1389522587,), (1389522588,), (1389522589,), (1389522591,), (1389522594,), (1389522626,), (1389522628,), (1389522630,), (1389522632,), (1389522635,), (1389522645,), (1389522648,), (1389522649,), (1389522651,), (1389522659,), (1389522678,), (1389522680,), (1389522681,), (1389522683,), (1389522686,), (1389522694,), (1389522695,), (1389522696,), (1389522698,), (1389522701,), (1389522704,), (1389522735,), (1389522737,), (1389522738,), (1389522741,), (1389522756,), (1389522765,), (1389522767,), (1389522770,), (1389522776,), (1389522780,), (1389522785,), (1389522787,), (1389522788,), (1389522789,), (1389522792,), (1389522794,), (1389522797,), (1389522800,), (1389522807,), (1389522808,), (1389522810,), (1389522812,), (1389522815,), (1389522822,), (1389522843,), (1389522845,), (1389522847,), (1389522855,), (1389522856,), (1389522857,), (1389522859,), (1389522862,), (1389522865,), (1389522890,), (1389522892,), (1389522893,), (1389522895,), (1389522934,), (1389522909,), (1389522912,), (1389522918,), (1389522925,), (1389522930,), (1389522951,), (1389522953,), (1389522955,), (1389522957,), (1389522969,), (1389522970,), (1389522971,), (1389522974,), (1389522984,), (1389522988,), (1389523009,), (1389523011,), (1389523012,), (1389523015,), (1389523019,), (1389523030,), (1389523032,), (1389523034,), (1389523037,), (1389523047,), (1389523049,), (1389523055,), (1389523059,), (1389527864,), (1389594501,), (1389595115,), (1389595117,), (1389595306,), (1389595307,), (1389595308,), (1389595310,), (1389595314,), (1389595328,), (1389595329,), (1389595330,), (1389595348,), (1389595350,), (1389595352,), (1389597367,), (1389598080,), (1389598241,), (1389598243,), (1389598272,), (1389598279,), (1389598296,), (1389598299,), (1389598302,), (1389598333,), (1389598334,), (1389598335,), (1389598337,), (1389598342,), (1389598363,), (1389598366,), (1389598368,), (1389598371,), (1389598374,), (1389598377,), (1389598382,), (1389598383,), (1389598385,), (1389598387,), (1389598390,), (1389598393,), (1389598403,), (1389598465,), (1389598473,), (1389598475,), (1389598479,), (1389598483,), (1389598486,), (1389598519,), (1389598524,), (1389598529,), (1389598542,), (1389598543,), (1389598949,), (1389598950,), (1389598953,), (1389598954,), (1389598972,), (1389598973,), (1389599177,), (1389599108,), (1389599123,), (1389599156,), (1389601671,), (1389601674,), (1389601677,), (1389601693,), (1389601969,), (1389601971,), (1389602034,), (1389602037,), (1389602516,), (1389602583,), (1389602585,), (1389603834,), (1389603836,), (1389604063,), (1389604065,), (1389604816,), (1389604970,), (1389604978,), (1389604986,), (1389604991,), (1389604994,), (1389605020,), (1389605021,), (1389605150,), (1389605234,), (1389605236,), (1389605239,), (1389605242,), (1389605245,), (1389605250,), (1389605252,), (1389605255,), (1389605258,), (1389605303,), (1389605305,), (1389605308,), (1389605311,), (1389605314,), (1389605318,), (1389605321,), (1389605322,), (1389605324,), (1389605325,), (1389605327,), (1389605330,), (1389605333,), (1389605625,), (1389605629,), (1389607994,), (1389606795,), (1389607991,), (1389607992,), (1389608525,), (1389608620,), (1389608621,), (1389608659,), (1389608677,), (1389608706,), (1389608798,), (1389608799,), (1389608802,), (1389608804,), (1389608808,), (1389608811,), (1389608816,), (1389608817,), (1389608818,), (1389608821,), (1389608881,), (1389608884,), (1389608886,), (1389615950,), (1389615942,), (1389615944,), (1389615946,), (1389616368,), (1389616370,), (1389616371,), (1389616396,), (1389616410,), (1389616411,), (1389616413,), (1389616428,), (1389617168,), (1389617178,), (1389617182,), (1389617185,), (1389617187,), (1389617208,), (1389618288,), (1389618290,), (1389618294,), (1389618375,), (1389618405,), (1389618408,), (1389618410,), (1389618423,), (1389618799,), (1389618800,), (1389618802,), (1389618876,), (1389618883,), (1389618971,), (1389618979,), (1389618999,), (1389619000,), (1389619002,), (1389619009,), (1389619431,), (1389619548,), (1389619549,), (1389619551,), (1389619811,), (1389619813,), (1389619823,), (1389619903,), (1389619917,), (1389619927,), (1389619992,), (1389619993,), (1389619994,), (1389619997,), (1389620044,), (1389620045,), (1389620046,), (1389620049,), (1389620053,), (1389620081,), (1389620083,), (1389620086,), (1389620088,), (1389620092,), (1389620113,), (1389620114,), (1389620115,), (1389620118,), (1389620123,), (1389620126,), (1389620163,), (1389620166,), (1389620169,), (1389620174,), (1389620176,), (1389620177,), (1389620178,), (1389620143,), (1389620148,), (1389620160,), (1389620182,), (1389620183,), (1389620188,), (1389620196,), (1389620215,), (1389620216,), (1389620217,), (1389620219,), (1389620239,), (1389620242,), (1389620243,), (1389620246,), (1389620250,), (1389620259,), (1389620277,), (1389620279,), (1389620281,), (1389620284,), (1389620300,), (1389620303,), (1389620314,), (1389620320,), (1389620324,), (1389620363,), (1389620364,), (1389620365,), (1389620367,), (1389620371,), (1389620375,), (1389620387,), (1389620388,), (1389620390,), (1389620392,), (1389620409,), (1389620410,), (1389620412,), (1389620415,), (1389620419,), (1389620423,), (1389620435,), (1389620436,), (1389620437,), (1389620439,), (1389620442,), (1389620449,), (1389620467,), (1389620469,), (1389620471,), (1389620475,), (1389620478,), (1389620481,), (1389620489,), (1389620493,), (1389620506,), (1389620510,), (1389620514,), (1389620517,), (1389620527,), (1389620529,), (1389620530,), (1389620531,), (1389620533,), (1389620536,), (1389620546,), (1389620549,), (1389620552,), (1389620554,), (1389620557,), (1389620558,), (1389620568,), (1389620575,), (1389620588,), (1389620592,), (1389620598,), (1389620607,), (1389620617,), (1389620620,), (1389620624,), (1389620627,), (1389620653,), (1389620656,), (1389620773,), (1389620776,), (1389620777,), (1389620797,), (1389620798,), (1389620812,), (1389620814,), (1389620709,), (1389620713,), (1389620735,), (1389620779,), (1389620780,), (1389620783,), (1389620785,), (1389620788,), (1389620792,), (1389620830,), (1389620833,), (1389620836,), (1389620893,), (1389620895,), (1389620897,), (1389620899,), (1389620903,), (1389620906,), (1389620922,), (1389620923,), (1389620925,), (1389620927,), (1389620935,), (1389620946,), (1389620947,), (1389620949,), (1389620952,), (1389620955,), (1389620958,), (1389620963,), (1389620965,), (1389620966,), (1389620972,), (1389620974,), (1389620989,), (1389621004,), (1389621012,), (1389621020,), (1389621051,), (1389621052,), (1389621057,), (1389621064,), (1389621068,), (1389621071,), (1389621105,), (1389621106,), (1389621107,), (1389621109,), (1389621165,), (1389621174,), (1389621176,), (1389621179,), (1389621182,), (1389621185,), (1389621199,), (1389621200,), (1389621204,), (1389621213,), (1389621216,), (1389621217,), (1389621241,), (1389621245,), (1389621248,), (1389621251,), (1389621297,), (1389621302,), (1389621466,), (1389621487,), (1389621490,), (1389621684,), (1389621686,), (1389621689,), (1389621725,), (1389621729,), (1389621732,), (1389621835,), (1389621836,), (1389621837,), (1389621934,), (1389621938,), (1389621945,), (1389621948,), (1389621868,), (1389621911,), (1389621913,), (1389621930,), (1389621982,), (1389621984,), (1389621985,), (1389621987,), (1389622101,), (1389622102,), (1389622103,), (1389622106,), (1389622111,), (1389622114,), (1389622176,), (1389622189,), (1389622197,), (1389622214,), (1389622386,), (1389622405,), (1389622427,), (1389622430,), (1389622434,), (1389622437,), (1389622446,), (1389622448,), (1389622450,), (1389622453,), (1389622475,), (1389622476,), (1389622477,), (1389622480,), (1389622484,), (1389622650,), (1389622651,), (1389622652,), (1389622654,), (1389622658,), (1389622669,), (1389622688,), (1389622689,), (1389622692,), (1389622696,), (1389622707,), (1389622716,), (1389622728,), (1389622734,), (1389622738,), (1389622742,), (1389622882,), (1389622886,), (1389622954,), (1389622976,), (1389622979,), (1389623019,), (1389623030,), (1389623031,), (1389623032,), (1389623033,), (1389623037,), (1389623043,), (1389623052,), (1389623055,), (1389623057,), (1389623059,), (1389623064,), (1389623066,), (1389623068,), (1389623071,), (1389624498,), (1389624525,), (1389624543,), (1389624547,), (1389624551,), (1389624578,), (1389624570,), (1389624573,), (1389624576,), (1389624607,), (1389624609,), (1389624684,), (1389624803,), (1389624807,), (1389624997,), (1389624999,), (1389625002,), (1389625004,), (1389625008,), (1389625013,), (1389625026,), (1389625029,), (1389625030,), (1389625032,), (1389625047,), (1389625049,), (1389625053,), (1389625060,), (1389625068,), (1389625071,), (1389625456,), (1389625459,), (1389625462,), (1389625466,), (1389625473,), (1389625476,), (1389625611,), (1389625612,), (1389625681,), (1389625682,), (1389625779,), (1389625781,), (1389625784,), (1389625788,), (1389625792,), (1389625796,), (1389625816,), (1389625899,), (1389625900,), (1389625939,), (1389625993,), (1389625996,), (1389625998,), (1389626016,), (1389626026,), (1389626057,), (1389626058,), (1389626059,), (1389626061,), (1389626066,), (1389626070,), (1389626203,), (1389626204,), (1389626244,), (1389626283,), (1389626305,), (1389626463,), (1389626464,), (1389626465,), (1389626470,), (1389626474,), (1389626477,), (1389626485,), (1389626486,), (1389626491,), (1389626494,), (1389626545,), (1389626547,), (1389626548,), (1389626551,), (1389626755,), (1389627042,), (1389627043,), (1389627044,), (1389627079,), (1389627093,), (1389627096,), (1389627122,), (1389627070,), (1389627071,), (1389627074,), (1389627123,), (1389627124,), (1389627125,), (1389629106,), (1389629107,), (1389629108,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15102025': {'nb_upload': 9, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27839774]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1389629108, 1389629107, 1389629106] map_info['map_portfolio_photo'] : {27839774: [1389629108, 1389629107, 1389629106, 1389627125, 1389627124, 1389627123, 1389627074, 1389627071, 1389627070]} final : True mtd_id 4302 list_pids : [1389629108, 1389629107, 1389629106] Looping around the photos to save general results len do output : 1 /27839774Didn'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, '3947277') ('4302', '27839774', '1389629108', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629107', None, None, None, None, None, '3947277') ('4302', None, None, None, None, None, None, None, '3947277') ('4302', '27839774', '1389629106', None, None, None, None, None, '3947277') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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, '27839774', 'None', None, None, None, None, '3947277'), ('4302', '27839774', '1389629108', None, None, None, None, None, '3947277'), ('4302', '27839774', '1389629107', None, None, None, None, None, '3947277'), ('4302', '27839774', '1389629106', None, None, None, None, None, '3947277')] time used for this insertion : 0.04063892364501953 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.853797197341919 time spend to save output : 0.04086756706237793 total time spend for step 5 : 5.894664764404297 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 (3947277) 1.93user 2.53system 0:16.64elapsed 26%CPU (0avgtext+0avgdata 156784maxresident)k 32inputs+3488outputs (3major+63997minor)pagefaults 0swaps