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 : 460398 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 (3509542) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3509542) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903634 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3509542'] with mtr_portfolio_ids : ['25903634'] and first list_photo_ids : [] new path : /proc/460398/ Name: python3 Umask: 0002 State: R (running) Tgid: 460398 Ngid: 0 Pid: 460398 PPid: 460397 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 460398 NSpid: 460398 NSpgid: 459741 NSsid: 459741 VmPeak: 1106964 kB VmSize: 1106964 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98956 kB VmRSS: 98956 kB RssAnon: 59820 kB RssFile: 39136 kB RssShmem: 0 kB VmData: 865716 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 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: 53 nonvoluntary_ctxt_switches: 89 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '460398', 'Ngid': '0', 'Pid': '460398', 'PPid': '460397', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '460398', 'NSpid': '460398', 'NSpgid': '459741', 'NSsid': '459741', 'VmPeak': '1106964 kB', 'VmSize': '1106964 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98956 kB', 'VmRSS': '98956 kB', 'RssAnon': '59820 kB', 'RssFile': '39136 kB', 'RssShmem': '0 kB', 'VmData': '865716 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 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': '53', 'nonvoluntary_ctxt_switches': '89'} ('datou_batch_current', '460398', '1106964', '0', '1106964', '865716', '98956', b'', 'marlene', '3509542') 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 ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (25903634) 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 (3509542 ) ) 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 (25903634) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1376569260, 'portfolio_id': 25903634}, {'photo_id': 1376569237, 'portfolio_id': 25903634}, {'photo_id': 1376569234, 'portfolio_id': 25903634}, {'photo_id': 1376569185, 'portfolio_id': 25903634}, {'photo_id': 1376569184, 'portfolio_id': 25903634}, {'photo_id': 1376569181, 'portfolio_id': 25903634}, {'photo_id': 1376569176, 'portfolio_id': 25903634}, {'photo_id': 1376569171, 'portfolio_id': 25903634}, {'photo_id': 1376569127, 'portfolio_id': 25903634}, {'photo_id': 1376569126, 'portfolio_id': 25903634}, {'photo_id': 1376569124, 'portfolio_id': 25903634}] map_portfolio_id_photo_id: {25903634: [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171, 1376569127, 1376569126, 1376569124]} ##### 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.014722347259521484 #### 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 Tue Aug 12 08:18: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 (25903634) 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 : 25903634 get user id for portfolio 25903634 get sub ptf for main ptf 25903634, type 3726 and hashtags ['metal', 'autre_refus', 'plastique', 'Carton_gris', 'Teint_Dans_La_Masse', 'Carton_brun', 'kraft', 'mal_croppe', 'papier', 'cartonnette', 'flou', 'environnement'] 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`=25903634 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','plastique','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','mal_croppe','papier','cartonnette','flou','environnement')) 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`=25903634 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','plastique','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','mal_croppe','papier','cartonnette','flou','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 25903634, 'sub_port_id': 25903677, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452530, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'metal': {'main_port_id': 25903634, 'sub_port_id': 25903678, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452531, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'plastique': {'main_port_id': 25903634, 'sub_port_id': 25903679, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452532, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'mal_croppe': {'main_port_id': 25903634, 'sub_port_id': 25903680, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452533, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'flou': {'main_port_id': 25903634, 'sub_port_id': 25903681, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452534, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'Carton_gris': {'main_port_id': 25903634, 'sub_port_id': 25903682, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452535, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'autre_refus': {'main_port_id': 25903634, 'sub_port_id': 25903683, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452536, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'kraft': {'main_port_id': 25903634, 'sub_port_id': 25903684, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452537, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'Carton_brun': {'main_port_id': 25903634, 'sub_port_id': 25903685, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452538, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 25903634, 'sub_port_id': 25903686, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452539, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'cartonnette': {'main_port_id': 25903634, 'sub_port_id': 25903687, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452540, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}, 'papier': {'main_port_id': 25903634, 'sub_port_id': 25903688, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452541, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25903677 , 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=25903634 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 (25903677) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903678 , 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=25903634 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 (25903678) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903679 , 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=25903634 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 (25903679) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903680 , 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=25903634 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 (25903680) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903681 , 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=25903634 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 (25903681) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903682 , 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=25903634 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 (25903682) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903683 , 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=25903634 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 (25903683) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903684 , 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=25903634 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 (25903684) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903685 , 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=25903634 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 (25903685) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903686 , 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=25903634 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 (25903686) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903687 , 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=25903634 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 (25903687) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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 25903688 , 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=25903634 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 (25903688) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25903634) result : ((1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) 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`=25903634 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','plastique','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','mal_croppe','papier','cartonnette','flou','environnement')) 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`=25903634 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','plastique','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','mal_croppe','papier','cartonnette','flou','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 25903634, 'sub_port_id': 25903689, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452542, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'metal': {'main_port_id': 25903634, 'sub_port_id': 25903690, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452543, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'plastique': {'main_port_id': 25903634, 'sub_port_id': 25903691, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452544, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'mal_croppe': {'main_port_id': 25903634, 'sub_port_id': 25903692, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452545, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'flou': {'main_port_id': 25903634, 'sub_port_id': 25903693, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452546, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'Carton_gris': {'main_port_id': 25903634, 'sub_port_id': 25903694, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452547, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'autre_refus': {'main_port_id': 25903634, 'sub_port_id': 25903695, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452548, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'kraft': {'main_port_id': 25903634, 'sub_port_id': 25903696, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452549, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'Carton_brun': {'main_port_id': 25903634, 'sub_port_id': 25903697, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452550, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 25903634, 'sub_port_id': 25903698, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452551, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'cartonnette': {'main_port_id': 25903634, 'sub_port_id': 25903699, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452552, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}, 'papier': {'main_port_id': 25903634, 'sub_port_id': 25903700, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17452553, 'last_updated_at': datetime.datetime(2025, 8, 12, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 12, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 12, 8, 17, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903689,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903677 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903690,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903678 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903691,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903679 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903692,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903680 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903693,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903681 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903694,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903682 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903695,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903683 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903696,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903684 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903697,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903685 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903698,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903686 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903699,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903687 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25903700,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25903688 lien utilise dans velours : https://www.fotonower.com/velours/25903689,25903690,25903691,25903692,25903693,25903694,25903695,25903696,25903697,25903698,25903699,25903700?tags=environnement,metal,plastique,mal_croppe,flou,Carton_gris,autre_refus,kraft,Carton_brun,Teint_Dans_La_Masse,cartonnette,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25903634]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] map_info['map_portfolio_photo'] : {25903634: [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171, 1376569127, 1376569126, 1376569124]} final : False mtd_id 4302 list_pids : [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] Looping around the photos to save general results len do output : 1 /25903634. 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, '3509542') ('4302', '25903634', '1376569260', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569237', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569234', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569185', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569184', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569181', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569176', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569171', None, None, None, None, None, '3509542') 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', None, '25903634', "{'environnement': 25903677, 'metal': 25903678, 'plastique': 25903679, 'mal_croppe': 25903680, 'flou': 25903681, 'Carton_gris': 25903682, 'autre_refus': 25903683, 'kraft': 25903684, 'Carton_brun': 25903685, 'Teint_Dans_La_Masse': 25903686, 'cartonnette': 25903687, 'papier': 25903688}", None, None, None, None, '3509542'), ('4302', '25903634', '1376569260', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569237', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569234', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569185', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569184', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569181', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569176', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569171', None, None, None, None, None, '3509542')] time used for this insertion : 0.09828066825866699 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4873874187469482 time spend to save output : 0.09853172302246094 total time spend for step 1 : 1.5859191417694092 step2:final Tue Aug 12 08:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25903634) 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 25903634 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1376569127,1376569126,1376569124,1376569185,1376569184,1376569181,1376569176,1376569171,1376569260,1376569237,1376569234); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25903634]) Inside saveOutput : final : False verbose : True original output for save of step final : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} new output for save of step final : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] map_info['map_portfolio_photo'] : {25903634: [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171, 1376569127, 1376569126, 1376569124]} final : False mtd_id 4302 list_pids : [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] Looping around the photos to save general results len do output : 8 /1376569260.Didn't retrieve data . /1376569237.Didn't retrieve data . /1376569234.Didn't retrieve data . /1376569185.Didn't retrieve data . /1376569184.Didn't retrieve data . /1376569181.Didn't retrieve data . /1376569176.Didn't retrieve data . /1376569171.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, '3509542') ('4302', '25903634', '1376569260', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569237', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569234', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569185', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569184', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569181', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569176', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569171', None, None, None, None, None, '3509542') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 24 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', '25903634', '1376569260', '0.0', None, None, None, None, '3509542'), ('4302', '25903634', '1376569237', '0.0', None, None, None, None, '3509542'), ('4302', '25903634', '1376569234', '0.0', None, None, None, None, '3509542'), ('4302', '25903634', '1376569185', '0.0', None, None, None, None, '3509542'), ('4302', '25903634', '1376569184', '0.0', None, None, None, None, '3509542'), ('4302', '25903634', '1376569181', '0.0', None, None, None, None, '3509542'), ('4302', '25903634', '1376569176', '0.0', None, None, None, None, '3509542'), ('4302', '25903634', '1376569171', '0.0', None, None, None, None, '3509542')] time used for this insertion : 0.05145835876464844 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.049311161041259766 time spend to save output : 0.05187344551086426 total time spend for step 2 : 0.10118460655212402 step3:velours_tree Tue Aug 12 08:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25903634: [{'environnement': 25903677, 'metal': 25903678, 'plastique': 25903679, 'mal_croppe': 25903680, 'flou': 25903681, 'Carton_gris': 25903682, 'autre_refus': 25903683, 'kraft': 25903684, 'Carton_brun': 25903685, 'Teint_Dans_La_Masse': 25903686, 'cartonnette': 25903687, 'papier': 25903688}]} input_args_next_step : {25903634: ()} output_args : {25903634: [{'environnement': 25903677, 'metal': 25903678, 'plastique': 25903679, 'mal_croppe': 25903680, 'flou': 25903681, 'Carton_gris': 25903682, 'autre_refus': 25903683, 'kraft': 25903684, 'Carton_brun': 25903685, 'Teint_Dans_La_Masse': 25903686, 'cartonnette': 25903687, 'papier': 25903688}]} args : 25903634 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 : ({'environnement': 25903677, 'metal': 25903678, 'plastique': 25903679, 'mal_croppe': 25903680, 'flou': 25903681, 'Carton_gris': 25903682, 'autre_refus': 25903683, 'kraft': 25903684, 'Carton_brun': 25903685, 'Teint_Dans_La_Masse': 25903686, 'cartonnette': 25903687, 'papier': 25903688},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25903634) 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([25903634]) 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.3154881000518799 time spend to save output : 5.1975250244140625e-05 total time spend for step 3 : 0.315540075302124 step4:send_mail_cod Tue Aug 12 08:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} input_args_next_step : {1376569260: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569260 depend.output_id : 0 input_args_next_step : {1376569260: ('0.0',), 1376569237: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569237 depend.output_id : 0 input_args_next_step : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569234 depend.output_id : 0 input_args_next_step : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569185 depend.output_id : 0 input_args_next_step : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569184 depend.output_id : 0 input_args_next_step : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569181 depend.output_id : 0 input_args_next_step : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569176 depend.output_id : 0 input_args_next_step : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ()} output_args : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',)} args : 1376569171 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 : {25903634: [{'environnement': 25903677, 'metal': 25903678, 'plastique': 25903679, 'mal_croppe': 25903680, 'flou': 25903681, 'Carton_gris': 25903682, 'autre_refus': 25903683, 'kraft': 25903684, 'Carton_brun': 25903685, 'Teint_Dans_La_Masse': 25903686, 'cartonnette': 25903687, 'papier': 25903688}]} input_args_next_step : {1376569260: ('0.0',), 1376569237: ('0.0',), 1376569234: ('0.0',), 1376569185: ('0.0',), 1376569184: ('0.0',), 1376569181: ('0.0',), 1376569176: ('0.0',), 1376569171: ('0.0',), 25903634: ()} output_args : {25903634: [{'environnement': 25903677, 'metal': 25903678, 'plastique': 25903679, 'mal_croppe': 25903680, 'flou': 25903681, 'Carton_gris': 25903682, 'autre_refus': 25903683, 'kraft': 25903684, 'Carton_brun': 25903685, 'Teint_Dans_La_Masse': 25903686, 'cartonnette': 25903687, 'papier': 25903688}]} args : 25903634 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 :9, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25903634) 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 ph WHERE photo_id IN (1376569260,1376569237,1376569234,1376569185,1376569184,1376569181,1376569176,1376569171) Found this number of photos: 8 ##### Call download_photos : nb_thread : 5 begin to download photo : 1376569171 begin to download photo : 1376569181 begin to download photo : 1376569185 begin to download photo : 1376569237 download finish for photo 1376569171 begin to download photo : 1376569176 download finish for photo 1376569237 begin to download photo : 1376569260 download finish for photo 1376569185 begin to download photo : 1376569234 download finish for photo 1376569181 begin to download photo : 1376569184 download finish for photo 1376569234 download finish for photo 1376569176 download finish for photo 1376569260 download finish for photo 1376569184 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette259036781754979540/ imagette259036791754979540/ imagette259036801754979540/ imagette259036811754979540/ imagette259036831754979540/ imagette259036841754979540/ imagette259036871754979540/ imagette259036821754979540/ imagette259036851754979540/ imagette259036861754979540/ length of list_filenames : 8 ; length of list_pids : 8 ; length of list_args : 8 results_Auto_P25903634_12-08-2025_08_19_00.pdf 25903678 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903678 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036781754979540 25903679 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903679 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036791754979540 25903680 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903680 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036801754979540 25903681 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903681 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036811754979540 25903683 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903683 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036831754979540 25903684 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903684 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036841754979540 25903687 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903687 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036871754979540 25903682 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903682 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036821754979540 25903685 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903685 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036851754979540 25903686 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903686 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette259036861754979540 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25903634 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25903689,25903690,25903691,25903692,25903693,25903694,25903695,25903696,25903697,25903698,25903699,25903700?tags=environnement,metal,plastique,mal_croppe,flou,Carton_gris,autre_refus,kraft,Carton_brun,Teint_Dans_La_Masse,cartonnette,papier your option no_mail is active, we will not send the real mail to your client args[1376569260] : ('0.0',) no score found for photo 1376569260 We are sending mail with results at report@fotonower.com args[1376569237] : ('0.0',) no score found for photo 1376569237 We are sending mail with results at report@fotonower.com args[1376569234] : ('0.0',) no score found for photo 1376569234 We are sending mail with results at report@fotonower.com args[1376569185] : ('0.0',) no score found for photo 1376569185 We are sending mail with results at report@fotonower.com args[1376569184] : ('0.0',) no score found for photo 1376569184 We are sending mail with results at report@fotonower.com args[1376569181] : ('0.0',) no score found for photo 1376569181 We are sending mail with results at report@fotonower.com args[1376569176] : ('0.0',) no score found for photo 1376569176 We are sending mail with results at report@fotonower.com args[1376569171] : ('0.0',) no score found for photo 1376569171 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903634 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_P25903634_12-08-2025_08_19_00.pdf results_Auto_P25903634_12-08-2025_08_19_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25903634_12-08-2025_08_19_00.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','25903634','results_Auto_P25903634_12-08-2025_08_19_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25903634_12-08-2025_08_19_00.pdf','pdf','','0.08','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25903634]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] map_info['map_portfolio_photo'] : {25903634: [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171, 1376569127, 1376569126, 1376569124]} final : False mtd_id 4302 list_pids : [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] 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, '3509542') ('4302', '25903634', '1376569260', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569237', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569234', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569185', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569184', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569181', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569176', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569171', None, None, None, None, None, '3509542') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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', '25903634', '1376569260', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569237', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569234', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569185', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569184', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569181', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569176', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569171', None, None, None, None, None, '3509542')] time used for this insertion : 0.04355645179748535 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3428187370300293 time spend to save output : 0.04377627372741699 total time spend for step 4 : 1.3865950107574463 step5:split_time_score Tue Aug 12 08:19:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25903634'] 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 : [('25903634',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25903634) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1376569185: {'path': 'temp/1754979540_460398_1376569185_7339eb6e896c9a4f2e99fd997973cbae.jpg', 'extension': 'jpg'}, 1376569234: {'path': 'temp/1754979540_460398_1376569234_0dd101dd020cddf49117a8faf547d3fd.jpg', 'extension': 'jpg'}, 1376569171: {'path': 'temp/1754979540_460398_1376569171_cef1def3c6efb831f951639b04f2b8e0.jpg', 'extension': 'jpg'}, 1376569176: {'path': 'temp/1754979540_460398_1376569176_563847ee8fa4d6a97b9d23b6a2e46eb6.jpg', 'extension': 'jpg'}, 1376569237: {'path': 'temp/1754979540_460398_1376569237_0cf0c5f9c159f67efee84c35f82b7166.jpg', 'extension': 'jpg'}, 1376569260: {'path': 'temp/1754979540_460398_1376569260_2a677ff1f1e5171d358bd8b3c9ee08c8.jpg', 'extension': 'jpg'}, 1376569181: {'path': 'temp/1754979540_460398_1376569181_7b0c9458152b106de7d3f4f7f95e8a1c.jpg', 'extension': 'jpg'}, 1376569184: {'path': 'temp/1754979540_460398_1376569184_b62c35b2f7b621170e0f4473b2fbcb62.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 = 25903634; (('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 ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25903634 group by h (('08', 11),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25903634 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 (25903634) 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 (25903634) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 12082025 25903634 Nombre de photos uploadées : 11 / 23040 (0%) 12082025 25903634 Nombre de photos taguées (types de déchets): 0 / 11 (0%) 12082025 25903634 Nombre de photos taguées (volume) : 0 / 11 (0%) [{'photo_id': 1376569127, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/12/2414b32f47da57b593300173f50021d0.jpg', 'username': None, 'uploaded_at': 1754979367, 'text': 'image_12082025_08_15_04_10164.jpg'}, {'photo_id': 1376569126, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/12/4dd206d24a9d979e5c1721e234382755.jpg', 'username': None, 'uploaded_at': 1754979367, 'text': 'image_12082025_08_15_14_10134.jpg'}, {'photo_id': 1376569124, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/12/67c59b107d00e8059155d95fcf4a13de.jpg', 'username': None, 'uploaded_at': 1754979367, 'text': 'image_12082025_08_15_24_10135.jpg'}, {'photo_id': 1376569185, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/12/7339eb6e896c9a4f2e99fd997973cbae.jpg', 'username': None, 'uploaded_at': 1754979427, 'text': 'image_12082025_08_15_44_10138.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 6.67572021484375e-06 ??????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006279945373535156 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25903634, '2025-08-12' ) 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 (2104719,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20583581924438477 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= 2104719 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25895867, 'dashboard_result_id': 13896096, '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_P25895867_12-08-2025_06_13_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25895868, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25895869, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25895870, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25895871, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25895872, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25895873, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25895874, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25895875, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25895876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25895877, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25895878, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25895879, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25896197, 'dashboard_result_id': 13896097, '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_P25896197_12-08-2025_06_13_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896198, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896199, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896200, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896201, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896203, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896204, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896205, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896206, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896207, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896209, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25896261, 'dashboard_result_id': 13896098, '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_P25896261_12-08-2025_06_14_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25896262, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896263, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896264, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896265, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896268, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896269, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896270, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896271, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896272, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896273, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25896436, 'dashboard_result_id': 13896099, '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_P25896436_12-08-2025_06_15_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896437, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896439, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896440, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896442, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896443, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896444, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896445, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896446, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896447, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896448, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25896871, 'dashboard_result_id': 13896100, '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_P25896871_12-08-2025_06_15_41.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896876, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896877, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896878, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896879, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896881, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896882, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896883, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896884, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896885, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896887, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25897219, 'dashboard_result_id': 13896101, '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_P25897219_12-08-2025_06_15_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897220, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897221, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897222, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897223, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897224, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897226, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897227, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897229, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897230, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897231, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25897705, 'dashboard_result_id': 13896102, '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_P25897705_12-08-2025_06_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897712, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897714, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897715, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897717, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897718, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897719, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897720, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897721, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897723, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25897901, 'dashboard_result_id': 13896103, '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_P25897901_12-08-2025_06_17_33.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897906, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897907, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897908, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897909, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897910, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897911, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897912, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897913, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897915, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897916, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897917, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25898104, 'dashboard_result_id': 13896104, '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_P25898104_12-08-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898109, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898110, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898111, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898112, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898113, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898114, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898116, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898117, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898118, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898119, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25898373, 'dashboard_result_id': 13896105, '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_P25898373_12-08-2025_06_03_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898384, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898385, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898386, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898387, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898388, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898390, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898391, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898394, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898395, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25898660, 'dashboard_result_id': 13896106, '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_P25898660_12-08-2025_06_19_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898668, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898672, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898673, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898674, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898676, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898677, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898678, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898679, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25899270, 'dashboard_result_id': 13896107, '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_P25899270_12-08-2025_06_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25899278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25899279, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25899280, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25899281, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25899282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25899283, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25899284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25899285, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25899286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25899287, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25899288, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25899289, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25899643, 'dashboard_result_id': 13896108, '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_P25899643_12-08-2025_06_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25899656, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25899657, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25899658, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25899659, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25899660, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25899661, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25899662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25899663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25899664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25899665, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25899666, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25899667, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25900002, 'dashboard_result_id': 13896109, '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_P25900002_12-08-2025_07_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25900017, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25900018, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25900019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25900020, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25900021, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25900022, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25900023, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25900024, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25900025, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25900026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25900027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25900028, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25900452, 'dashboard_result_id': 13896110, '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_P25900452_12-08-2025_07_20_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25900484, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25900485, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25900486, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25900487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25900489, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25900490, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25900491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25900492, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25900493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25900494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25900495, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25900496, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25901307, 'dashboard_result_id': 13896111, '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_P25901307_12-08-2025_07_32_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25901328, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25901329, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25901330, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25901331, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25901332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25901333, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25901334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25901335, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25901336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25901337, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25901338, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25901339, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25901859, 'dashboard_result_id': 13896112, '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_P25901859_12-08-2025_07_47_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25901892, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25901893, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25901894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25901895, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25901896, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25901897, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25901898, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25901899, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25901900, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25901901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25901902, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25901903, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25902347, 'dashboard_result_id': 13896113, '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_P25902347_12-08-2025_08_02_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25902379, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25902380, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25902381, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25902382, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25902383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25902384, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25902385, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25902386, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25902387, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25902388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25902389, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25902390, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25902893, 'dashboard_result_id': 13896114, '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_P25902893_12-08-2025_08_17_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25902944, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25902945, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25902946, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25902947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25902948, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25902949, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25902950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25902951, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25902952, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25902953, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25902955, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25902956, 'pht': 3726}}"}, {'dashboat_entry_day': 2104719, 'dashboard_run_id': 2114273, 'mtr_portfolio_id': 25903634, 'dashboard_result_id': 13896115, '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_P25903634_12-08-2025_08_17_31.pdf'}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25895867 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': 3507480, 'mtr_portfolio_id': 25895867, 'created_at': datetime.datetime(2025, 8, 12, 6, 13, 29), 'result': '0.049272118412852874', 'result_long': None, 'result_double': None}] Qualite : 0.049272118412852874 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25895867 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25895867_12-08-2025_06_13_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25895867 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_P25895867_12-08-2025_06_13_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25895868, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25895869, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25895870, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25895871, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25895872, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25895873, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25895874, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25895875, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25895876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25895877, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25895878, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25895879, 'pht': 3726}}" where mtr_portfolio_id = 25895867 and dashboard_run_id = 2114273 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`=25895867 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896096, 0.049272118412852874, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25895867_12-08-2025_06_13_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25895868, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25895869, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25895870, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25895871, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25895872, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25895873, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25895874, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25895875, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25895876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25895877, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25895878, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25895879, '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 = 25896197 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25896197 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25896197 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25896197 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25896197 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3507481, 'mtr_portfolio_id': 25896197, 'created_at': datetime.datetime(2025, 8, 12, 6, 13, 59), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25896197 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896197_12-08-2025_06_13_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25896197 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_P25896197_12-08-2025_06_13_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896198, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896199, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896200, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896201, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896203, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896204, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896205, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896206, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896207, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896209, 'pht': 3726}}" where mtr_portfolio_id = 25896197 and dashboard_run_id = 2114273 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`=25896197 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896097, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896197_12-08-2025_06_13_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896198, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896199, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896200, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896201, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896202, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896203, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896204, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896205, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896206, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896207, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896209, '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 = 25896261 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': 3507482, 'mtr_portfolio_id': 25896261, 'created_at': datetime.datetime(2025, 8, 12, 6, 14, 31), 'result': '0.012017190257155207', 'result_long': None, 'result_double': None}] Qualite : 0.012017190257155207 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25896261 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896261_12-08-2025_06_14_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25896261 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_P25896261_12-08-2025_06_14_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25896262, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896263, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896264, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896265, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896268, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896269, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896270, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896271, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896272, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896273, 'pht': 3726}}" where mtr_portfolio_id = 25896261 and dashboard_run_id = 2114273 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`=25896261 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896098, 0.012017190257155207, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896261_12-08-2025_06_14_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25896262, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896263, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896264, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896265, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896266, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896267, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896268, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896269, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896270, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896271, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896272, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896273, '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 = 25896436 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': 3507483, 'mtr_portfolio_id': 25896436, 'created_at': datetime.datetime(2025, 8, 12, 6, 15, 30), 'result': '0.012710744318666202', 'result_long': None, 'result_double': None}] Qualite : 0.012710744318666202 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25896436 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896436_12-08-2025_06_15_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25896436 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_P25896436_12-08-2025_06_15_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896437, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896439, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896440, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896442, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896443, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896444, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896445, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896446, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896447, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896448, 'pht': 3726}}" where mtr_portfolio_id = 25896436 and dashboard_run_id = 2114273 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`=25896436 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896099, 0.012710744318666202, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896436_12-08-2025_06_15_30.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896437, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896438, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896439, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896440, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896442, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896443, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896444, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896445, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896446, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896447, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896448, '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 = 25896871 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': 3507484, 'mtr_portfolio_id': 25896871, 'created_at': datetime.datetime(2025, 8, 12, 6, 15, 40), 'result': '0.030395758319542426', 'result_long': None, 'result_double': None}] Qualite : 0.030395758319542426 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25896871 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896871_12-08-2025_06_15_41.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25896871 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_P25896871_12-08-2025_06_15_41.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896876, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896877, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896878, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896879, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896881, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896882, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896883, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896884, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896885, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896887, 'pht': 3726}}" where mtr_portfolio_id = 25896871 and dashboard_run_id = 2114273 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`=25896871 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896100, 0.030395758319542426, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25896871_12-08-2025_06_15_41.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25896876, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25896877, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25896878, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25896879, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25896880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25896881, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25896882, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25896883, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25896884, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25896885, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25896886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25896887, '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 = 25897219 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': 3507485, 'mtr_portfolio_id': 25897219, 'created_at': datetime.datetime(2025, 8, 12, 6, 15, 57), 'result': '0.02445817433192703', 'result_long': None, 'result_double': None}] Qualite : 0.02445817433192703 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25897219 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25897219_12-08-2025_06_15_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25897219 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_P25897219_12-08-2025_06_15_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897220, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897221, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897222, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897223, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897224, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897226, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897227, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897229, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897230, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897231, 'pht': 3726}}" where mtr_portfolio_id = 25897219 and dashboard_run_id = 2114273 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`=25897219 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896101, 0.02445817433192703, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25897219_12-08-2025_06_15_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897220, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897221, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897222, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897223, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897224, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897225, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897226, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897227, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897228, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897229, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897230, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897231, '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 = 25897705 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': 3507487, 'mtr_portfolio_id': 25897705, 'created_at': datetime.datetime(2025, 8, 12, 6, 16, 58), 'result': '0.02009732912368027', 'result_long': None, 'result_double': None}] Qualite : 0.02009732912368027 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25897705 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25897705_12-08-2025_06_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25897705 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_P25897705_12-08-2025_06_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897712, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897714, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897715, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897717, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897718, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897719, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897720, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897721, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897723, 'pht': 3726}}" where mtr_portfolio_id = 25897705 and dashboard_run_id = 2114273 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`=25897705 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896102, 0.02009732912368027, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25897705_12-08-2025_06_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897712, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897714, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897715, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897716, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897717, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897718, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897719, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897720, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897721, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897722, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897723, '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 = 25897901 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': 3507488, 'mtr_portfolio_id': 25897901, 'created_at': datetime.datetime(2025, 8, 12, 6, 17, 31), 'result': '0.04946866804117232', 'result_long': None, 'result_double': None}] Qualite : 0.04946866804117232 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25897901 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25897901_12-08-2025_06_17_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25897901 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_P25897901_12-08-2025_06_17_33.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897906, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897907, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897908, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897909, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897910, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897911, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897912, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897913, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897915, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897916, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897917, 'pht': 3726}}" where mtr_portfolio_id = 25897901 and dashboard_run_id = 2114273 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`=25897901 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896103, 0.04946866804117232, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25897901_12-08-2025_06_17_33.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25897906, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25897907, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25897908, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25897909, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25897910, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25897911, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25897912, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25897913, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25897914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25897915, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25897916, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25897917, '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 = 25898104 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': 3507409, 'mtr_portfolio_id': 25898104, 'created_at': datetime.datetime(2025, 8, 12, 5, 46, 58), 'result': '0.038864547318779134', 'result_long': None, 'result_double': None}] Qualite : 0.038864547318779134 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25898104 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25898104_12-08-2025_05_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25898104 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_P25898104_12-08-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898109, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898110, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898111, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898112, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898113, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898114, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898116, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898117, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898118, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898119, 'pht': 3726}}" where mtr_portfolio_id = 25898104 and dashboard_run_id = 2114273 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`=25898104 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896104, 0.038864547318779134, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25898104_12-08-2025_05_46_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898108, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898109, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898110, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898111, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898112, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898113, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898114, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898116, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898117, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898118, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898119, '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 = 25898373 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': 3507623, 'mtr_portfolio_id': 25898373, 'created_at': datetime.datetime(2025, 8, 12, 6, 3, 29), 'result': '0.04119517580773433', 'result_long': None, 'result_double': None}] Qualite : 0.04119517580773433 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25898373 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25898373_12-08-2025_06_03_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25898373 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_P25898373_12-08-2025_06_03_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898384, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898385, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898386, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898387, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898388, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898390, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898391, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898394, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898395, 'pht': 3726}}" where mtr_portfolio_id = 25898373 and dashboard_run_id = 2114273 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`=25898373 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896105, 0.04119517580773433, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25898373_12-08-2025_06_03_30.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898384, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898385, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898386, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898387, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898388, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898390, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898391, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898392, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898393, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898394, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898395, '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 = 25898660 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': 3507727, 'mtr_portfolio_id': 25898660, 'created_at': datetime.datetime(2025, 8, 12, 6, 19, 29), 'result': '0.07986127153558077', 'result_long': None, 'result_double': None}] Qualite : 0.07986127153558077 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25898660 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25898660_12-08-2025_06_19_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25898660 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_P25898660_12-08-2025_06_19_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898668, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898672, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898673, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898674, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898676, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898677, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898678, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898679, 'pht': 3726}}" where mtr_portfolio_id = 25898660 and dashboard_run_id = 2114273 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`=25898660 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896106, 0.07986127153558077, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25898660_12-08-2025_06_19_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25898668, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25898669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25898670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25898671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25898672, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25898673, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25898674, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25898675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25898676, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25898677, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25898678, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25898679, '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 = 25899270 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': 3507902, 'mtr_portfolio_id': 25899270, 'created_at': datetime.datetime(2025, 8, 12, 6, 33), 'result': '0.0389980329602642', 'result_long': None, 'result_double': None}] Qualite : 0.0389980329602642 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25899270 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25899270_12-08-2025_06_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25899270 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_P25899270_12-08-2025_06_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25899278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25899279, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25899280, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25899281, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25899282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25899283, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25899284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25899285, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25899286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25899287, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25899288, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25899289, 'pht': 3726}}" where mtr_portfolio_id = 25899270 and dashboard_run_id = 2114273 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`=25899270 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896107, 0.0389980329602642, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25899270_12-08-2025_06_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25899278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25899279, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25899280, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25899281, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25899282, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25899283, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25899284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25899285, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25899286, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25899287, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25899288, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25899289, '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 = 25899643 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': 3508093, 'mtr_portfolio_id': 25899643, 'created_at': datetime.datetime(2025, 8, 12, 6, 46, 59), 'result': '0.08817677466296753', 'result_long': None, 'result_double': None}] Qualite : 0.08817677466296753 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25899643 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25899643_12-08-2025_06_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25899643 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_P25899643_12-08-2025_06_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25899656, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25899657, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25899658, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25899659, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25899660, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25899661, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25899662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25899663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25899664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25899665, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25899666, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25899667, 'pht': 3726}}" where mtr_portfolio_id = 25899643 and dashboard_run_id = 2114273 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`=25899643 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896108, 0.08817677466296753, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25899643_12-08-2025_06_47_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25899656, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25899657, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25899658, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25899659, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25899660, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25899661, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25899662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25899663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25899664, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25899665, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25899666, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25899667, '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 = 25900002 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': 3508269, 'mtr_portfolio_id': 25900002, 'created_at': datetime.datetime(2025, 8, 12, 7, 2, 58), 'result': '0.08172981193523134', 'result_long': None, 'result_double': None}] Qualite : 0.08172981193523134 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25900002 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25900002_12-08-2025_07_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25900002 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_P25900002_12-08-2025_07_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25900017, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25900018, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25900019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25900020, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25900021, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25900022, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25900023, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25900024, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25900025, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25900026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25900027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25900028, 'pht': 3726}}" where mtr_portfolio_id = 25900002 and dashboard_run_id = 2114273 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`=25900002 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896109, 0.08172981193523134, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25900002_12-08-2025_07_02_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25900017, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25900018, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25900019, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25900020, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25900021, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25900022, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25900023, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25900024, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25900025, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25900026, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25900027, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25900028, '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 = 25900452 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': 3508511, 'mtr_portfolio_id': 25900452, 'created_at': datetime.datetime(2025, 8, 12, 7, 20, 59), 'result': '0.04062297625509912', 'result_long': None, 'result_double': None}] Qualite : 0.04062297625509912 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25900452 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25900452_12-08-2025_07_20_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25900452 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_P25900452_12-08-2025_07_20_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25900484, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25900485, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25900486, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25900487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25900489, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25900490, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25900491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25900492, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25900493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25900494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25900495, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25900496, 'pht': 3726}}" where mtr_portfolio_id = 25900452 and dashboard_run_id = 2114273 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`=25900452 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896110, 0.04062297625509912, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25900452_12-08-2025_07_20_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25900484, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25900485, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25900486, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25900487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25900489, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25900490, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25900491, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25900492, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25900493, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25900494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25900495, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25900496, '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 = 25901307 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': 3508793, 'mtr_portfolio_id': 25901307, 'created_at': datetime.datetime(2025, 8, 12, 7, 32, 58), 'result': '0.07658116203786297', 'result_long': None, 'result_double': None}] Qualite : 0.07658116203786297 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25901307 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25901307_12-08-2025_07_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25901307 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_P25901307_12-08-2025_07_32_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25901328, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25901329, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25901330, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25901331, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25901332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25901333, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25901334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25901335, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25901336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25901337, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25901338, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25901339, 'pht': 3726}}" where mtr_portfolio_id = 25901307 and dashboard_run_id = 2114273 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`=25901307 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896111, 0.07658116203786297, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25901307_12-08-2025_07_32_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25901328, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25901329, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25901330, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25901331, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25901332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25901333, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25901334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25901335, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25901336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25901337, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25901338, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25901339, '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 = 25901859 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': 3508951, 'mtr_portfolio_id': 25901859, 'created_at': datetime.datetime(2025, 8, 12, 7, 47), 'result': '0.11561044520249761', 'result_long': None, 'result_double': None}] Qualite : 0.11561044520249761 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25901859 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25901859_12-08-2025_07_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25901859 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_P25901859_12-08-2025_07_47_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25901892, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25901893, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25901894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25901895, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25901896, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25901897, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25901898, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25901899, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25901900, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25901901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25901902, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25901903, 'pht': 3726}}" where mtr_portfolio_id = 25901859 and dashboard_run_id = 2114275 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`=25901859 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896112, 0.11561044520249761, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25901859_12-08-2025_07_47_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25901892, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25901893, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25901894, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25901895, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25901896, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25901897, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25901898, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25901899, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25901900, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25901901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25901902, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25901903, '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 = 25902347 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': 3509130, 'mtr_portfolio_id': 25902347, 'created_at': datetime.datetime(2025, 8, 12, 8, 2, 57), 'result': '0.007396132846901628', 'result_long': None, 'result_double': None}] Qualite : 0.007396132846901628 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25902347 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25902347_12-08-2025_08_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25902347 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_P25902347_12-08-2025_08_02_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25902379, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25902380, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25902381, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25902382, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25902383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25902384, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25902385, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25902386, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25902387, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25902388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25902389, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25902390, 'pht': 3726}}" where mtr_portfolio_id = 25902347 and dashboard_run_id = 2114275 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`=25902347 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896113, 0.007396132846901628, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25902347_12-08-2025_08_02_58.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25902379, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25902380, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25902381, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25902382, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25902383, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25902384, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25902385, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25902386, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25902387, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25902388, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25902389, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25902390, '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 = 25902893 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': 3509364, 'mtr_portfolio_id': 25902893, 'created_at': datetime.datetime(2025, 8, 12, 8, 17), 'result': '0.04033312440078381', 'result_long': None, 'result_double': None}] Qualite : 0.04033312440078381 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25902893 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25902893_12-08-2025_08_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25902893 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_P25902893_12-08-2025_08_17_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25902944, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25902945, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25902946, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25902947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25902948, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25902949, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25902950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25902951, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25902952, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25902953, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25902955, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25902956, 'pht': 3726}}" where mtr_portfolio_id = 25902893 and dashboard_run_id = 2114275 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`=25902893 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13896114, 0.04033312440078381, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25902893_12-08-2025_08_17_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25902944, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25902945, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25902946, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25902947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25902948, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25902949, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25902950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25902951, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25902952, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25902953, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25902955, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25902956, '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 = 25903634 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25903634 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25903634 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25903634 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25903634 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25903634 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25903634_12-08-2025_08_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25903634 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_P25903634_12-08-2025_08_19_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25903677, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25903678, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25903679, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25903680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25903681, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25903682, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25903683, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25903684, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25903685, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25903686, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25903687, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25903688, 'pht': 3726}}" where mtr_portfolio_id = 25903634 and dashboard_run_id = 2114275 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25895867,25896197,25896261,25896436,25896871,25897219,25897705,25897901,25898104,25898373,25898660,25899270,25899643,25900002,25900452,25901307,25901859,25902347,25902893,25903634) result : ((1376531258,), (1376531301,), (1376531355,), (1376531357,), (1376531600,), (1376531633,), (1376531656,), (1376531680,), (1376531726,), (1376535450,), (1376535498,), (1376535520,), (1376535588,), (1376535613,), (1376535664,), (1376535744,), (1376535813,), (1376535836,), (1376535924,), (1376535926,), (1376535972,), (1376535983,), (1376535984,), (1376536024,), (1376536064,), (1376536066,), (1376536069,), (1376536526,), (1376538224,), (1376538998,), (1376539337,), (1376540014,), (1376540054,), (1376540105,), (1376540241,), (1376540296,), (1376541744,), (1376541769,), (1376542025,), (1376543034,), (1376543429,), (1376543430,), (1376543512,), (1376543515,), (1376543615,), (1376543975,), (1376543977,), (1376544032,), (1376544043,), (1376544063,), (1376544082,), (1376544113,), (1376546179,), (1376550015,), (1376550127,), (1376550179,), (1376550187,), (1376550190,), (1376550193,), (1376550257,), (1376550261,), (1376550265,), (1376550266,), (1376550285,), (1376550294,), (1376550298,), (1376550300,), (1376550320,), (1376550438,), (1376550468,), (1376550469,), (1376550610,), (1376550603,), (1376550608,), (1376550642,), (1376550646,), (1376550647,), (1376550668,), (1376550670,), (1376550672,), (1376550675,), (1376550768,), (1376550770,), (1376550774,), (1376550776,), (1376550810,), (1376550872,), (1376550903,), (1376550905,), (1376550935,), (1376550937,), (1376550938,), (1376550958,), (1376550961,), (1376550963,), (1376550964,), (1376550966,), (1376550983,), (1376550986,), (1376550989,), (1376551048,), (1376551052,), (1376551056,), (1376551061,), (1376551066,), (1376551071,), (1376551092,), (1376551094,), (1376551098,), (1376551101,), (1376551187,), (1376551176,), (1376551179,), (1376551181,), (1376551183,), (1376551186,), (1376551216,), (1376551223,), (1376551236,), (1376551240,), (1376551242,), (1376551243,), (1376551245,), (1376551269,), (1376551274,), (1376551279,), (1376551280,), (1376551300,), (1376551302,), (1376551306,), (1376551311,), (1376551338,), (1376551340,), (1376551343,), (1376551344,), (1376551347,), (1376551349,), (1376551365,), (1376551368,), (1376551370,), (1376551372,), (1376551375,), (1376551378,), (1376551394,), (1376551396,), (1376551429,), (1376551462,), (1376551464,), (1376551468,), (1376551471,), (1376551548,), (1376551558,), (1376551560,), (1376551561,), (1376551563,), (1376551565,), (1376551588,), (1376551592,), (1376551593,), (1376551595,), (1376551598,), (1376551601,), (1376551615,), (1376551618,), (1376551620,), (1376551650,), (1376551653,), (1376551655,), (1376551658,), (1376551661,), (1376551664,), (1376551678,), (1376551679,), (1376551681,), (1376551683,), (1376551712,), (1376551705,), (1376551707,), (1376551709,), (1376551741,), (1376551743,), (1376551746,), (1376551750,), (1376551751,), (1376551766,), (1376551769,), (1376551772,), (1376551777,), (1376551782,), (1376551803,), (1376551810,), (1376551813,), (1376551816,), (1376551818,), (1376551840,), (1376551843,), (1376551844,), (1376551846,), (1376551929,), (1376552000,), (1376552004,), (1376552006,), (1376552007,), (1376552009,), (1376552011,), (1376552042,), (1376552045,), (1376552047,), (1376552048,), (1376552050,), (1376552051,), (1376552065,), (1376552067,), (1376552070,), (1376552073,), (1376552092,), (1376552095,), (1376552098,), (1376552103,), (1376552107,), (1376552135,), (1376552136,), (1376552138,), (1376552140,), (1376552143,), (1376552146,), (1376552154,), (1376552158,), (1376552162,), (1376552177,), (1376552198,), (1376552297,), (1376552324,), (1376552346,), (1376552767,), (1376552770,), (1376552777,), (1376552780,), (1376552784,), (1376552787,), (1376552837,), (1376552861,), (1376552887,), (1376553055,), (1376553010,), (1376553024,), (1376553333,), (1376553423,), (1376553446,), (1376553468,), (1376553494,), (1376553518,), (1376553661,), (1376553664,), (1376553667,), (1376553671,), (1376553674,), (1376553870,), (1376553891,), (1376553915,), (1376553934,), (1376554224,), (1376554251,), (1376554274,), (1376554295,), (1376554322,), (1376554344,), (1376554593,), (1376554612,), (1376554614,), (1376554617,), (1376554618,), (1376554776,), (1376554799,), (1376554813,), (1376554815,), (1376554827,), (1376554829,), (1376554841,), (1376554847,), (1376554872,), (1376554875,), (1376554877,), (1376554879,), (1376554901,), (1376554903,), (1376554905,), (1376554906,), (1376554952,), (1376554954,), (1376554957,), (1376554961,), (1376554963,), (1376554966,), (1376554989,), (1376554991,), (1376554992,), (1376554994,), (1376554996,), (1376554999,), (1376555021,), (1376555024,), (1376555026,), (1376555028,), (1376555050,), (1376555053,), (1376555054,), (1376555057,), (1376555061,), (1376555064,), (1376555076,), (1376555122,), (1376555118,), (1376555119,), (1376555120,), (1376555135,), (1376555138,), (1376555168,), (1376555171,), (1376555174,), (1376555177,), (1376555179,), (1376555192,), (1376555200,), (1376555204,), (1376555206,), (1376555247,), (1376555251,), (1376555252,), (1376555254,), (1376555257,), (1376555281,), (1376555309,), (1376555325,), (1376555327,), (1376555344,), (1376555347,), (1376555348,), (1376555526,), (1376555513,), (1376555515,), (1376555518,), (1376555523,), (1376555545,), (1376555548,), (1376555549,), (1376555565,), (1376555570,), (1376555571,), (1376555573,), (1376555584,), (1376555586,), (1376555587,), (1376555589,), (1376555593,), (1376555597,), (1376555614,), (1376555616,), (1376555619,), (1376555621,), (1376555648,), (1376555650,), (1376555653,), (1376555657,), (1376555661,), (1376555676,), (1376555678,), (1376555681,), (1376555683,), (1376555685,), (1376555689,), (1376555699,), (1376555701,), (1376555702,), (1376555705,), (1376555711,), (1376555715,), (1376555718,), (1376555722,), (1376555733,), (1376555736,), (1376555739,), (1376555743,), (1376555745,), (1376555748,), (1376555766,), (1376555768,), (1376555770,), (1376555773,), (1376555805,), (1376555809,), (1376555810,), (1376555812,), (1376555813,), (1376555843,), (1376555846,), (1376555847,), (1376555849,), (1376555850,), (1376555853,), (1376555864,), (1376555866,), (1376555869,), (1376555873,), (1376555877,), (1376555882,), (1376555903,), (1376555911,), (1376555912,), (1376555914,), (1376555936,), (1376555940,), (1376555941,), (1376555944,), (1376555948,), (1376555952,), (1376555974,), (1376555970,), (1376555971,), (1376555972,), (1376555996,), (1376555998,), (1376556001,), (1376556004,), (1376556019,), (1376556020,), (1376556022,), (1376556025,), (1376556028,), (1376556031,), (1376556049,), (1376556053,), (1376556055,), (1376556057,), (1376556085,), (1376556088,), (1376556124,), (1376556125,), (1376556179,), (1376556196,), (1376556198,), (1376556199,), (1376556200,), (1376556203,), (1376556244,), (1376556246,), (1376556249,), (1376556253,), (1376556257,), (1376556260,), (1376556284,), (1376556287,), (1376556290,), (1376556294,), (1376556299,), (1376556319,), (1376556321,), (1376556325,), (1376556328,), (1376556329,), (1376556331,), (1376556339,), (1376556341,), (1376556345,), (1376556356,), (1376556359,), (1376556362,), (1376556366,), (1376556370,), (1376556372,), (1376556644,), (1376556671,), (1376556702,), (1376556729,), (1376556758,), (1376556839,), (1376556840,), (1376556863,), (1376556866,), (1376556889,), (1376556891,), (1376557087,), (1376557021,), (1376557026,), (1376557030,), (1376557034,), (1376557062,), (1376557440,), (1376557487,), (1376557535,), (1376557577,), (1376557600,), (1376557628,), (1376557915,), (1376557919,), (1376557921,), (1376557923,), (1376558081,), (1376558092,), (1376558109,), (1376558125,), (1376558149,), (1376558180,), (1376558452,), (1376558482,), (1376558506,), (1376558532,), (1376558555,), (1376558757,), (1376558761,), (1376558764,), (1376558769,), (1376558934,), (1376558950,), (1376558956,), (1376558958,), (1376558975,), (1376558979,), (1376558982,), (1376558985,), (1376558987,), (1376559014,), (1376559016,), (1376559021,), (1376559025,), (1376559075,), (1376559084,), (1376559090,), (1376559095,), (1376559100,), (1376559105,), (1376559121,), (1376559127,), (1376559163,), (1376559405,), (1376559425,), (1376559557,), (1376559586,), (1376559608,), (1376559610,), (1376559801,), (1376560066,), (1376560064,), (1376560096,), (1376560100,), (1376560104,), (1376560106,), (1376560110,), (1376560131,), (1376560135,), (1376560137,), (1376560170,), (1376560197,), (1376560221,), (1376560252,), (1376560286,), (1376560532,), (1376560544,), (1376560548,), (1376560550,), (1376560644,), (1376560651,), (1376560669,), (1376560673,), (1376560675,), (1376560676,), (1376560921,), (1376560968,), (1376560991,), (1376561001,), (1376561062,), (1376561066,), (1376561083,), (1376561087,), (1376561091,), (1376561214,), (1376561230,), (1376561236,), (1376561240,), (1376561242,), (1376561245,), (1376561249,), (1376561253,), (1376561255,), (1376561262,), (1376561286,), (1376561354,), (1376561379,), (1376561402,), (1376561404,), (1376561468,), (1376561473,), (1376561481,), (1376561483,), (1376561796,), (1376561839,), (1376561868,), (1376561908,), (1376561937,), (1376562076,), (1376562072,), (1376562074,), (1376562098,), (1376562101,), (1376562102,), (1376562104,), (1376562107,), (1376562138,), (1376562140,), (1376562142,), (1376562143,), (1376562146,), (1376562149,), (1376562169,), (1376562174,), (1376562176,), (1376562178,), (1376562194,), (1376562196,), (1376562199,), (1376562203,), (1376562206,), (1376562227,), (1376562231,), (1376562232,), (1376562235,), (1376562237,), (1376562257,), (1376562260,), (1376562262,), (1376562264,), (1376562265,), (1376562285,), (1376562294,), (1376562296,), (1376562304,), (1376562329,), (1376562513,), (1376562524,), (1376562528,), (1376562543,), (1376562567,), (1376562619,), (1376562624,), (1376562625,), (1376562664,), (1376562667,), (1376562669,), (1376562672,), (1376562677,), (1376562679,), (1376562711,), (1376562713,), (1376562716,), (1376562719,), (1376562720,), (1376562723,), (1376562728,), (1376562730,), (1376562731,), (1376562735,), (1376562738,), (1376562739,), (1376562753,), (1376562758,), (1376562762,), (1376562768,), (1376562798,), (1376562824,), (1376562979,), (1376562918,), (1376562948,), (1376563144,), (1376563169,), (1376563195,), (1376563220,), (1376563247,), (1376563274,), (1376563366,), (1376563368,), (1376563370,), (1376563372,), (1376563373,), (1376563386,), (1376563484,), (1376563508,), (1376563511,), (1376563514,), (1376563515,), (1376563523,), (1376563658,), (1376563683,), (1376563699,), (1376563702,), (1376563715,), (1376563723,), (1376563745,), (1376563749,), (1376563751,), (1376563754,), (1376563757,), (1376563760,), (1376563768,), (1376563771,), (1376563774,), (1376563777,), (1376563778,), (1376563781,), (1376563789,), (1376563804,), (1376563805,), (1376563807,), (1376563809,), (1376563811,), (1376563813,), (1376563831,), (1376563835,), (1376563836,), (1376563838,), (1376563840,), (1376563866,), (1376563875,), (1376563876,), (1376563878,), (1376563880,), (1376563890,), (1376563892,), (1376563894,), (1376563895,), (1376563897,), (1376563900,), (1376563919,), (1376563923,), (1376563924,), (1376563944,), (1376563946,), (1376563948,), (1376563967,), (1376563971,), (1376563973,), (1376563975,), (1376564632,), (1376564684,), (1376564746,), (1376564795,), (1376564853,), (1376564899,), (1376565072,), (1376565124,), (1376565196,), (1376565648,), (1376565490,), (1376565538,), (1376565569,), (1376565623,), (1376566277,), (1376566316,), (1376566349,), (1376566409,), (1376566844,), (1376566896,), (1376566941,), (1376566989,), (1376567459,), (1376567487,), (1376567656,), (1376567660,), (1376567661,), (1376567844,), (1376567869,), (1376567898,), (1376567922,), (1376568231,), (1376568261,), (1376568276,), (1376568449,), (1376568757,), (1376568759,), (1376568760,), (1376568762,), (1376568776,), (1376568777,), (1376568798,), (1376568801,), (1376568802,), (1376568804,), (1376568845,), (1376568869,), (1376568873,), (1376568882,), (1376568890,), (1376569046,), (1376569064,), (1376569068,), (1376569070,), (1376569073,), (1376569094,), (1376569096,), (1376569098,), (1376569129,), (1376569124,), (1376569126,), (1376569127,), (1376569171,), (1376569176,), (1376569181,), (1376569184,), (1376569185,), (1376569234,), (1376569237,), (1376569260,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'12082025': {'nb_upload': 11, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25903634]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] map_info['map_portfolio_photo'] : {25903634: [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171, 1376569127, 1376569126, 1376569124]} final : True mtd_id 4302 list_pids : [1376569260, 1376569237, 1376569234, 1376569185, 1376569184, 1376569181, 1376569176, 1376569171] Looping around the photos to save general results len do output : 1 /25903634Didn'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, '3509542') ('4302', '25903634', '1376569260', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569237', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569234', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569185', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569184', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569181', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569176', None, None, None, None, None, '3509542') ('4302', None, None, None, None, None, None, None, '3509542') ('4302', '25903634', '1376569171', None, None, None, None, None, '3509542') 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', None, '25903634', 'None', None, None, None, None, '3509542'), ('4302', '25903634', '1376569260', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569237', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569234', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569185', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569184', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569181', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569176', None, None, None, None, None, '3509542'), ('4302', '25903634', '1376569171', None, None, None, None, None, '3509542')] time used for this insertion : 0.015600442886352539 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.72703218460083 time spend to save output : 0.015780210494995117 total time spend for step 5 : 1.7428123950958252 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 (3509542) 1.89user 2.42system 0:09.20elapsed 46%CPU (0avgtext+0avgdata 159428maxresident)k 2416inputs+4560outputs (59major+64098minor)pagefaults 0swaps