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 : 3479041 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 (3645506) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3645506) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391828 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3645506'] with mtr_portfolio_ids : ['26391828'] and first list_photo_ids : [] new path : /proc/3479041/ Name: python3 Umask: 0002 State: R (running) Tgid: 3479041 Ngid: 0 Pid: 3479041 PPid: 3479040 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3479041 NSpid: 3479041 NSpgid: 3476942 NSsid: 3476942 VmPeak: 1107252 kB VmSize: 1107252 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98148 kB VmRSS: 98148 kB RssAnon: 60164 kB RssFile: 37984 kB RssShmem: 0 kB VmData: 866004 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 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: 71 nonvoluntary_ctxt_switches: 108 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3479041', 'Ngid': '0', 'Pid': '3479041', 'PPid': '3479040', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3479041', 'NSpid': '3479041', 'NSpgid': '3476942', 'NSsid': '3476942', 'VmPeak': '1107252 kB', 'VmSize': '1107252 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98148 kB', 'VmRSS': '98148 kB', 'RssAnon': '60164 kB', 'RssFile': '37984 kB', 'RssShmem': '0 kB', 'VmData': '866004 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 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': '71', 'nonvoluntary_ctxt_switches': '108'} ('datou_batch_current', '3479041', '1107252', '0', '1107252', '866004', '98148', b'', 'marlene', '3645506') 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 (26391828) 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 (3645506 ) ) 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 (26391828) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1380598783, 'portfolio_id': 26391828}, {'photo_id': 1380598782, 'portfolio_id': 26391828}, {'photo_id': 1380598739, 'portfolio_id': 26391828}, {'photo_id': 1380598738, 'portfolio_id': 26391828}, {'photo_id': 1380598737, 'portfolio_id': 26391828}, {'photo_id': 1380598736, 'portfolio_id': 26391828}, {'photo_id': 1380598715, 'portfolio_id': 26391828}, {'photo_id': 1380598714, 'portfolio_id': 26391828}, {'photo_id': 1380598681, 'portfolio_id': 26391828}, {'photo_id': 1380598680, 'portfolio_id': 26391828}, {'photo_id': 1380598679, 'portfolio_id': 26391828}, {'photo_id': 1380598678, 'portfolio_id': 26391828}, {'photo_id': 1380598649, 'portfolio_id': 26391828}, {'photo_id': 1380598648, 'portfolio_id': 26391828}, {'photo_id': 1380598647, 'portfolio_id': 26391828}, {'photo_id': 1380598646, 'portfolio_id': 26391828}, {'photo_id': 1380598645, 'portfolio_id': 26391828}, {'photo_id': 1380598536, 'portfolio_id': 26391828}, {'photo_id': 1380598535, 'portfolio_id': 26391828}, {'photo_id': 1380598534, 'portfolio_id': 26391828}, {'photo_id': 1380598533, 'portfolio_id': 26391828}, {'photo_id': 1380598532, 'portfolio_id': 26391828}, {'photo_id': 1380598503, 'portfolio_id': 26391828}, {'photo_id': 1380598502, 'portfolio_id': 26391828}, {'photo_id': 1380598501, 'portfolio_id': 26391828}, {'photo_id': 1380598500, 'portfolio_id': 26391828}, {'photo_id': 1380598471, 'portfolio_id': 26391828}, {'photo_id': 1380598470, 'portfolio_id': 26391828}, {'photo_id': 1380598468, 'portfolio_id': 26391828}, {'photo_id': 1380598467, 'portfolio_id': 26391828}, {'photo_id': 1380598466, 'portfolio_id': 26391828}, {'photo_id': 1380598465, 'portfolio_id': 26391828}, {'photo_id': 1380598454, 'portfolio_id': 26391828}, {'photo_id': 1380598453, 'portfolio_id': 26391828}, {'photo_id': 1380598452, 'portfolio_id': 26391828}, {'photo_id': 1380598450, 'portfolio_id': 26391828}, {'photo_id': 1380598449, 'portfolio_id': 26391828}, {'photo_id': 1380598448, 'portfolio_id': 26391828}, {'photo_id': 1380598281, 'portfolio_id': 26391828}, {'photo_id': 1380598279, 'portfolio_id': 26391828}, {'photo_id': 1380598277, 'portfolio_id': 26391828}, {'photo_id': 1380598275, 'portfolio_id': 26391828}, {'photo_id': 1380598273, 'portfolio_id': 26391828}, {'photo_id': 1380598271, 'portfolio_id': 26391828}, {'photo_id': 1380597963, 'portfolio_id': 26391828}, {'photo_id': 1380597960, 'portfolio_id': 26391828}, {'photo_id': 1380597957, 'portfolio_id': 26391828}, {'photo_id': 1380597954, 'portfolio_id': 26391828}, {'photo_id': 1380597614, 'portfolio_id': 26391828}, {'photo_id': 1380597611, 'portfolio_id': 26391828}, {'photo_id': 1380597608, 'portfolio_id': 26391828}, {'photo_id': 1380597079, 'portfolio_id': 26391828}, {'photo_id': 1380597076, 'portfolio_id': 26391828}, {'photo_id': 1380597073, 'portfolio_id': 26391828}, {'photo_id': 1380596233, 'portfolio_id': 26391828}] map_portfolio_id_photo_id: {26391828: [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736, 1380598715, 1380598714, 1380598681, 1380598680, 1380598679, 1380598678, 1380598649, 1380598648, 1380598647, 1380598646, 1380598645, 1380598536, 1380598535, 1380598534, 1380598533, 1380598532, 1380598503, 1380598502, 1380598501, 1380598500, 1380598471, 1380598470, 1380598468, 1380598467, 1380598466, 1380598465, 1380598454, 1380598453, 1380598452, 1380598450, 1380598449, 1380598448, 1380598281, 1380598279, 1380598277, 1380598275, 1380598273, 1380598271, 1380597963, 1380597960, 1380597957, 1380597954, 1380597614, 1380597611, 1380597608, 1380597079, 1380597076, 1380597073, 1380596233]} ##### 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.014956474304199219 #### 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 Mon Sep 1 11:14:56 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 (26391828) 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 : 26391828 get user id for portfolio 26391828 get sub ptf for main ptf 26391828, type 3726 and hashtags ['environnement', 'autre_refus', 'kraft', 'plastique', 'mal_croppe', 'cartonnette', 'flou', 'papier', 'Teint_Dans_La_Masse', 'metal', 'Carton_brun', 'Carton_gris'] 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`=26391828 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','mal_croppe','cartonnette','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','Carton_gris')) 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`=26391828 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','mal_croppe','cartonnette','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 26391828, 'sub_port_id': 26391834, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757405, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'plastique': {'main_port_id': 26391828, 'sub_port_id': 26391835, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757406, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'mal_croppe': {'main_port_id': 26391828, 'sub_port_id': 26391836, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757407, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 26391828, 'sub_port_id': 26391837, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757408, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'metal': {'main_port_id': 26391828, 'sub_port_id': 26391838, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757409, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'cartonnette': {'main_port_id': 26391828, 'sub_port_id': 26391839, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757410, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'environnement': {'main_port_id': 26391828, 'sub_port_id': 26391840, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757411, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'Carton_brun': {'main_port_id': 26391828, 'sub_port_id': 26391841, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757412, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'papier': {'main_port_id': 26391828, 'sub_port_id': 26391842, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757413, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'kraft': {'main_port_id': 26391828, 'sub_port_id': 26391843, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757414, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'flou': {'main_port_id': 26391828, 'sub_port_id': 26391844, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757415, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}, 'autre_refus': {'main_port_id': 26391828, 'sub_port_id': 26391845, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757416, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391834 , 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=26391828 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 (26391834) result : ((1380598134,), (1380598478,), (1380598479,), (1380598491,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391835 , 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=26391828 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 (26391835) result : ((1380598485,), (1380598486,), (1380598701,), (1380598702,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391836 , 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=26391828 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 (26391836) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391837 , 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=26391828 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 (26391837) result : ((1380598116,), (1380598118,), (1380598120,), (1380598488,), (1380598489,), (1380598695,), (1380598707,), (1380598708,), (1380598709,), (1380598710,), (1380598761,), (1380598762,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391838 , 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=26391828 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 (26391838) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391839 , 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=26391828 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 (26391839) result : ((1380597980,), (1380598141,), (1380598480,), (1380598481,), (1380598493,), (1380598556,), (1380598560,), (1380598698,), (1380598699,), (1380598756,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391840 , 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=26391828 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 (26391840) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391841 , 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=26391828 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 (26391841) result : ((1380598482,), (1380598483,), (1380598494,), (1380598700,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391842 , 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=26391828 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 (26391842) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391843 , 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=26391828 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 (26391843) result : ((1380598487,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391844 , 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=26391828 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 (26391844) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26391845 , 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=26391828 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 (26391845) result : ((1380598128,), (1380598490,), (1380598549,), (1380598696,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26391828) result : ((1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) 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 (1380598500) and cspi.crop_hashtag_id = chi.id; 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`=26391828 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','mal_croppe','cartonnette','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','Carton_gris')) 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`=26391828 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','mal_croppe','cartonnette','flou','papier','Teint_Dans_La_Masse','metal','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 26391828, 'sub_port_id': 26391846, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757417, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'plastique': {'main_port_id': 26391828, 'sub_port_id': 26391847, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757418, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'mal_croppe': {'main_port_id': 26391828, 'sub_port_id': 26391848, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757419, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 26391828, 'sub_port_id': 26391849, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757420, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'metal': {'main_port_id': 26391828, 'sub_port_id': 26391850, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757421, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'cartonnette': {'main_port_id': 26391828, 'sub_port_id': 26391851, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757422, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'environnement': {'main_port_id': 26391828, 'sub_port_id': 26391852, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757423, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'Carton_brun': {'main_port_id': 26391828, 'sub_port_id': 26391853, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757424, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'papier': {'main_port_id': 26391828, 'sub_port_id': 26391854, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757425, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'kraft': {'main_port_id': 26391828, 'sub_port_id': 26391855, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757426, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'flou': {'main_port_id': 26391828, 'sub_port_id': 26391856, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757427, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}, 'autre_refus': {'main_port_id': 26391828, 'sub_port_id': 26391857, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17757428, 'last_updated_at': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 1, 11, 12, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 1, 11, 4, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391846,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391834 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391847,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391835 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391848,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391836 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391849,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391837 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391850,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391838 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391851,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391839 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391852,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391840 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391853,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391841 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391854,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391842 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391855,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391843 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391856,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391844 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26391857,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26391845 lien utilise dans velours : https://marlene.fotonower.com/velours/26391846,26391847,26391848,26391849,26391850,26391851,26391852,26391853,26391854,26391855,26391856,26391857?tags=Carton_gris,plastique,mal_croppe,Teint_Dans_La_Masse,metal,cartonnette,environnement,Carton_brun,papier,kraft,flou,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26391828]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] map_info['map_portfolio_photo'] : {26391828: [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736, 1380598715, 1380598714, 1380598681, 1380598680, 1380598679, 1380598678, 1380598649, 1380598648, 1380598647, 1380598646, 1380598645, 1380598536, 1380598535, 1380598534, 1380598533, 1380598532, 1380598503, 1380598502, 1380598501, 1380598500, 1380598471, 1380598470, 1380598468, 1380598467, 1380598466, 1380598465, 1380598454, 1380598453, 1380598452, 1380598450, 1380598449, 1380598448, 1380598281, 1380598279, 1380598277, 1380598275, 1380598273, 1380598271, 1380597963, 1380597960, 1380597957, 1380597954, 1380597614, 1380597611, 1380597608, 1380597079, 1380597076, 1380597073, 1380596233]} final : False mtd_id 4302 list_pids : [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] Looping around the photos to save general results len do output : 1 /26391828. 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, '3645506') ('4302', '26391828', '1380598783', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598782', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598739', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598738', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598737', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598736', None, None, None, None, None, '3645506') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '26391828', "{'Carton_gris': 26391834, 'plastique': 26391835, 'mal_croppe': 26391836, 'Teint_Dans_La_Masse': 26391837, 'metal': 26391838, 'cartonnette': 26391839, 'environnement': 26391840, 'Carton_brun': 26391841, 'papier': 26391842, 'kraft': 26391843, 'flou': 26391844, 'autre_refus': 26391845}", None, None, None, None, '3645506'), ('4302', '26391828', '1380598783', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598782', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598739', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598738', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598737', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598736', None, None, None, None, None, '3645506')] time used for this insertion : 0.013668298721313477 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4345128536224365 time spend to save output : 0.014037370681762695 total time spend for step 1 : 0.4485502243041992 step2:final Mon Sep 1 11:14:57 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 (26391828) 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 26391828 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1380596233,1380597079,1380597076,1380597073,1380597614,1380597611,1380597608,1380597963,1380597960,1380597957,1380597954,1380598471,1380598281,1380598470,1380598279,1380598277,1380598468,1380598467,1380598275,1380598273,1380598466,1380598465,1380598271,1380598454,1380598453,1380598452,1380598450,1380598449,1380598448,1380598503,1380598502,1380598501,1380598500,1380598536,1380598535,1380598534,1380598533,1380598532,1380598649,1380598648,1380598647,1380598646,1380598645,1380598681,1380598680,1380598679,1380598678,1380598715,1380598714,1380598739,1380598738,1380598737,1380598736,1380598783,1380598782); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26391828]) Inside saveOutput : final : False verbose : True original output for save of step final : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} new output for save of step final : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] map_info['map_portfolio_photo'] : {26391828: [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736, 1380598715, 1380598714, 1380598681, 1380598680, 1380598679, 1380598678, 1380598649, 1380598648, 1380598647, 1380598646, 1380598645, 1380598536, 1380598535, 1380598534, 1380598533, 1380598532, 1380598503, 1380598502, 1380598501, 1380598500, 1380598471, 1380598470, 1380598468, 1380598467, 1380598466, 1380598465, 1380598454, 1380598453, 1380598452, 1380598450, 1380598449, 1380598448, 1380598281, 1380598279, 1380598277, 1380598275, 1380598273, 1380598271, 1380597963, 1380597960, 1380597957, 1380597954, 1380597614, 1380597611, 1380597608, 1380597079, 1380597076, 1380597073, 1380596233]} final : False mtd_id 4302 list_pids : [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] Looping around the photos to save general results len do output : 6 /1380598783.Didn't retrieve data . /1380598782.Didn't retrieve data . /1380598739.Didn't retrieve data . /1380598738.Didn't retrieve data . /1380598737.Didn't retrieve data . /1380598736.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, '3645506') ('4302', '26391828', '1380598783', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598782', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598739', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598738', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598737', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598736', None, None, None, None, None, '3645506') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '26391828', '1380598783', '0.057405227427808285', None, None, None, None, '3645506'), ('4302', '26391828', '1380598782', '0.057405227427808285', None, None, None, None, '3645506'), ('4302', '26391828', '1380598739', '0.057405227427808285', None, None, None, None, '3645506'), ('4302', '26391828', '1380598738', '0.057405227427808285', None, None, None, None, '3645506'), ('4302', '26391828', '1380598737', '0.057405227427808285', None, None, None, None, '3645506'), ('4302', '26391828', '1380598736', '0.057405227427808285', None, None, None, None, '3645506')] time used for this insertion : 0.017383098602294922 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06605792045593262 time spend to save output : 0.017790794372558594 total time spend for step 2 : 0.08384871482849121 step3:velours_tree Mon Sep 1 11:14:57 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 : {26391828: [{'Carton_gris': 26391834, 'plastique': 26391835, 'mal_croppe': 26391836, 'Teint_Dans_La_Masse': 26391837, 'metal': 26391838, 'cartonnette': 26391839, 'environnement': 26391840, 'Carton_brun': 26391841, 'papier': 26391842, 'kraft': 26391843, 'flou': 26391844, 'autre_refus': 26391845}]} input_args_next_step : {26391828: ()} output_args : {26391828: [{'Carton_gris': 26391834, 'plastique': 26391835, 'mal_croppe': 26391836, 'Teint_Dans_La_Masse': 26391837, 'metal': 26391838, 'cartonnette': 26391839, 'environnement': 26391840, 'Carton_brun': 26391841, 'papier': 26391842, 'kraft': 26391843, 'flou': 26391844, 'autre_refus': 26391845}]} args : 26391828 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 : ({'Carton_gris': 26391834, 'plastique': 26391835, 'mal_croppe': 26391836, 'Teint_Dans_La_Masse': 26391837, 'metal': 26391838, 'cartonnette': 26391839, 'environnement': 26391840, 'Carton_brun': 26391841, 'papier': 26391842, 'kraft': 26391843, 'flou': 26391844, 'autre_refus': 26391845},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26391828) 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([26391828]) 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.32332444190979004 time spend to save output : 7.915496826171875e-05 total time spend for step 3 : 0.32340359687805176 step4:send_mail_cod Mon Sep 1 11:14:57 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 : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} input_args_next_step : {1380598783: ()} output_args : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} args : 1380598783 depend.output_id : 0 input_args_next_step : {1380598783: ('0.057405227427808285',), 1380598782: ()} output_args : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} args : 1380598782 depend.output_id : 0 input_args_next_step : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ()} output_args : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} args : 1380598739 depend.output_id : 0 input_args_next_step : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ()} output_args : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} args : 1380598738 depend.output_id : 0 input_args_next_step : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ()} output_args : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} args : 1380598737 depend.output_id : 0 input_args_next_step : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ()} output_args : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',)} args : 1380598736 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 : {26391828: [{'Carton_gris': 26391834, 'plastique': 26391835, 'mal_croppe': 26391836, 'Teint_Dans_La_Masse': 26391837, 'metal': 26391838, 'cartonnette': 26391839, 'environnement': 26391840, 'Carton_brun': 26391841, 'papier': 26391842, 'kraft': 26391843, 'flou': 26391844, 'autre_refus': 26391845}]} input_args_next_step : {1380598783: ('0.057405227427808285',), 1380598782: ('0.057405227427808285',), 1380598739: ('0.057405227427808285',), 1380598738: ('0.057405227427808285',), 1380598737: ('0.057405227427808285',), 1380598736: ('0.057405227427808285',), 26391828: ()} output_args : {26391828: [{'Carton_gris': 26391834, 'plastique': 26391835, 'mal_croppe': 26391836, 'Teint_Dans_La_Masse': 26391837, 'metal': 26391838, 'cartonnette': 26391839, 'environnement': 26391840, 'Carton_brun': 26391841, 'papier': 26391842, 'kraft': 26391843, 'flou': 26391844, 'autre_refus': 26391845}]} args : 26391828 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 :7, first value : ('0.057405227427808285',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26391828) 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 (1380598783,1380598782,1380598739,1380598738,1380598737,1380598736) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1380598736 begin to download photo : 1380598738 begin to download photo : 1380598782 download finish for photo 1380598738 begin to download photo : 1380598739 download finish for photo 1380598736 begin to download photo : 1380598737 download finish for photo 1380598782 begin to download photo : 1380598783 download finish for photo 1380598737 download finish for photo 1380598739 download finish for photo 1380598783 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P26391828_01-09-2025_11_14_57.pdf 26391835 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=26391835 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380598485: '1756717625_3078542_1380598273_70e2d2501c1ef6db1e2922741b01cdb0_68238870_rle_crop_3938814167_0.png', 1380598486: '1756717625_3078542_1380598271_98a62ce6047343cf4f6525954f3f26c9_37872091_rle_crop_3938814173_0.png', 1380598701: '1756717866_3087943_1380598645_1e0d957d4bddf7d8b5fd4a5d88894026_54197134_rle_crop_3938818238_0.png', 1380598702: '1756717866_3087943_1380598645_1e0d957d4bddf7d8b5fd4a5d88894026_54197134_rle_crop_3938818244_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/564e573610650f5fc8ff492e81647819_11218363.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/d474300e843be5493ea4a4a12d431652_42450724.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/2cdba122666e06d2fcf18c9910ce5295_44969774.png change filename to text .imagette263918351756718097/ imagette263918351756718097/1756717625_3078542_1380598271_98a62ce6047343cf4f6525954f3f26c9_37872091_rle_crop_3938814173_0.png.png imagette263918351756718097/1756717866_3087943_1380598645_1e0d957d4bddf7d8b5fd4a5d88894026_54197134_rle_crop_3938818238_0.png.png imagette263918351756718097/1756717625_3078542_1380598273_70e2d2501c1ef6db1e2922741b01cdb0_68238870_rle_crop_3938814167_0.png.png imagette263918351756718097/1756717866_3087943_1380598645_1e0d957d4bddf7d8b5fd4a5d88894026_54197134_rle_crop_3938818244_0.png.png imagette263918361756718098/ imagette263918381756718098/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/b985eed918e63f04f2b1f34479aa3c22_75839825.png imagette263918351756718097 26391836 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=26391836 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263918361756718098 26391838 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=26391838 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263918381756718098 26391839 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=26391839 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380597980: '1756717507_3071629_1380597608_311eef51859cf7b5376e1cb491f4905b_82887128_rle_crop_3938812337_0.png', 1380598141: '1756717525_3072080_1380597076_faf50eec0fb6c1a5209b7c34cf2106a2_61363965_rle_crop_3938812428_0.png', 1380598480: '1756717625_3078542_1380598271_98a62ce6047343cf4f6525954f3f26c9_37872091_rle_crop_3938814175_0.png', 1380598481: '1756717625_3078542_1380598271_98a62ce6047343cf4f6525954f3f26c9_37872091_rle_crop_3938814176_0.png', 1380598493: '1756717644_3079019_1380597954_396b822ff24669243c06c8abca2b22d8_63187875_rle_crop_3938814228_0.png', 1380598556: '1756717746_3084447_1380598501_d5d77954f34a588c64ad396291dfefe2_32539024_rle_crop_3938816238_0.png', 1380598560: '1756717746_3084447_1380598500_08b1f9f14951822ce4a1862946dd3897_71259441_rle_crop_3938816261_0.png', 1380598698: '1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818209_0.png', 1380598699: '1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818212_0.png', 1380598756: '1756717986_3094187_1380598680_cf6ae36f8b5d2c3a8c6937cd32b9ac0d_69008186_rle_crop_3938819020_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/e6e391adaf46cf664fe281b9dd39e3be_92902028.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/96b1f4dec4e8b9fe2601c7910414d197_11733795.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/a3888e8d229244f1919ad75469b37c9b_36147850.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/bd4eaaa47370f846ab960efca43fa2cc_78812434.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/0a5823ec3071dd9bda3eb870daec7daf_47936253.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/252b298a34df3e2d10486ff89568ee5c_15092525.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/c3b7cf92106f0356ba23714ea071d04a_35951383.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/9a810ecff1503d9bb7dbcb90d1c722f8_33976990.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/b2c180e8d3840a9373a4fe01ef3f757d_98287906.png change filename to text .imagette263918391756718098/ imagette263918391756718098/1756717507_3071629_1380597608_311eef51859cf7b5376e1cb491f4905b_82887128_rle_crop_3938812337_0.png.png imagette263918391756718098/1756717625_3078542_1380598271_98a62ce6047343cf4f6525954f3f26c9_37872091_rle_crop_3938814175_0.png.png imagette263918391756718098/1756717625_3078542_1380598271_98a62ce6047343cf4f6525954f3f26c9_37872091_rle_crop_3938814176_0.png.png imagette263918391756718098/1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818212_0.png.png imagette263918391756718098/1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818209_0.png.png imagette263918391756718098/1756717525_3072080_1380597076_faf50eec0fb6c1a5209b7c34cf2106a2_61363965_rle_crop_3938812428_0.png.png imagette263918391756718098/1756717746_3084447_1380598501_d5d77954f34a588c64ad396291dfefe2_32539024_rle_crop_3938816238_0.png.png imagette263918391756718098/1756717746_3084447_1380598500_08b1f9f14951822ce4a1862946dd3897_71259441_rle_crop_3938816261_0.png.png imagette263918391756718098/1756717644_3079019_1380597954_396b822ff24669243c06c8abca2b22d8_63187875_rle_crop_3938814228_0.png.png imagette263918391756718098/1756717986_3094187_1380598680_cf6ae36f8b5d2c3a8c6937cd32b9ac0d_69008186_rle_crop_3938819020_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/e8cef322946207a8aa8b7c4f9cd76ae3_14205763.png imagette263918391756718098 26391843 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=26391843 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380598487: '1756717625_3078542_1380598279_ee3920837b3a71eed7fa3e4831d4e2c8_55608245_rle_crop_3938814009_0.png'} change filename to text .imagette263918431756718098/ imagette263918431756718098/1756717625_3078542_1380598279_ee3920837b3a71eed7fa3e4831d4e2c8_55608245_rle_crop_3938814009_0.png.png imagette263918441756718098/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/04fed8be19c504596e86cebfa1374b7e_19291485.png imagette263918431756718098 26391844 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=26391844 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263918441756718098 26391845 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=26391845 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380598128: '1756717525_3072080_1380597073_ec291b6fe9172e2904bdf2621c7bde48_86738652_rle_crop_3938812440_0.png', 1380598490: '1756717644_3079019_1380598281_0d3d493ef0f0cdd29c8f47b8ac201736_81244667_rle_crop_3938814197_0.png', 1380598549: '1756717746_3084447_1380598501_d5d77954f34a588c64ad396291dfefe2_32539024_rle_crop_3938816232_0.png', 1380598696: '1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818213_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/3b8cf58f34e0669fc77d626e5e065d80_86971804.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/c04aa78f336f5ad80b10e3cda797ed60_52159297.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/39ee79c73bacf97d943ae52f3ef9d49e_985102.png change filename to text .imagette263918451756718098/ imagette263918451756718098/1756717746_3084447_1380598501_d5d77954f34a588c64ad396291dfefe2_32539024_rle_crop_3938816232_0.png.png imagette263918451756718098/1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818213_0.png.png imagette263918451756718098/1756717644_3079019_1380598281_0d3d493ef0f0cdd29c8f47b8ac201736_81244667_rle_crop_3938814197_0.png.png imagette263918451756718098/1756717525_3072080_1380597073_ec291b6fe9172e2904bdf2621c7bde48_86738652_rle_crop_3938812440_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/5154c9d3fc296d17aaa953e21e23007c_20117694.png imagette263918451756718098 26391834 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=26391834 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380598134: '1756717525_3072080_1380597076_faf50eec0fb6c1a5209b7c34cf2106a2_61363965_rle_crop_3938812426_0.png', 1380598478: '1756717625_3078542_1380598277_7c9c7aa42334f71593ecdf6bf413ac39_81410585_rle_crop_3938814032_0.png', 1380598479: '1756717625_3078542_1380598275_c47456b6d4a3e8fbc99ec34d05ae6e6f_64901839_rle_crop_3938814047_0.png', 1380598491: '1756717644_3079019_1380598281_0d3d493ef0f0cdd29c8f47b8ac201736_81244667_rle_crop_3938814186_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/05a7c547924543ceaf862edd3fc48e6b_67437025.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/f1cc60c9fdd3301c9452fce6cf174bf0_94239744.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/ce3c74e50c8ada74dc757482cb72faed_10580719.png change filename to text .imagette263918341756718098/ imagette263918341756718098/1756717525_3072080_1380597076_faf50eec0fb6c1a5209b7c34cf2106a2_61363965_rle_crop_3938812426_0.png.png imagette263918341756718098/1756717625_3078542_1380598275_c47456b6d4a3e8fbc99ec34d05ae6e6f_64901839_rle_crop_3938814047_0.png.png imagette263918341756718098/1756717625_3078542_1380598277_7c9c7aa42334f71593ecdf6bf413ac39_81410585_rle_crop_3938814032_0.png.png imagette263918341756718098/1756717644_3079019_1380598281_0d3d493ef0f0cdd29c8f47b8ac201736_81244667_rle_crop_3938814186_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/e769373610ad59a22d35b86b951bf63f_6692893.png imagette263918341756718098 26391837 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=26391837 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380598116: '1756717525_3072080_1380597614_e5a22546b751b1b9dc0a582c6d21c3f4_209592_rle_crop_3938812416_0.png', 1380598118: '1756717525_3072080_1380597076_faf50eec0fb6c1a5209b7c34cf2106a2_61363965_rle_crop_3938812425_0.png', 1380598120: '1756717525_3072080_1380597073_ec291b6fe9172e2904bdf2621c7bde48_86738652_rle_crop_3938812437_0.png', 1380598488: '1756717644_3079019_1380598281_0d3d493ef0f0cdd29c8f47b8ac201736_81244667_rle_crop_3938814193_0.png', 1380598489: '1756717644_3079019_1380597960_cbd51788de2e8f852a686b8657b794ff_38377977_rle_crop_3938814205_0.png', 1380598695: '1756717866_3087943_1380598645_1e0d957d4bddf7d8b5fd4a5d88894026_54197134_rle_crop_3938818245_0.png', 1380598707: '1756717886_3089211_1380598649_5a3fdafaa19b389daa07dc8c3ad566ee_21090583_rle_crop_3938818374_0.png', 1380598708: '1756717886_3089211_1380598535_29d3d8abaaed234591b167cc31cc6c2d_79109632_rle_crop_3938818388_0.png', 1380598709: '1756717886_3089211_1380598534_b807aa41f36e32428de9ef1dc3dedc8e_92951101_rle_crop_3938818399_0.png', 1380598710: '1756717886_3089211_1380598533_ce34ec6d901f2bd40a9a4411dbbef154_61949637_rle_crop_3938818416_0.png', 1380598761: '1756718004_3094577_1380598681_aaa3ac64c1018d7c5ecb5c0beb45e973_35879393_rle_crop_3938822858_0.png', 1380598762: '1756718004_3094577_1380598681_aaa3ac64c1018d7c5ecb5c0beb45e973_35879393_rle_crop_3938822860_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/81432d312bc68d1d3a17ae798dfec6d6_56879333.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/7d80d1f1133842f7c40ca9a079c936a6_28494080.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/525ab3ae3a596dbad2f7daa070e8f2ba_96124132.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/e40498125eea5cd6491e7f78b48e7d56_72354812.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/112c36f3647f93c85ed8aa1b7421c97a_38215976.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/43f5259970dec0a402ab6319bdf84d2d_54053420.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/fe439f332b78a8ba5b6bf8eaebe88721_37474131.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/0e16bee9635f5660c59e771ee714cdbd_67471157.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/db871206ee2973710a1f13ae33095456_9007884.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/8a2ab6fda9a0b9534fb989dd9861b27f_91789574.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/1691cfdfad6536e279bdb9bafee9f15a_7883770.png change filename to text .imagette263918371756718099/ imagette263918371756718099/1756717644_3079019_1380598281_0d3d493ef0f0cdd29c8f47b8ac201736_81244667_rle_crop_3938814193_0.png.png imagette263918371756718099/1756717886_3089211_1380598533_ce34ec6d901f2bd40a9a4411dbbef154_61949637_rle_crop_3938818416_0.png.png imagette263918371756718099/1756717866_3087943_1380598645_1e0d957d4bddf7d8b5fd4a5d88894026_54197134_rle_crop_3938818245_0.png.png imagette263918371756718099/1756717525_3072080_1380597073_ec291b6fe9172e2904bdf2621c7bde48_86738652_rle_crop_3938812437_0.png.png imagette263918371756718099/1756718004_3094577_1380598681_aaa3ac64c1018d7c5ecb5c0beb45e973_35879393_rle_crop_3938822860_0.png.png imagette263918371756718099/1756717644_3079019_1380597960_cbd51788de2e8f852a686b8657b794ff_38377977_rle_crop_3938814205_0.png.png imagette263918371756718099/1756717525_3072080_1380597076_faf50eec0fb6c1a5209b7c34cf2106a2_61363965_rle_crop_3938812425_0.png.png imagette263918371756718099/1756717886_3089211_1380598649_5a3fdafaa19b389daa07dc8c3ad566ee_21090583_rle_crop_3938818374_0.png.png imagette263918371756718099/1756717886_3089211_1380598534_b807aa41f36e32428de9ef1dc3dedc8e_92951101_rle_crop_3938818399_0.png.png imagette263918371756718099/1756717886_3089211_1380598535_29d3d8abaaed234591b167cc31cc6c2d_79109632_rle_crop_3938818388_0.png.png imagette263918371756718099/1756717525_3072080_1380597614_e5a22546b751b1b9dc0a582c6d21c3f4_209592_rle_crop_3938812416_0.png.png imagette263918371756718099/1756718004_3094577_1380598681_aaa3ac64c1018d7c5ecb5c0beb45e973_35879393_rle_crop_3938822858_0.png.png wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/a9c9519f26cf326cb88aad3ca8278432_6558759.png imagette263918371756718099 26391841 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=26391841 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380598482: '1756717625_3078542_1380598277_7c9c7aa42334f71593ecdf6bf413ac39_81410585_rle_crop_3938814037_0.png', 1380598483: '1756717625_3078542_1380598277_7c9c7aa42334f71593ecdf6bf413ac39_81410585_rle_crop_3938814033_0.png', 1380598494: '1756717644_3079019_1380597960_cbd51788de2e8f852a686b8657b794ff_38377977_rle_crop_3938814206_0.png', 1380598700: '1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818214_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/b8c7ded4c2f2e7280cbfddb825c9e9b8_77531072.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/107bc6fdfcbebc6d202cbb41ecd6d8d8_1118173.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/6d7d4e690acb249c068a2302fe7ee3df_11536052.png change filename to text .imagette263918411756718100/ imagette263918411756718100/1756717866_3087943_1380598647_ae951ee511ba6dccd89730c618645b83_73579991_rle_crop_3938818214_0.png.png imagette263918411756718100/1756717625_3078542_1380598277_7c9c7aa42334f71593ecdf6bf413ac39_81410585_rle_crop_3938814033_0.png.png imagette263918411756718100/1756717644_3079019_1380597960_cbd51788de2e8f852a686b8657b794ff_38377977_rle_crop_3938814206_0.png.png imagette263918411756718100/1756717625_3078542_1380598277_7c9c7aa42334f71593ecdf6bf413ac39_81410585_rle_crop_3938814037_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/80510c421c818d853199a910c1085cad_12972248.png imagette263918411756718100 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26391828 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26391846,26391847,26391848,26391849,26391850,26391851,26391852,26391853,26391854,26391855,26391856,26391857?tags=Carton_gris,plastique,mal_croppe,Teint_Dans_La_Masse,metal,cartonnette,environnement,Carton_brun,papier,kraft,flou,autre_refus your option no_mail is active, we will not send the real mail to your client args[1380598783] : ('0.057405227427808285',) no score found for photo 1380598783 We are sending mail with results at report@fotonower.com args[1380598782] : ('0.057405227427808285',) no score found for photo 1380598782 We are sending mail with results at report@fotonower.com args[1380598739] : ('0.057405227427808285',) no score found for photo 1380598739 We are sending mail with results at report@fotonower.com args[1380598738] : ('0.057405227427808285',) no score found for photo 1380598738 We are sending mail with results at report@fotonower.com args[1380598737] : ('0.057405227427808285',) no score found for photo 1380598737 We are sending mail with results at report@fotonower.com args[1380598736] : ('0.057405227427808285',) no score found for photo 1380598736 We are sending mail with results at report@fotonower.com refus_total : 0.057405227427808285 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=26391828 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_P26391828_01-09-2025_11_14_57.pdf results_Auto_P26391828_01-09-2025_11_14_57.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26391828_01-09-2025_11_14_57.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','26391828','results_Auto_P26391828_01-09-2025_11_14_57.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26391828_01-09-2025_11_14_57.pdf','pdf','','0.19','0.057405227427808285') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26391828]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] map_info['map_portfolio_photo'] : {26391828: [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736, 1380598715, 1380598714, 1380598681, 1380598680, 1380598679, 1380598678, 1380598649, 1380598648, 1380598647, 1380598646, 1380598645, 1380598536, 1380598535, 1380598534, 1380598533, 1380598532, 1380598503, 1380598502, 1380598501, 1380598500, 1380598471, 1380598470, 1380598468, 1380598467, 1380598466, 1380598465, 1380598454, 1380598453, 1380598452, 1380598450, 1380598449, 1380598448, 1380598281, 1380598279, 1380598277, 1380598275, 1380598273, 1380598271, 1380597963, 1380597960, 1380597957, 1380597954, 1380597614, 1380597611, 1380597608, 1380597079, 1380597076, 1380597073, 1380596233]} final : False mtd_id 4302 list_pids : [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] 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, '3645506') ('4302', '26391828', '1380598783', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598782', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598739', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598738', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598737', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598736', None, None, None, None, None, '3645506') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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', '26391828', '1380598783', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598782', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598739', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598738', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598737', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598736', None, None, None, None, None, '3645506')] time used for this insertion : 0.01177978515625 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.705934762954712 time spend to save output : 0.011991262435913086 total time spend for step 4 : 3.717926025390625 step5:split_time_score Mon Sep 1 11:15: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 : ['26391828'] 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 : [('26391828',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26391828) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1380598736: {'path': 'temp/1756718097_3479041_1380598736_52969fb55d8dc2cec72b1114b2eb2295_94451772.jpg', 'extension': 'jpg'}, 1380598737: {'path': 'temp/1756718097_3479041_1380598737_7c5f2e92f42c9538770913c02fa9d1ea_12935798.jpg', 'extension': 'jpg'}, 1380598738: {'path': 'temp/1756718097_3479041_1380598738_97aa44eedaba8bd787d8984bb1053a38_96900142.jpg', 'extension': 'jpg'}, 1380598739: {'path': 'temp/1756718097_3479041_1380598739_03d7f0f3df5233ea1667a2ffe74f3cda_45861822.jpg', 'extension': 'jpg'}, 1380598782: {'path': 'temp/1756718097_3479041_1380598782_63d7db63ee2f7b07ed66f8d2f95c01c6_50007794.jpg', 'extension': 'jpg'}, 1380598783: {'path': 'temp/1756718097_3479041_1380598783_0da8505bb54ba3b586420d770af7c1b4_15210029.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 = 26391828; (('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 = 26391828 group by h (('11', 55),) 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=26391828 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 (26391828) 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 (26391828) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 01092025 26391828 Nombre de photos uploadées : 55 / 23040 (0%) 01092025 26391828 Nombre de photos taguées (types de déchets): 0 / 55 (0%) 01092025 26391828 Nombre de photos taguées (volume) : 0 / 55 (0%) [{'photo_id': 1380596233, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/0acc6be472d7772a86add78dedf3ef5e_12085325.jpg', 'username': None, 'uploaded_at': 1756717332, 'text': 'image_01092025_11_00_55_10137.jpg'}, {'photo_id': 1380597079, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/fbb384bf6173d85974ac07601f24c3ff_13725354.jpg', 'username': None, 'uploaded_at': 1756717392, 'text': 'image_01092025_11_01_54_10139.jpg'}, {'photo_id': 1380597076, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/faf50eec0fb6c1a5209b7c34cf2106a2_61363965.jpg', 'username': None, 'uploaded_at': 1756717392, 'text': 'image_01092025_11_02_24_009125m0.jpg 1e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1380597073, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/1/ec291b6fe9172e2904bdf2621c7bde48_86738652.jpg', 'username': None, 'uploaded_at': 1756717392, 'text': 'image_01092025_11_02_44_010139m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.291534423828125e-06 ??????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0016531944274902344 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26391828, '2025-09-01' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-09-01' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2206746,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20224905014038086 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= 2206746 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26381713, 'dashboard_result_id': 14519864, '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_P26381713_01-09-2025_05_19_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26381714, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26381715, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26381716, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26381717, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26381718, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26381719, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26381720, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26381721, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26381722, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26381723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26381724, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26381725, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26381992, 'dashboard_result_id': 14519865, '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_P26381992_01-09-2025_05_33_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26381996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26381997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26381998, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26381999, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382000, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382001, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382002, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382003, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382006, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382007, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26382385, 'dashboard_result_id': 14519866, '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_P26382385_01-09-2025_05_48_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26382389, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382390, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382391, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382392, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26382393, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382394, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26382395, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382396, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26382397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382399, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382400, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26382722, 'dashboard_result_id': 14519867, '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_P26382722_01-09-2025_06_02_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26382727, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382729, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382730, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26382731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26382732, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26382733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382735, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382738, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26383234, 'dashboard_result_id': 14519868, '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_P26383234_01-09-2025_06_19_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383288, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383289, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383290, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383293, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383294, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383295, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383296, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383297, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383298, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26383579, 'dashboard_result_id': 14519869, '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_P26383579_01-09-2025_06_36_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383587, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383588, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383589, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383590, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383591, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383592, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383593, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383594, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383595, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26383975, 'dashboard_result_id': 14519870, '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_P26383975_01-09-2025_06_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383978, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383979, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383982, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383984, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383985, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383986, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383989, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26384208, 'dashboard_result_id': 14519871, '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_P26384208_01-09-2025_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26384215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26384216, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26384217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26384218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26384219, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26384220, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26384221, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26384222, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26384223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26384224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26384225, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26384226, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26386618, 'dashboard_result_id': 14519872, '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_P26386618_01-09-2025_08_03_34.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386836, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386837, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386838, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386839, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386841, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386842, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386843, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386844, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386845, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386847, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26386622, 'dashboard_result_id': 14519873, '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_P26386622_01-09-2025_08_02_34.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386758, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386761, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386763, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386764, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386766, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386767, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386769, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26386640, 'dashboard_result_id': 14519874, '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_P26386640_01-09-2025_08_02_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26386680, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386681, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386683, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386684, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386686, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386687, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386689, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386690, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386691, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26386642, 'dashboard_result_id': 14519875, '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_P26386642_01-09-2025_08_01_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386650, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386651, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386652, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386653, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386655, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386657, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386658, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386659, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386660, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26386863, 'dashboard_result_id': 14519876, '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_P26386863_01-09-2025_08_18_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386882, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386883, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386885, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386886, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386888, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386890, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386891, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386892, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386893, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26387398, 'dashboard_result_id': 14519877, '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_P26387398_01-09-2025_08_33_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26387412, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26387413, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26387414, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26387415, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26387417, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26387418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26387419, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26387420, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26387421, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26387422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26387423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26387424, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26387972, 'dashboard_result_id': 14519878, '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_P26387972_01-09-2025_08_52_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26387984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26387985, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26387986, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26387987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26387988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26387989, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26387990, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26387991, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26387992, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26387993, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26387994, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26387995, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26388987, 'dashboard_result_id': 14519879, '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_P26388987_01-09-2025_11_00_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26389003, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26389004, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26389005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26389006, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26389007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26389008, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26389009, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26389010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26389011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26389012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26389013, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26389014, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26391394, 'dashboard_result_id': 14519880, '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_P26391394_01-09-2025_10_49_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391400, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391402, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391403, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391407, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391408, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391409, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391410, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26391494, 'dashboard_result_id': 14519881, '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_P26391494_01-09-2025_11_02_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391497, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391498, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391499, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391501, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391502, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391503, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391504, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391507, 'pht': 3726}}"}, {'dashboat_entry_day': 2206746, 'dashboard_run_id': 2215713, 'mtr_portfolio_id': 26391828, 'dashboard_result_id': 14519882, '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_P26391828_01-09-2025_11_12_30.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391835, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391837, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391839, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391840, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391842, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391843, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391844, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391845, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26381713 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': 3643960, 'mtr_portfolio_id': 26381713, 'created_at': datetime.datetime(2025, 9, 1, 5, 19, 1), 'result': '0.05947260669499837', 'result_long': None, 'result_double': None}] Qualite : 0.05947260669499837 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26381713 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26381713_01-09-2025_05_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26381713 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_P26381713_01-09-2025_05_19_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26381714, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26381715, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26381716, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26381717, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26381718, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26381719, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26381720, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26381721, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26381722, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26381723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26381724, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26381725, 'pht': 3726}}" where mtr_portfolio_id = 26381713 and dashboard_run_id = 2215713 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`=26381713 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519864, 0.05947260669499837, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26381713_01-09-2025_05_19_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26381714, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26381715, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26381716, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26381717, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26381718, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26381719, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26381720, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26381721, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26381722, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26381723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26381724, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26381725, '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 = 26381992 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': 3643989, 'mtr_portfolio_id': 26381992, 'created_at': datetime.datetime(2025, 9, 1, 5, 33, 1), 'result': '0.05906098722084514', 'result_long': None, 'result_double': None}] Qualite : 0.05906098722084514 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26381992 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26381992_01-09-2025_05_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26381992 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_P26381992_01-09-2025_05_33_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26381996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26381997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26381998, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26381999, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382000, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382001, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382002, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382003, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382006, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382007, 'pht': 3726}}" where mtr_portfolio_id = 26381992 and dashboard_run_id = 2215713 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`=26381992 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519865, 0.05906098722084514, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26381992_01-09-2025_05_33_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26381996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26381997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26381998, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26381999, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382000, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382001, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382002, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382003, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382006, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382007, '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 = 26382385 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': 3644043, 'mtr_portfolio_id': 26382385, 'created_at': datetime.datetime(2025, 9, 1, 5, 48, 58), 'result': '0.04121344925574471', 'result_long': None, 'result_double': None}] Qualite : 0.04121344925574471 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26382385 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26382385_01-09-2025_05_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26382385 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_P26382385_01-09-2025_05_48_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26382389, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382390, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382391, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382392, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26382393, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382394, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26382395, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382396, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26382397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382399, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382400, 'pht': 3726}}" where mtr_portfolio_id = 26382385 and dashboard_run_id = 2215713 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`=26382385 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519866, 0.04121344925574471, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26382385_01-09-2025_05_48_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26382389, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382390, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382391, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382392, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26382393, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382394, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26382395, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382396, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26382397, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382398, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382399, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382400, '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 = 26382722 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': 3644087, 'mtr_portfolio_id': 26382722, 'created_at': datetime.datetime(2025, 9, 1, 6, 2, 58), 'result': '0.048760567937377076', 'result_long': None, 'result_double': None}] Qualite : 0.048760567937377076 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26382722 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26382722_01-09-2025_06_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26382722 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_P26382722_01-09-2025_06_02_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26382727, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382729, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382730, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26382731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26382732, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26382733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382735, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382738, 'pht': 3726}}" where mtr_portfolio_id = 26382722 and dashboard_run_id = 2215713 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`=26382722 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519867, 0.048760567937377076, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26382722_01-09-2025_06_02_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26382727, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26382728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26382729, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26382730, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26382731, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26382732, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26382733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26382734, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26382735, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26382736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26382737, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26382738, '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 = 26383234 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': 3644180, 'mtr_portfolio_id': 26383234, 'created_at': datetime.datetime(2025, 9, 1, 6, 19), 'result': '0.029804132397805074', 'result_long': None, 'result_double': None}] Qualite : 0.029804132397805074 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26383234 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26383234_01-09-2025_06_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26383234 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_P26383234_01-09-2025_06_19_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383288, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383289, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383290, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383293, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383294, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383295, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383296, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383297, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383298, 'pht': 3726}}" where mtr_portfolio_id = 26383234 and dashboard_run_id = 2215713 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`=26383234 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519868, 0.029804132397805074, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26383234_01-09-2025_06_19_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383287, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383288, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383289, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383290, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383291, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383293, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383294, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383295, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383296, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383297, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383298, '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 = 26383579 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': 3644213, 'mtr_portfolio_id': 26383579, 'created_at': datetime.datetime(2025, 9, 1, 6, 36, 58), 'result': '0.0259338070912103', 'result_long': None, 'result_double': None}] Qualite : 0.0259338070912103 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26383579 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26383579_01-09-2025_06_36_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26383579 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_P26383579_01-09-2025_06_36_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383587, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383588, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383589, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383590, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383591, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383592, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383593, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383594, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383595, 'pht': 3726}}" where mtr_portfolio_id = 26383579 and dashboard_run_id = 2215713 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`=26383579 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519869, 0.0259338070912103, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26383579_01-09-2025_06_36_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383586, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383587, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383588, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383589, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383590, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383591, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383592, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383593, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383594, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383595, '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 = 26383975 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': 3644276, 'mtr_portfolio_id': 26383975, 'created_at': datetime.datetime(2025, 9, 1, 6, 49, 1), 'result': '0.049485817277569684', 'result_long': None, 'result_double': None}] Qualite : 0.049485817277569684 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26383975 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26383975_01-09-2025_06_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26383975 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_P26383975_01-09-2025_06_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383978, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383979, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383982, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383984, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383985, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383986, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383989, 'pht': 3726}}" where mtr_portfolio_id = 26383975 and dashboard_run_id = 2215713 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`=26383975 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519870, 0.049485817277569684, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26383975_01-09-2025_06_49_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26383978, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26383979, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26383980, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26383981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26383982, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26383983, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26383984, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26383985, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26383986, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26383987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26383988, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26383989, '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 = 26384208 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': 3644306, 'mtr_portfolio_id': 26384208, 'created_at': datetime.datetime(2025, 9, 1, 8, 2, 59), 'result': '0.0604702301375649', 'result_long': None, 'result_double': None}] Qualite : 0.0604702301375649 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26384208 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26384208_01-09-2025_08_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26384208 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_P26384208_01-09-2025_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26384215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26384216, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26384217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26384218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26384219, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26384220, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26384221, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26384222, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26384223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26384224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26384225, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26384226, 'pht': 3726}}" where mtr_portfolio_id = 26384208 and dashboard_run_id = 2215713 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`=26384208 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519871, 0.0604702301375649, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26384208_01-09-2025_08_02_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26384215, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26384216, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26384217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26384218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26384219, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26384220, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26384221, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26384222, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26384223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26384224, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26384225, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26384226, '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 = 26386618 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': 3644692, 'mtr_portfolio_id': 26386618, 'created_at': datetime.datetime(2025, 9, 1, 8, 3, 31), 'result': '0.0589477330356965', 'result_long': None, 'result_double': None}] Qualite : 0.0589477330356965 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26386618 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386618_01-09-2025_08_03_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26386618 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_P26386618_01-09-2025_08_03_34.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386836, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386837, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386838, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386839, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386841, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386842, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386843, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386844, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386845, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386847, 'pht': 3726}}" where mtr_portfolio_id = 26386618 and dashboard_run_id = 2215713 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`=26386618 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519872, 0.0589477330356965, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386618_01-09-2025_08_03_34.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386836, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386837, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386838, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386839, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386841, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386842, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386843, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386844, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386845, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386846, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386847, '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 = 26386622 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': 3644694, 'mtr_portfolio_id': 26386622, 'created_at': datetime.datetime(2025, 9, 1, 8, 2, 31), 'result': '0.05439239066306042', 'result_long': None, 'result_double': None}] Qualite : 0.05439239066306042 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26386622 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386622_01-09-2025_08_02_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26386622 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_P26386622_01-09-2025_08_02_34.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386758, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386761, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386763, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386764, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386766, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386767, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386769, 'pht': 3726}}" where mtr_portfolio_id = 26386622 and dashboard_run_id = 2215713 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`=26386622 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519873, 0.05439239066306042, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386622_01-09-2025_08_02_34.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386758, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386759, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386760, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386761, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386762, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386763, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386764, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386765, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386766, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386767, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386768, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386769, '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 = 26386640 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': 3644695, 'mtr_portfolio_id': 26386640, 'created_at': datetime.datetime(2025, 9, 1, 8, 2), 'result': '0.039026495834406705', 'result_long': None, 'result_double': None}] Qualite : 0.039026495834406705 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26386640 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386640_01-09-2025_08_02_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26386640 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_P26386640_01-09-2025_08_02_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26386680, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386681, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386683, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386684, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386686, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386687, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386689, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386690, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386691, 'pht': 3726}}" where mtr_portfolio_id = 26386640 and dashboard_run_id = 2215713 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`=26386640 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519874, 0.039026495834406705, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386640_01-09-2025_08_02_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26386680, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386681, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386683, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386684, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386686, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386687, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386689, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386690, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386691, '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 = 26386642 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': 3644696, 'mtr_portfolio_id': 26386642, 'created_at': datetime.datetime(2025, 9, 1, 8, 1, 30), 'result': '0.05322213549155746', 'result_long': None, 'result_double': None}] Qualite : 0.05322213549155746 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26386642 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386642_01-09-2025_08_01_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26386642 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_P26386642_01-09-2025_08_01_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386650, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386651, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386652, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386653, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386655, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386657, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386658, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386659, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386660, 'pht': 3726}}" where mtr_portfolio_id = 26386642 and dashboard_run_id = 2215713 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`=26386642 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519875, 0.05322213549155746, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386642_01-09-2025_08_01_31.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386650, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386651, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386652, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386653, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386655, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386656, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386657, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386658, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386659, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386660, '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 = 26386863 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': 3644718, 'mtr_portfolio_id': 26386863, 'created_at': datetime.datetime(2025, 9, 1, 8, 18, 30), 'result': '0.05635155840855953', 'result_long': None, 'result_double': None}] Qualite : 0.05635155840855953 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26386863 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386863_01-09-2025_08_18_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26386863 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_P26386863_01-09-2025_08_18_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386882, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386883, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386885, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386886, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386888, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386890, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386891, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386892, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386893, 'pht': 3726}}" where mtr_portfolio_id = 26386863 and dashboard_run_id = 2215713 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`=26386863 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519876, 0.05635155840855953, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26386863_01-09-2025_08_18_31.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26386882, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26386883, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26386884, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26386885, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26386886, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26386887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26386888, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26386889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26386890, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26386891, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26386892, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26386893, '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 = 26387398 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': 3644787, 'mtr_portfolio_id': 26387398, 'created_at': datetime.datetime(2025, 9, 1, 8, 33, 28), 'result': '0.05895323185838954', 'result_long': None, 'result_double': None}] Qualite : 0.05895323185838954 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26387398 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26387398_01-09-2025_08_33_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26387398 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_P26387398_01-09-2025_08_33_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26387412, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26387413, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26387414, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26387415, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26387417, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26387418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26387419, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26387420, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26387421, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26387422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26387423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26387424, 'pht': 3726}}" where mtr_portfolio_id = 26387398 and dashboard_run_id = 2215713 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`=26387398 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519877, 0.05895323185838954, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26387398_01-09-2025_08_33_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26387412, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26387413, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26387414, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26387415, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26387417, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26387418, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26387419, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26387420, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26387421, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26387422, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26387423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26387424, '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 = 26387972 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': 3644920, 'mtr_portfolio_id': 26387972, 'created_at': datetime.datetime(2025, 9, 1, 8, 52, 57), 'result': '0.07360790154148447', 'result_long': None, 'result_double': None}] Qualite : 0.07360790154148447 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26387972 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26387972_01-09-2025_08_52_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26387972 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_P26387972_01-09-2025_08_52_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26387984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26387985, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26387986, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26387987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26387988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26387989, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26387990, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26387991, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26387992, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26387993, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26387994, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26387995, 'pht': 3726}}" where mtr_portfolio_id = 26387972 and dashboard_run_id = 2215713 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`=26387972 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519878, 0.07360790154148447, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26387972_01-09-2025_08_52_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26387984, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26387985, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26387986, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26387987, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26387988, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26387989, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26387990, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26387991, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26387992, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26387993, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26387994, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26387995, '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 = 26388987 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': 3645033, 'mtr_portfolio_id': 26388987, 'created_at': datetime.datetime(2025, 9, 1, 10, 59, 59), 'result': '0.11208481938855401', 'result_long': None, 'result_double': None}] Qualite : 0.11208481938855401 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26388987 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26388987_01-09-2025_11_00_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26388987 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_P26388987_01-09-2025_11_00_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26389003, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26389004, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26389005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26389006, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26389007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26389008, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26389009, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26389010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26389011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26389012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26389013, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26389014, 'pht': 3726}}" where mtr_portfolio_id = 26388987 and dashboard_run_id = 2215713 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`=26388987 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519879, 0.11208481938855401, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26388987_01-09-2025_11_00_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26389003, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26389004, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26389005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26389006, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26389007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26389008, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26389009, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26389010, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26389011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26389012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26389013, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26389014, '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 = 26391394 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 = 26391394 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 = 26391394 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26391394 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 = 26391394 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 = 26391394 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26391394_01-09-2025_10_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26391394 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_P26391394_01-09-2025_10_49_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391400, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391402, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391403, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391405, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391407, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391408, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391409, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391410, 'pht': 3726}}" where mtr_portfolio_id = 26391394 and dashboard_run_id = 2215717 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 = 26391494 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': 3645327, 'mtr_portfolio_id': 26391494, 'created_at': datetime.datetime(2025, 9, 1, 11, 2, 31), 'result': '0.09285274783806775', 'result_long': None, 'result_double': None}] Qualite : 0.09285274783806775 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26391494 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26391494_01-09-2025_11_02_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26391494 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_P26391494_01-09-2025_11_02_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391497, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391498, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391499, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391501, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391502, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391503, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391504, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391507, 'pht': 3726}}" where mtr_portfolio_id = 26391494 and dashboard_run_id = 2215717 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`=26391494 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519881, 0.09285274783806775, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26391494_01-09-2025_11_02_31.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391497, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391498, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391499, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391501, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391502, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391503, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391504, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391505, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391506, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391507, '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 = 26391828 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': 3645506, 'mtr_portfolio_id': 26391828, 'created_at': datetime.datetime(2025, 9, 1, 11, 14, 57), 'result': '0.057405227427808285', 'result_long': None, 'result_double': None}] Qualite : 0.057405227427808285 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26391828 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26391828_01-09-2025_11_14_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26391828 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_P26391828_01-09-2025_11_14_57.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391835, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391837, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391839, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391840, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391842, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391843, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391844, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391845, 'pht': 3726}}" where mtr_portfolio_id = 26391828 and dashboard_run_id = 2215717 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`=26391828 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14519882, 0.057405227427808285, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26391828_01-09-2025_11_14_57.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26391834, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26391835, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26391836, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26391837, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26391838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26391839, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26391840, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26391841, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26391842, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26391843, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26391844, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26391845, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26381713,26381992,26382385,26382722,26383234,26383579,26383975,26384208,26386618,26386622,26386640,26386642,26386863,26387398,26387972,26388987,26391394,26391494,26391828) result : ((1380555652,), (1380555787,), (1380555804,), (1380555805,), (1380555823,), (1380555824,), (1380555834,), (1380555835,), (1380555836,), (1380555837,), (1380555838,), (1380555850,), (1380555851,), (1380555852,), (1380555853,), (1380555854,), (1380555855,), (1380555857,), (1380555858,), (1380555859,), (1380555882,), (1380555883,), (1380555884,), (1380555929,), (1380555954,), (1380555955,), (1380555956,), (1380555958,), (1380555966,), (1380555967,), (1380555968,), (1380555969,), (1380555971,), (1380555972,), (1380555981,), (1380555982,), (1380555983,), (1380555984,), (1380555993,), (1380555994,), (1380555995,), (1380555996,), (1380556021,), (1380556040,), (1380556017,), (1380556018,), (1380556019,), (1380556020,), (1380556029,), (1380556030,), (1380556031,), (1380556032,), (1380556033,), (1380556034,), (1380556036,), (1380556038,), (1380556054,), (1380556055,), (1380556056,), (1380556057,), (1380556058,), (1380556072,), (1380556073,), (1380556087,), (1380556088,), (1380556089,), (1380556090,), (1380556091,), (1380556093,), (1380556143,), (1380556144,), (1380556145,), (1380556160,), (1380556161,), (1380556162,), (1380556163,), (1380556164,), (1380556165,), (1380556176,), (1380556251,), (1380556252,), (1380556253,), (1380556254,), (1380556268,), (1380556269,), (1380556270,), (1380556271,), (1380556272,), (1380556278,), (1380556279,), (1380556280,), (1380556281,), (1380556282,), (1380556283,), (1380556321,), (1380556322,), (1380556323,), (1380556324,), (1380556325,), (1380556326,), (1380556330,), (1380556331,), (1380556332,), (1380556353,), (1380556354,), (1380556355,), (1380556356,), (1380556379,), (1380556381,), (1380556382,), (1380556383,), (1380556384,), (1380556403,), (1380556404,), (1380556405,), (1380556407,), (1380556424,), (1380556421,), (1380556422,), (1380556423,), (1380556444,), (1380556453,), (1380556467,), (1380556468,), (1380556469,), (1380556480,), (1380556496,), (1380556497,), (1380556498,), (1380556513,), (1380556514,), (1380556515,), (1380556516,), (1380556517,), (1380556518,), (1380556519,), (1380556533,), (1380556538,), (1380556539,), (1380556540,), (1380556549,), (1380556550,), (1380556551,), (1380556571,), (1380556572,), (1380556583,), (1380556584,), (1380556598,), (1380556599,), (1380556611,), (1380556612,), (1380556613,), (1380556614,), (1380556630,), (1380556631,), (1380556632,), (1380556633,), (1380556648,), (1380556649,), (1380556650,), (1380556679,), (1380556706,), (1380556676,), (1380556677,), (1380556678,), (1380556695,), (1380556696,), (1380556697,), (1380556698,), (1380556699,), (1380556700,), (1380556704,), (1380556705,), (1380556721,), (1380556723,), (1380556724,), (1380556725,), (1380556726,), (1380556734,), (1380556735,), (1380556736,), (1380556737,), (1380556738,), (1380556759,), (1380556760,), (1380556761,), (1380556762,), (1380556763,), (1380556771,), (1380556772,), (1380556773,), (1380556774,), (1380556792,), (1380556793,), (1380556794,), (1380556795,), (1380556804,), (1380556805,), (1380556806,), (1380556807,), (1380556808,), (1380556827,), (1380556828,), (1380556829,), (1380556830,), (1380556841,), (1380556842,), (1380556843,), (1380556844,), (1380556859,), (1380556870,), (1380556871,), (1380556872,), (1380556877,), (1380556878,), (1380556879,), (1380556880,), (1380556897,), (1380556898,), (1380557224,), (1380557227,), (1380557230,), (1380557232,), (1380557234,), (1380557602,), (1380559388,), (1380559403,), (1380559405,), (1380559407,), (1380559440,), (1380559441,), (1380559442,), (1380559455,), (1380559456,), (1380559457,), (1380559458,), (1380559459,), (1380559460,), (1380559477,), (1380559478,), (1380559479,), (1380559480,), (1380559481,), (1380559502,), (1380559531,), (1380559532,), (1380559533,), (1380559553,), (1380559554,), (1380559555,), (1380559571,), (1380559572,), (1380559573,), (1380559574,), (1380559594,), (1380559595,), (1380559596,), (1380559597,), (1380559598,), (1380559599,), (1380559623,), (1380559624,), (1380559625,), (1380559626,), (1380559652,), (1380559672,), (1380559648,), (1380559649,), (1380559650,), (1380559651,), (1380559664,), (1380559665,), (1380559666,), (1380559667,), (1380559668,), (1380559669,), (1380559671,), (1380559702,), (1380559703,), (1380559704,), (1380559719,), (1380559720,), (1380559721,), (1380559737,), (1380559738,), (1380559739,), (1380559740,), (1380559741,), (1380559759,), (1380559760,), (1380559761,), (1380559762,), (1380559763,), (1380559783,), (1380559784,), (1380559785,), (1380559786,), (1380559787,), (1380559810,), (1380559811,), (1380559812,), (1380559813,), (1380559839,), (1380559840,), (1380559841,), (1380559842,), (1380559843,), (1380559852,), (1380559853,), (1380559854,), (1380559898,), (1380560062,), (1380560002,), (1380560061,), (1380560085,), (1380560088,), (1380560115,), (1380560116,), (1380560117,), (1380560118,), (1380560119,), (1380560120,), (1380560124,), (1380560157,), (1380560158,), (1380560159,), (1380560160,), (1380560183,), (1380560184,), (1380560185,), (1380560186,), (1380560187,), (1380560218,), (1380560219,), (1380560249,), (1380560250,), (1380560280,), (1380560281,), (1380560282,), (1380560304,), (1380560305,), (1380560306,), (1380560307,), (1380560334,), (1380560335,), (1380560336,), (1380560337,), (1380560338,), (1380560363,), (1380560364,), (1380560365,), (1380560395,), (1380560432,), (1380560392,), (1380560393,), (1380560394,), (1380560420,), (1380560421,), (1380560422,), (1380560423,), (1380560424,), (1380560425,), (1380560429,), (1380560430,), (1380560431,), (1380560463,), (1380560464,), (1380560465,), (1380560466,), (1380560468,), (1380560492,), (1380560493,), (1380560494,), (1380560495,), (1380560496,), (1380560510,), (1380560511,), (1380560512,), (1380560513,), (1380560539,), (1380560540,), (1380560541,), (1380560564,), (1380560565,), (1380560566,), (1380560567,), (1380560589,), (1380560590,), (1380560591,), (1380560630,), (1380560631,), (1380560632,), (1380560633,), (1380560634,), (1380560635,), (1380560658,), (1380560659,), (1380560660,), (1380560661,), (1380560693,), (1380560694,), (1380560695,), (1380560696,), (1380560716,), (1380560717,), (1380560718,), (1380560719,), (1380560720,), (1380560722,), (1380560731,), (1380560732,), (1380560733,), (1380560951,), (1380560953,), (1380560955,), (1380560957,), (1380560959,), (1380561556,), (1380561558,), (1380561560,), (1380561562,), (1380561565,), (1380561978,), (1380561909,), (1380561972,), (1380561974,), (1380561976,), (1380562343,), (1380562345,), (1380562347,), (1380562349,), (1380562863,), (1380562865,), (1380562868,), (1380562871,), (1380563088,), (1380563089,), (1380563090,), (1380563091,), (1380563319,), (1380563321,), (1380563324,), (1380563326,), (1380563328,), (1380563441,), (1380563442,), (1380563443,), (1380563444,), (1380563445,), (1380563446,), (1380563461,), (1380563462,), (1380563463,), (1380563464,), (1380563465,), (1380563466,), (1380563470,), (1380563471,), (1380563473,), (1380563505,), (1380563506,), (1380563507,), (1380563508,), (1380563509,), (1380563526,), (1380563527,), (1380563528,), (1380563529,), (1380563530,), (1380563552,), (1380563553,), (1380563554,), (1380563555,), (1380563556,), (1380563557,), (1380563600,), (1380563601,), (1380563602,), (1380563603,), (1380563640,), (1380563641,), (1380563642,), (1380563643,), (1380563645,), (1380563662,), (1380563663,), (1380563664,), (1380563665,), (1380563666,), (1380563683,), (1380563684,), (1380563685,), (1380563686,), (1380563687,), (1380563688,), (1380563712,), (1380563713,), (1380563714,), (1380563756,), (1380563831,), (1380563751,), (1380563752,), (1380563753,), (1380563754,), (1380563755,), (1380563808,), (1380563809,), (1380563810,), (1380563811,), (1380563812,), (1380563813,), (1380563827,), (1380563828,), (1380563829,), (1380563830,), (1380563844,), (1380563845,), (1380563846,), (1380563882,), (1380563884,), (1380563886,), (1380563956,), (1380563957,), (1380563958,), (1380563959,), (1380563960,), (1380564085,), (1380564086,), (1380564087,), (1380564088,), (1380564089,), (1380564090,), (1380564120,), (1380564121,), (1380564122,), (1380564123,), (1380564202,), (1380564203,), (1380564204,), (1380564205,), (1380564206,), (1380564207,), (1380564352,), (1380564353,), (1380564354,), (1380564355,), (1380564436,), (1380564438,), (1380564440,), (1380564561,), (1380564562,), (1380564605,), (1380564606,), (1380564607,), (1380564638,), (1380564639,), (1380564640,), (1380564641,), (1380564727,), (1380564728,), (1380564729,), (1380564778,), (1380564780,), (1380564781,), (1380564782,), (1380564783,), (1380564895,), (1380564892,), (1380564893,), (1380564976,), (1380565025,), (1380565052,), (1380565053,), (1380565054,), (1380565055,), (1380565056,), (1380565106,), (1380565107,), (1380565108,), (1380565146,), (1380565147,), (1380565148,), (1380565149,), (1380565185,), (1380565186,), (1380565187,), (1380565188,), (1380565189,), (1380565213,), (1380565214,), (1380565215,), (1380565291,), (1380565292,), (1380565293,), (1380565294,), (1380565335,), (1380565336,), (1380565337,), (1380565338,), (1380565339,), (1380565340,), (1380565361,), (1380565362,), (1380565363,), (1380565364,), (1380565386,), (1380565387,), (1380565388,), (1380565389,), (1380565390,), (1380565391,), (1380565526,), (1380565529,), (1380565532,), (1380565535,), (1380565537,), (1380565668,), (1380565689,), (1380566071,), (1380566072,), (1380566073,), (1380566113,), (1380566465,), (1380566466,), (1380566516,), (1380566518,), (1380566520,), (1380566679,), (1380566680,), (1380566681,), (1380566682,), (1380566683,), (1380567451,), (1380567455,), (1380567459,), (1380567463,), (1380567466,), (1380567469,), (1380567650,), (1380567655,), (1380567658,), (1380567662,), (1380567666,), (1380568022,), (1380568023,), (1380568024,), (1380568025,), (1380568467,), (1380568469,), (1380568471,), (1380568473,), (1380568844,), (1380568846,), (1380568848,), (1380568850,), (1380568852,), (1380568854,), (1380569232,), (1380569234,), (1380569235,), (1380569237,), (1380569408,), (1380569410,), (1380569412,), (1380569414,), (1380569416,), (1380569418,), (1380569553,), (1380569554,), (1380569555,), (1380569556,), (1380569557,), (1380569651,), (1380569652,), (1380569653,), (1380569654,), (1380569655,), (1380569656,), (1380569669,), (1380569670,), (1380569671,), (1380569686,), (1380569687,), (1380569688,), (1380569689,), (1380569714,), (1380569715,), (1380569716,), (1380569717,), (1380569718,), (1380569719,), (1380569753,), (1380569754,), (1380569755,), (1380569756,), (1380569757,), (1380569801,), (1380569802,), (1380569803,), (1380569804,), (1380569872,), (1380569874,), (1380569876,), (1380569878,), (1380569880,), (1380569934,), (1380569935,), (1380569936,), (1380569937,), (1380570012,), (1380570013,), (1380570014,), (1380570015,), (1380570086,), (1380570168,), (1380570232,), (1380570165,), (1380570166,), (1380570167,), (1380570218,), (1380570219,), (1380570220,), (1380570221,), (1380570222,), (1380570223,), (1380570272,), (1380570273,), (1380570334,), (1380570335,), (1380570336,), (1380570379,), (1380570446,), (1380570447,), (1380570448,), (1380570477,), (1380570478,), (1380570503,), (1380570504,), (1380570505,), (1380570506,), (1380570527,), (1380570528,), (1380570562,), (1380570563,), (1380570564,), (1380570565,), (1380570598,), (1380570599,), (1380570600,), (1380570619,), (1380570620,), (1380570621,), (1380570653,), (1380570654,), (1380570685,), (1380570686,), (1380570687,), (1380570688,), (1380570714,), (1380570715,), (1380570716,), (1380570812,), (1380570924,), (1380570928,), (1380570932,), (1380571126,), (1380571577,), (1380572110,), (1380572111,), (1380572599,), (1380572602,), (1380572605,), (1380573030,), (1380573032,), (1380573034,), (1380573036,), (1380573039,), (1380573043,), (1380573219,), (1380573220,), (1380573521,), (1380573523,), (1380573525,), (1380573527,), (1380573529,), (1380573620,), (1380573621,), (1380573622,), (1380573623,), (1380573671,), (1380573675,), (1380573905,), (1380573906,), (1380573907,), (1380575321,), (1380575317,), (1380575319,), (1380575474,), (1380575549,), (1380575551,), (1380575553,), (1380575555,), (1380576702,), (1380593792,), (1380592677,), (1380593740,), (1380593791,), (1380593927,), (1380593959,), (1380593960,), (1380593990,), (1380593992,), (1380594113,), (1380594251,), (1380594347,), (1380594348,), (1380594484,), (1380594485,), (1380594985,), (1380594987,), (1380594989,), (1380595564,), (1380596233,), (1380597073,), (1380597076,), (1380597079,), (1380597608,), (1380597611,), (1380597614,), (1380597954,), (1380597957,), (1380597960,), (1380597963,), (1380598271,), (1380598273,), (1380598275,), (1380598277,), (1380598279,), (1380598281,), (1380598448,), (1380598449,), (1380598450,), (1380598452,), (1380598453,), (1380598454,), (1380598465,), (1380598466,), (1380598467,), (1380598468,), (1380598470,), (1380598471,), (1380598500,), (1380598501,), (1380598502,), (1380598503,), (1380598532,), (1380598533,), (1380598534,), (1380598535,), (1380598536,), (1380598645,), (1380598646,), (1380598647,), (1380598648,), (1380598649,), (1380598678,), (1380598679,), (1380598680,), (1380598681,), (1380598714,), (1380598715,), (1380598736,), (1380598737,), (1380598738,), (1380598739,), (1380598782,), (1380598783,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01092025': {'nb_upload': 55, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26391828]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] map_info['map_portfolio_photo'] : {26391828: [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736, 1380598715, 1380598714, 1380598681, 1380598680, 1380598679, 1380598678, 1380598649, 1380598648, 1380598647, 1380598646, 1380598645, 1380598536, 1380598535, 1380598534, 1380598533, 1380598532, 1380598503, 1380598502, 1380598501, 1380598500, 1380598471, 1380598470, 1380598468, 1380598467, 1380598466, 1380598465, 1380598454, 1380598453, 1380598452, 1380598450, 1380598449, 1380598448, 1380598281, 1380598279, 1380598277, 1380598275, 1380598273, 1380598271, 1380597963, 1380597960, 1380597957, 1380597954, 1380597614, 1380597611, 1380597608, 1380597079, 1380597076, 1380597073, 1380596233]} final : True mtd_id 4302 list_pids : [1380598783, 1380598782, 1380598739, 1380598738, 1380598737, 1380598736] Looping around the photos to save general results len do output : 1 /26391828Didn'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, '3645506') ('4302', '26391828', '1380598783', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598782', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598739', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598738', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598737', None, None, None, None, None, '3645506') ('4302', None, None, None, None, None, None, None, '3645506') ('4302', '26391828', '1380598736', None, None, None, None, None, '3645506') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '26391828', 'None', None, None, None, None, '3645506'), ('4302', '26391828', '1380598783', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598782', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598739', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598738', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598737', None, None, None, None, None, '3645506'), ('4302', '26391828', '1380598736', None, None, None, None, None, '3645506')] time used for this insertion : 0.012111902236938477 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.288931131362915 time spend to save output : 0.012295722961425781 total time spend for step 5 : 1.3012268543243408 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 (3645506) 2.04user 2.55system 0:08.24elapsed 55%CPU (0avgtext+0avgdata 158608maxresident)k 1464inputs+9560outputs (50major+63967minor)pagefaults 0swaps