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 : 644548 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 (3640553) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3640553) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359561 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3640553'] with mtr_portfolio_ids : ['26359561'] and first list_photo_ids : [] new path : /proc/644548/ Name: python3 Umask: 0002 State: R (running) Tgid: 644548 Ngid: 0 Pid: 644548 PPid: 644547 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 644548 NSpid: 644548 NSpgid: 642442 NSsid: 642442 VmPeak: 1107336 kB VmSize: 1107336 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 101120 kB VmRSS: 101120 kB RssAnon: 60148 kB RssFile: 40972 kB RssShmem: 0 kB VmData: 866088 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 59 nonvoluntary_ctxt_switches: 81 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '644548', 'Ngid': '0', 'Pid': '644548', 'PPid': '644547', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '644548', 'NSpid': '644548', 'NSpgid': '642442', 'NSsid': '642442', 'VmPeak': '1107336 kB', 'VmSize': '1107336 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '101120 kB', 'VmRSS': '101120 kB', 'RssAnon': '60148 kB', 'RssFile': '40972 kB', 'RssShmem': '0 kB', 'VmData': '866088 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '59', 'nonvoluntary_ctxt_switches': '81'} ('datou_batch_current', '644548', '1107336', '0', '1107336', '866088', '101120', b'', 'marlene', '3640553') 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 (26359561) 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 (3640553 ) ) 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 (26359561) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1380228715, 'portfolio_id': 26359561}, {'photo_id': 1380228714, 'portfolio_id': 26359561}, {'photo_id': 1380228713, 'portfolio_id': 26359561}, {'photo_id': 1380228712, 'portfolio_id': 26359561}, {'photo_id': 1380228675, 'portfolio_id': 26359561}, {'photo_id': 1380228674, 'portfolio_id': 26359561}, {'photo_id': 1380228629, 'portfolio_id': 26359561}, {'photo_id': 1380228628, 'portfolio_id': 26359561}, {'photo_id': 1380228627, 'portfolio_id': 26359561}, {'photo_id': 1380228598, 'portfolio_id': 26359561}, {'photo_id': 1380228597, 'portfolio_id': 26359561}, {'photo_id': 1380228595, 'portfolio_id': 26359561}, {'photo_id': 1380228594, 'portfolio_id': 26359561}, {'photo_id': 1380228574, 'portfolio_id': 26359561}, {'photo_id': 1380228573, 'portfolio_id': 26359561}, {'photo_id': 1380228572, 'portfolio_id': 26359561}, {'photo_id': 1380228571, 'portfolio_id': 26359561}, {'photo_id': 1380228504, 'portfolio_id': 26359561}, {'photo_id': 1380228503, 'portfolio_id': 26359561}, {'photo_id': 1380228502, 'portfolio_id': 26359561}, {'photo_id': 1380228501, 'portfolio_id': 26359561}, {'photo_id': 1380228500, 'portfolio_id': 26359561}, {'photo_id': 1380228478, 'portfolio_id': 26359561}, {'photo_id': 1380228477, 'portfolio_id': 26359561}] map_portfolio_id_photo_id: {26359561: [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674, 1380228629, 1380228628, 1380228627, 1380228598, 1380228597, 1380228595, 1380228594, 1380228574, 1380228573, 1380228572, 1380228571, 1380228504, 1380228503, 1380228502, 1380228501, 1380228500, 1380228478, 1380228477]} ##### 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.014385700225830078 #### 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 Sat Aug 30 02:52:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26359561) 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 : 26359561 get user id for portfolio 26359561 get sub ptf for main ptf 26359561, type 3726 and hashtags ['environnement', 'autre_refus', 'kraft', 'plastique', 'Carton_gris', 'mal_croppe', 'metal', 'flou', 'cartonnette', 'papier', 'Carton_brun', 'Teint_Dans_La_Masse'] 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`=26359561 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','Carton_gris','mal_croppe','metal','flou','cartonnette','papier','Carton_brun','Teint_Dans_La_Masse')) 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`=26359561 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','Carton_gris','mal_croppe','metal','flou','cartonnette','papier','Carton_brun','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 26359561, 'sub_port_id': 26359567, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735209, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'flou': {'main_port_id': 26359561, 'sub_port_id': 26359568, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735210, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'Carton_gris': {'main_port_id': 26359561, 'sub_port_id': 26359569, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735211, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'Carton_brun': {'main_port_id': 26359561, 'sub_port_id': 26359570, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735212, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'cartonnette': {'main_port_id': 26359561, 'sub_port_id': 26359571, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735213, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'kraft': {'main_port_id': 26359561, 'sub_port_id': 26359572, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735214, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'plastique': {'main_port_id': 26359561, 'sub_port_id': 26359573, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735215, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 26359561, 'sub_port_id': 26359574, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735216, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'metal': {'main_port_id': 26359561, 'sub_port_id': 26359575, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735217, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'autre_refus': {'main_port_id': 26359561, 'sub_port_id': 26359576, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735218, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'environnement': {'main_port_id': 26359561, 'sub_port_id': 26359577, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735219, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}, 'mal_croppe': {'main_port_id': 26359561, 'sub_port_id': 26359578, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735220, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 46, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26359567 , 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=26359561 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 (26359567) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359568 , 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=26359561 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 (26359568) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359569 , 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=26359561 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 (26359569) result : ((1380228589,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359570 , 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=26359561 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 (26359570) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359571 , 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=26359561 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 (26359571) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359572 , 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=26359561 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 (26359572) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359573 , 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=26359561 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 (26359573) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359574 , 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=26359561 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 (26359574) result : ((1380228588,), (1380228738,), (1380228739,), (1380228740,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359575 , 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=26359561 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 (26359575) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359576 , 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=26359561 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 (26359576) result : ((1380228741,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359577 , 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=26359561 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 (26359577) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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 26359578 , 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=26359561 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 (26359578) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26359561) result : ((1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) 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 (1380228500) 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`=26359561 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','Carton_gris','mal_croppe','metal','flou','cartonnette','papier','Carton_brun','Teint_Dans_La_Masse')) 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`=26359561 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','autre_refus','kraft','plastique','Carton_gris','mal_croppe','metal','flou','cartonnette','papier','Carton_brun','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 26359561, 'sub_port_id': 26359579, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735221, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'flou': {'main_port_id': 26359561, 'sub_port_id': 26359580, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735222, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'Carton_gris': {'main_port_id': 26359561, 'sub_port_id': 26359581, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735223, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'Carton_brun': {'main_port_id': 26359561, 'sub_port_id': 26359582, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735224, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'cartonnette': {'main_port_id': 26359561, 'sub_port_id': 26359583, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735225, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'kraft': {'main_port_id': 26359561, 'sub_port_id': 26359584, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735226, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'plastique': {'main_port_id': 26359561, 'sub_port_id': 26359585, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735227, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'Teint_Dans_La_Masse': {'main_port_id': 26359561, 'sub_port_id': 26359586, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735228, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'metal': {'main_port_id': 26359561, 'sub_port_id': 26359587, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735229, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'autre_refus': {'main_port_id': 26359561, 'sub_port_id': 26359588, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735230, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'environnement': {'main_port_id': 26359561, 'sub_port_id': 26359589, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735231, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 47), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}, 'mal_croppe': {'main_port_id': 26359561, 'sub_port_id': 26359590, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17735232, 'last_updated_at': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_desc': datetime.datetime(2025, 8, 30, 2, 51), 'last_updated_at_asc': datetime.datetime(2025, 8, 30, 2, 47)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359579,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359567 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359580,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359568 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359581,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359569 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359582,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359570 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359583,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359571 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359584,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359572 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359585,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359573 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359586,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359574 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359587,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359575 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359588,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359576 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359589,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359577 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26359590,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26359578 lien utilise dans velours : https://marlene.fotonower.com/velours/26359579,26359580,26359581,26359582,26359583,26359584,26359585,26359586,26359587,26359588,26359589,26359590?tags=papier,flou,Carton_gris,Carton_brun,cartonnette,kraft,plastique,Teint_Dans_La_Masse,metal,autre_refus,environnement,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26359561]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] map_info['map_portfolio_photo'] : {26359561: [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674, 1380228629, 1380228628, 1380228627, 1380228598, 1380228597, 1380228595, 1380228594, 1380228574, 1380228573, 1380228572, 1380228571, 1380228504, 1380228503, 1380228502, 1380228501, 1380228500, 1380228478, 1380228477]} final : False mtd_id 4302 list_pids : [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] Looping around the photos to save general results len do output : 1 /26359561. 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, '3640553') ('4302', '26359561', '1380228715', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228714', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228713', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228712', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228675', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228674', None, None, None, None, None, '3640553') 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, '26359561', "{'papier': 26359567, 'flou': 26359568, 'Carton_gris': 26359569, 'Carton_brun': 26359570, 'cartonnette': 26359571, 'kraft': 26359572, 'plastique': 26359573, 'Teint_Dans_La_Masse': 26359574, 'metal': 26359575, 'autre_refus': 26359576, 'environnement': 26359577, 'mal_croppe': 26359578}", None, None, None, None, '3640553'), ('4302', '26359561', '1380228715', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228714', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228713', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228712', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228675', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228674', None, None, None, None, None, '3640553')] time used for this insertion : 0.01584911346435547 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4435555934906006 time spend to save output : 0.016112327575683594 total time spend for step 1 : 0.4596679210662842 step2:final Sat Aug 30 02:52:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (26359561) 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 26359561 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1380228478,1380228477,1380228504,1380228503,1380228502,1380228501,1380228500,1380228574,1380228573,1380228572,1380228571,1380228598,1380228597,1380228595,1380228594,1380228629,1380228628,1380228627,1380228675,1380228674,1380228715,1380228714,1380228713,1380228712); 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([26359561]) Inside saveOutput : final : False verbose : True original output for save of step final : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} new output for save of step final : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] map_info['map_portfolio_photo'] : {26359561: [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674, 1380228629, 1380228628, 1380228627, 1380228598, 1380228597, 1380228595, 1380228594, 1380228574, 1380228573, 1380228572, 1380228571, 1380228504, 1380228503, 1380228502, 1380228501, 1380228500, 1380228478, 1380228477]} final : False mtd_id 4302 list_pids : [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] Looping around the photos to save general results len do output : 6 /1380228715.Didn't retrieve data . /1380228714.Didn't retrieve data . /1380228713.Didn't retrieve data . /1380228712.Didn't retrieve data . /1380228675.Didn't retrieve data . /1380228674.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, '3640553') ('4302', '26359561', '1380228715', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228714', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228713', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228712', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228675', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228674', None, None, None, None, None, '3640553') 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', '26359561', '1380228715', '0.04582821265651811', None, None, None, None, '3640553'), ('4302', '26359561', '1380228714', '0.04582821265651811', None, None, None, None, '3640553'), ('4302', '26359561', '1380228713', '0.04582821265651811', None, None, None, None, '3640553'), ('4302', '26359561', '1380228712', '0.04582821265651811', None, None, None, None, '3640553'), ('4302', '26359561', '1380228675', '0.04582821265651811', None, None, None, None, '3640553'), ('4302', '26359561', '1380228674', '0.04582821265651811', None, None, None, None, '3640553')] time used for this insertion : 0.012729167938232422 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06782293319702148 time spend to save output : 0.013030290603637695 total time spend for step 2 : 0.08085322380065918 step3:velours_tree Sat Aug 30 02:52:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {26359561: [{'papier': 26359567, 'flou': 26359568, 'Carton_gris': 26359569, 'Carton_brun': 26359570, 'cartonnette': 26359571, 'kraft': 26359572, 'plastique': 26359573, 'Teint_Dans_La_Masse': 26359574, 'metal': 26359575, 'autre_refus': 26359576, 'environnement': 26359577, 'mal_croppe': 26359578}]} input_args_next_step : {26359561: ()} output_args : {26359561: [{'papier': 26359567, 'flou': 26359568, 'Carton_gris': 26359569, 'Carton_brun': 26359570, 'cartonnette': 26359571, 'kraft': 26359572, 'plastique': 26359573, 'Teint_Dans_La_Masse': 26359574, 'metal': 26359575, 'autre_refus': 26359576, 'environnement': 26359577, 'mal_croppe': 26359578}]} args : 26359561 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 : ({'papier': 26359567, 'flou': 26359568, 'Carton_gris': 26359569, 'Carton_brun': 26359570, 'cartonnette': 26359571, 'kraft': 26359572, 'plastique': 26359573, 'Teint_Dans_La_Masse': 26359574, 'metal': 26359575, 'autre_refus': 26359576, 'environnement': 26359577, 'mal_croppe': 26359578},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26359561) 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([26359561]) 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.2937936782836914 time spend to save output : 4.00543212890625e-05 total time spend for step 3 : 0.29383373260498047 step4:send_mail_cod Sat Aug 30 02:52:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} input_args_next_step : {1380228715: ()} output_args : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} args : 1380228715 depend.output_id : 0 input_args_next_step : {1380228715: ('0.04582821265651811',), 1380228714: ()} output_args : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} args : 1380228714 depend.output_id : 0 input_args_next_step : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ()} output_args : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} args : 1380228713 depend.output_id : 0 input_args_next_step : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ()} output_args : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} args : 1380228712 depend.output_id : 0 input_args_next_step : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ()} output_args : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} args : 1380228675 depend.output_id : 0 input_args_next_step : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ()} output_args : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',)} args : 1380228674 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 : {26359561: [{'papier': 26359567, 'flou': 26359568, 'Carton_gris': 26359569, 'Carton_brun': 26359570, 'cartonnette': 26359571, 'kraft': 26359572, 'plastique': 26359573, 'Teint_Dans_La_Masse': 26359574, 'metal': 26359575, 'autre_refus': 26359576, 'environnement': 26359577, 'mal_croppe': 26359578}]} input_args_next_step : {1380228715: ('0.04582821265651811',), 1380228714: ('0.04582821265651811',), 1380228713: ('0.04582821265651811',), 1380228712: ('0.04582821265651811',), 1380228675: ('0.04582821265651811',), 1380228674: ('0.04582821265651811',), 26359561: ()} output_args : {26359561: [{'papier': 26359567, 'flou': 26359568, 'Carton_gris': 26359569, 'Carton_brun': 26359570, 'cartonnette': 26359571, 'kraft': 26359572, 'plastique': 26359573, 'Teint_Dans_La_Masse': 26359574, 'metal': 26359575, 'autre_refus': 26359576, 'environnement': 26359577, 'mal_croppe': 26359578}]} args : 26359561 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.04582821265651811',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26359561) 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 (1380228715,1380228714,1380228713,1380228712,1380228675,1380228674) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1380228674 begin to download photo : 1380228712 begin to download photo : 1380228714 download finish for photo 1380228674 begin to download photo : 1380228675 download finish for photo 1380228712 begin to download photo : 1380228713 download finish for photo 1380228714 begin to download photo : 1380228715 download finish for photo 1380228675 download finish for photo 1380228715 download finish for photo 1380228713 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette263595681756515179/ imagette263595711756515179/ imagette263595721756515179/ imagette263595731756515179/ imagette263595751756515179/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P26359561_30-08-2025_02_52_59.pdf 26359568 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=26359568 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263595681756515179 26359571 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=26359571 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263595711756515179 26359572 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=26359572 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263595721756515179 26359573 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=26359573 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263595731756515179 26359575 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=26359575 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263595751756515179 26359576 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=26359576 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380228741: '1756515146_1421281_1380228627_b3a3242d8eef9ebb95802415e6046cdf_66981860_rle_crop_3936323899_0.png'} change filename to text .imagette263595761756515179/ imagette263595761756515179/1756515146_1421281_1380228627_b3a3242d8eef9ebb95802415e6046cdf_66981860_rle_crop_3936323899_0.png.png imagette263595781756515179/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/780e2b88acba88d7fe49dcbde9e4e893_51253794.png imagette263595761756515179 26359578 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=26359578 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263595781756515179 26359569 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=26359569 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380228589: '1756514907_1408718_1380228477_e24cdbfd87058025efd18416d26e79f3_2097011_rle_crop_3936323024_0.png'} change filename to text .imagette263595691756515179/ imagette263595691756515179/1756514907_1408718_1380228477_e24cdbfd87058025efd18416d26e79f3_2097011_rle_crop_3936323024_0.png.png imagette263595701756515179/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/82c0f892cbf590a160243288a9fba590_36932840.png imagette263595691756515179 26359570 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=26359570 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette263595701756515179 26359574 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=26359574 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1380228588: '1756514907_1408718_1380228478_2d3a14c0d077776134a40f193ddfbcd9_76408123_rle_crop_3936323018_0.png', 1380228738: '1756515146_1421281_1380228628_6064e9ce6c3f6eb070e212e5fe2990c8_18978323_rle_crop_3936323890_0.png', 1380228739: '1756515146_1421281_1380228628_6064e9ce6c3f6eb070e212e5fe2990c8_18978323_rle_crop_3936323893_0.png', 1380228740: '1756515146_1421281_1380228627_b3a3242d8eef9ebb95802415e6046cdf_66981860_rle_crop_3936323907_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/eba20acb46496a2cf0e4f7c06d068a91_84635586.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/8265f09188bc61f57d2f183a24dce364_68962098.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/520c82657566f40f4f37736c11e2514c_98873822.png change filename to text .imagette263595741756515179/ imagette263595741756515179/1756515146_1421281_1380228628_6064e9ce6c3f6eb070e212e5fe2990c8_18978323_rle_crop_3936323890_0.png.png imagette263595741756515179/1756515146_1421281_1380228628_6064e9ce6c3f6eb070e212e5fe2990c8_18978323_rle_crop_3936323893_0.png.png imagette263595741756515179/1756514907_1408718_1380228478_2d3a14c0d077776134a40f193ddfbcd9_76408123_rle_crop_3936323018_0.png.png imagette263595741756515179/1756515146_1421281_1380228627_b3a3242d8eef9ebb95802415e6046cdf_66981860_rle_crop_3936323907_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/d09c8f5dcffea187bcced0a669137145_64035252.png imagette263595741756515179 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26359561 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26359579,26359580,26359581,26359582,26359583,26359584,26359585,26359586,26359587,26359588,26359589,26359590?tags=papier,flou,Carton_gris,Carton_brun,cartonnette,kraft,plastique,Teint_Dans_La_Masse,metal,autre_refus,environnement,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1380228715] : ('0.04582821265651811',) no score found for photo 1380228715 We are sending mail with results at report@fotonower.com args[1380228714] : ('0.04582821265651811',) no score found for photo 1380228714 We are sending mail with results at report@fotonower.com args[1380228713] : ('0.04582821265651811',) no score found for photo 1380228713 We are sending mail with results at report@fotonower.com args[1380228712] : ('0.04582821265651811',) no score found for photo 1380228712 We are sending mail with results at report@fotonower.com args[1380228675] : ('0.04582821265651811',) no score found for photo 1380228675 We are sending mail with results at report@fotonower.com args[1380228674] : ('0.04582821265651811',) no score found for photo 1380228674 We are sending mail with results at report@fotonower.com refus_total : 0.04582821265651811 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=26359561 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_P26359561_30-08-2025_02_52_59.pdf results_Auto_P26359561_30-08-2025_02_52_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26359561_30-08-2025_02_52_59.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','26359561','results_Auto_P26359561_30-08-2025_02_52_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26359561_30-08-2025_02_52_59.pdf','pdf','','0.09','0.04582821265651811') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26359561]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] map_info['map_portfolio_photo'] : {26359561: [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674, 1380228629, 1380228628, 1380228627, 1380228598, 1380228597, 1380228595, 1380228594, 1380228574, 1380228573, 1380228572, 1380228571, 1380228504, 1380228503, 1380228502, 1380228501, 1380228500, 1380228478, 1380228477]} final : False mtd_id 4302 list_pids : [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] 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, '3640553') ('4302', '26359561', '1380228715', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228714', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228713', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228712', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228675', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228674', None, None, None, None, None, '3640553') 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', '26359561', '1380228715', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228714', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228713', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228712', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228675', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228674', None, None, None, None, None, '3640553')] time used for this insertion : 0.013399600982666016 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6699256896972656 time spend to save output : 0.013608455657958984 total time spend for step 4 : 1.6835341453552246 step5:split_time_score Sat Aug 30 02:53:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26359561'] 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 : [('26359561',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26359561) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1380228674: {'path': 'temp/1756515178_644548_1380228674_1b40d706dd5d8d41bd6ebe39ff913691_34924236.jpg', 'extension': 'jpg'}, 1380228675: {'path': 'temp/1756515178_644548_1380228675_d1ecb80df9a7776a8850111023756f9c_91982060.jpg', 'extension': 'jpg'}, 1380228714: {'path': 'temp/1756515178_644548_1380228714_ea1822df4b538e4e546d2e5aed802779_90780507.jpg', 'extension': 'jpg'}, 1380228715: {'path': 'temp/1756515178_644548_1380228715_fde1c197512013473cf75947829a7ec8_89934003.jpg', 'extension': 'jpg'}, 1380228712: {'path': 'temp/1756515178_644548_1380228712_1d531de2e18cc2f794341bfb4cfc87bd_81085794.jpg', 'extension': 'jpg'}, 1380228713: {'path': 'temp/1756515178_644548_1380228713_6b93a2ad828f91e7662194d963eb50ab_53174808.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 = 26359561; (('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 = 26359561 group by h (('02', 24),) 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=26359561 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 (26359561) 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 (26359561) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 30082025 26359561 Nombre de photos uploadées : 24 / 23040 (0%) 30082025 26359561 Nombre de photos taguées (types de déchets): 0 / 24 (0%) 30082025 26359561 Nombre de photos taguées (volume) : 0 / 24 (0%) [{'photo_id': 1380228478, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/2d3a14c0d077776134a40f193ddfbcd9_76408123.jpg', 'username': None, 'uploaded_at': 1756514772, 'text': 'image_30082025_02_45_14_010135m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1380228477, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/e24cdbfd87058025efd18416d26e79f3_2097011.jpg', 'username': None, 'uploaded_at': 1756514772, 'text': 'image_30082025_02_45_24_010135m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1380228504, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/354768806adbe2c76bc337e465bc0979_49078467.jpg', 'username': None, 'uploaded_at': 1756514832, 'text': 'image_30082025_02_45_43_10137.jpg'}, {'photo_id': 1380228503, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/30/eeb7d829cc8684fb8ef967665fda3a80_50832908.jpg', 'username': None, 'uploaded_at': 1756514832, 'text': 'image_30082025_02_46_04_10153.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.6226043701171875e-06 elapsed_time : order_list_meta_photo_and_scores 6.198883056640625e-06 ???????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0012214183807373047 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26359561, '2025-08-30' ) 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-08-30' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2200963,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21291184425354004 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= 2200963 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26354311, 'dashboard_result_id': 14484508, '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_P26354311_30-08-2025_00_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354314, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354315, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354316, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354321, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354324, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26354941, 'dashboard_result_id': 14484509, '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_P26354941_30-08-2025_02_01_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354982, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354984, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354985, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354986, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354992, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354993, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26355515, 'dashboard_result_id': 14484510, '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_P26355515_30-08-2025_00_47_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26355521, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26355522, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26355523, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26355524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26355525, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26355526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26355527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26355528, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26355529, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26355530, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26355531, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26355532, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26356029, 'dashboard_result_id': 14484511, '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_P26356029_30-08-2025_01_30_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26356038, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26356039, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26356040, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26356041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26356042, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26356043, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26356044, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26356045, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26356046, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26356047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26356048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26356049, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26357329, 'dashboard_result_id': 14484512, '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_P26357329_30-08-2025_01_47_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26357332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357335, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26357340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357341, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357343, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26357677, 'dashboard_result_id': 14484513, '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_P26357677_30-08-2025_02_01_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26357682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357683, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357684, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357686, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357688, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357691, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357692, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26357693, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26358007, 'dashboard_result_id': 14484514, '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_P26358007_30-08-2025_02_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26358069, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358071, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358074, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358077, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26358079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358080, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26358604, 'dashboard_result_id': 14484515, '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_P26358604_30-08-2025_02_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26358614, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358615, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358616, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26358617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358618, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358619, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358620, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358621, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358622, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358623, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358624, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358625, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26359171, 'dashboard_result_id': 14484516, '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_P26359171_30-08-2025_02_47_33.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26359182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26359183, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26359184, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26359185, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26359186, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26359187, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26359188, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26359189, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26359190, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26359192, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26359193, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26359194, 'pht': 3726}}"}, {'dashboat_entry_day': 2200963, 'dashboard_run_id': 2208929, 'mtr_portfolio_id': 26359561, 'dashboard_result_id': 14484517, '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_P26359561_30-08-2025_02_48_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26359567, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26359568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26359569, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26359570, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26359571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26359572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26359573, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26359574, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26359575, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26359576, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26359577, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26359578, '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 = 26354311 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': 3639788, 'mtr_portfolio_id': 26354311, 'created_at': datetime.datetime(2025, 8, 30, 0, 17), 'result': '0.05259478752757879', 'result_long': None, 'result_double': None}] Qualite : 0.05259478752757879 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26354311 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354311_30-08-2025_00_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26354311 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_P26354311_30-08-2025_00_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354314, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354315, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354316, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354321, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354324, 'pht': 3726}}" where mtr_portfolio_id = 26354311 and dashboard_run_id = 2208929 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`=26354311 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484508, 0.05259478752757879, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354311_30-08-2025_00_17_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354314, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354315, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354316, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354317, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354318, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354320, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354321, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354323, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354324, '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 = 26354941 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': 3639846, 'mtr_portfolio_id': 26354941, 'created_at': datetime.datetime(2025, 8, 30, 2, 1, 30), 'result': '0.0541874581559304', 'result_long': None, 'result_double': None}] Qualite : 0.0541874581559304 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26354941 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354941_30-08-2025_02_01_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26354941 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_P26354941_30-08-2025_02_01_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354982, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354984, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354985, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354986, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354992, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354993, 'pht': 3726}}" where mtr_portfolio_id = 26354941 and dashboard_run_id = 2208929 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`=26354941 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484509, 0.0541874581559304, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26354941_30-08-2025_02_01_31.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26354982, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26354983, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26354984, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26354985, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26354986, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26354987, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26354988, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26354989, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26354990, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26354991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26354992, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26354993, '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 = 26355515 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': 3639925, 'mtr_portfolio_id': 26355515, 'created_at': datetime.datetime(2025, 8, 30, 0, 47, 1), 'result': '0.038339709308548096', 'result_long': None, 'result_double': None}] Qualite : 0.038339709308548096 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26355515 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26355515_30-08-2025_00_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26355515 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_P26355515_30-08-2025_00_47_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26355521, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26355522, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26355523, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26355524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26355525, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26355526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26355527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26355528, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26355529, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26355530, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26355531, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26355532, 'pht': 3726}}" where mtr_portfolio_id = 26355515 and dashboard_run_id = 2208929 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`=26355515 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484510, 0.038339709308548096, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26355515_30-08-2025_00_47_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26355521, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26355522, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26355523, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26355524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26355525, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26355526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26355527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26355528, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26355529, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26355530, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26355531, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26355532, '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 = 26356029 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': 3640011, 'mtr_portfolio_id': 26356029, 'created_at': datetime.datetime(2025, 8, 30, 1, 30, 28), 'result': '0.0645348043026146', 'result_long': None, 'result_double': None}] Qualite : 0.0645348043026146 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26356029 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26356029_30-08-2025_01_30_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26356029 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_P26356029_30-08-2025_01_30_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26356038, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26356039, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26356040, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26356041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26356042, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26356043, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26356044, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26356045, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26356046, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26356047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26356048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26356049, 'pht': 3726}}" where mtr_portfolio_id = 26356029 and dashboard_run_id = 2208929 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`=26356029 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484511, 0.0645348043026146, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26356029_30-08-2025_01_30_28.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26356038, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26356039, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26356040, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26356041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26356042, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26356043, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26356044, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26356045, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26356046, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26356047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26356048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26356049, '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 = 26357329 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': 3640209, 'mtr_portfolio_id': 26357329, 'created_at': datetime.datetime(2025, 8, 30, 1, 47, 1), 'result': '0.034956030996926596', 'result_long': None, 'result_double': None}] Qualite : 0.034956030996926596 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26357329 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357329_30-08-2025_01_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26357329 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_P26357329_30-08-2025_01_47_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26357332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357335, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26357340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357341, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357343, 'pht': 3726}}" where mtr_portfolio_id = 26357329 and dashboard_run_id = 2208929 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`=26357329 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484512, 0.034956030996926596, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357329_30-08-2025_01_47_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26357332, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357333, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357334, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357335, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357336, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357339, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26357340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357341, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357342, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357343, '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 = 26357677 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': 3640245, 'mtr_portfolio_id': 26357677, 'created_at': datetime.datetime(2025, 8, 30, 2, 2, 59), 'result': '0.042465975591740306', 'result_long': None, 'result_double': None}] Qualite : 0.042465975591740306 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26357677 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357677_30-08-2025_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26357677 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_P26357677_30-08-2025_02_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26357682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357683, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357684, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357686, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357688, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357691, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357692, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26357693, 'pht': 3726}}" where mtr_portfolio_id = 26357677 and dashboard_run_id = 2208929 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`=26357677 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484513, 0.042465975591740306, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26357677_30-08-2025_02_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26357682, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26357683, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26357684, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26357685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26357686, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26357687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26357688, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26357689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26357690, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26357691, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26357692, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26357693, '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 = 26358007 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': 3640319, 'mtr_portfolio_id': 26358007, 'created_at': datetime.datetime(2025, 8, 30, 2, 17), 'result': '0.05083260333324252', 'result_long': None, 'result_double': None}] Qualite : 0.05083260333324252 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26358007 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358007_30-08-2025_02_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26358007 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_P26358007_30-08-2025_02_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26358069, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358071, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358074, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358077, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26358079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358080, 'pht': 3726}}" where mtr_portfolio_id = 26358007 and dashboard_run_id = 2208931 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`=26358007 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484514, 0.05083260333324252, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358007_30-08-2025_02_17_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26358069, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358071, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358073, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358074, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358075, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358077, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358078, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26358079, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358080, '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 = 26358604 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': 3640394, 'mtr_portfolio_id': 26358604, 'created_at': datetime.datetime(2025, 8, 30, 2, 32, 58), 'result': '0.05610939559169867', 'result_long': None, 'result_double': None}] Qualite : 0.05610939559169867 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26358604 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358604_30-08-2025_02_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26358604 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_P26358604_30-08-2025_02_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26358614, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358615, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358616, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26358617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358618, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358619, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358620, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358621, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358622, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358623, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358624, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358625, 'pht': 3726}}" where mtr_portfolio_id = 26358604 and dashboard_run_id = 2208931 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`=26358604 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484515, 0.05610939559169867, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26358604_30-08-2025_02_32_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26358614, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26358615, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26358616, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26358617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26358618, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26358619, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26358620, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26358621, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26358622, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26358623, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26358624, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26358625, '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 = 26359171 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': 3640483, 'mtr_portfolio_id': 26359171, 'created_at': datetime.datetime(2025, 8, 30, 2, 47, 33), 'result': '0.0585220596335806', 'result_long': None, 'result_double': None}] Qualite : 0.0585220596335806 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26359171 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26359171_30-08-2025_02_47_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26359171 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_P26359171_30-08-2025_02_47_33.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26359182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26359183, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26359184, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26359185, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26359186, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26359187, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26359188, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26359189, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26359190, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26359192, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26359193, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26359194, 'pht': 3726}}" where mtr_portfolio_id = 26359171 and dashboard_run_id = 2208931 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`=26359171 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484516, 0.0585220596335806, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26359171_30-08-2025_02_47_33.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26359182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26359183, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26359184, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26359185, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26359186, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26359187, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26359188, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26359189, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26359190, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26359192, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26359193, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26359194, '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 = 26359561 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': 3640553, 'mtr_portfolio_id': 26359561, 'created_at': datetime.datetime(2025, 8, 30, 2, 52, 58), 'result': '0.04582821265651811', 'result_long': None, 'result_double': None}] Qualite : 0.04582821265651811 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26359561 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26359561_30-08-2025_02_52_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26359561 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_P26359561_30-08-2025_02_52_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26359567, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26359568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26359569, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26359570, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26359571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26359572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26359573, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26359574, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26359575, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26359576, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26359577, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26359578, 'pht': 3726}}" where mtr_portfolio_id = 26359561 and dashboard_run_id = 2208931 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`=26359561 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14484517, 0.04582821265651811, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26359561_30-08-2025_02_52_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26359567, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26359568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26359569, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26359570, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26359571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26359572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26359573, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26359574, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26359575, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26359576, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26359577, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26359578, '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 (26354311,26354941,26355515,26356029,26357329,26357677,26358007,26358604,26359171,26359561) result : ((1380209529,), (1380209532,), (1380210237,), (1380210240,), (1380210243,), (1380210649,), (1380210652,), (1380210655,), (1380210658,), (1380210661,), (1380211446,), (1380211447,), (1380211448,), (1380211449,), (1380211450,), (1380211649,), (1380211650,), (1380211651,), (1380211652,), (1380211653,), (1380211654,), (1380211705,), (1380211706,), (1380211707,), (1380211708,), (1380211709,), (1380211775,), (1380211776,), (1380211777,), (1380211778,), (1380211845,), (1380211846,), (1380211847,), (1380211848,), (1380211849,), (1380211850,), (1380211870,), (1380211871,), (1380211872,), (1380211873,), (1380211874,), (1380211917,), (1380211918,), (1380211919,), (1380211939,), (1380211940,), (1380211941,), (1380211942,), (1380211972,), (1380211973,), (1380211974,), (1380211975,), (1380211976,), (1380211977,), (1380212006,), (1380212008,), (1380212010,), (1380212063,), (1380212064,), (1380212065,), (1380212223,), (1380212224,), (1380212225,), (1380212226,), (1380212352,), (1380212349,), (1380212350,), (1380212351,), (1380212436,), (1380212437,), (1380212438,), (1380212439,), (1380212440,), (1380212731,), (1380212733,), (1380212734,), (1380212735,), (1380212736,), (1380212847,), (1380212848,), (1380213045,), (1380213047,), (1380213049,), (1380213051,), (1380213053,), (1380213055,), (1380213157,), (1380213158,), (1380213159,), (1380213160,), (1380213161,), (1380213210,), (1380213212,), (1380213214,), (1380213217,), (1380213219,), (1380213524,), (1380213525,), (1380213526,), (1380213527,), (1380213528,), (1380213529,), (1380213622,), (1380213623,), (1380213624,), (1380213773,), (1380213775,), (1380213777,), (1380213779,), (1380213899,), (1380213900,), (1380213901,), (1380213902,), (1380213903,), (1380213943,), (1380213944,), (1380213945,), (1380213946,), (1380213947,), (1380213948,), (1380214087,), (1380214088,), (1380214089,), (1380214090,), (1380214091,), (1380214114,), (1380214116,), (1380214118,), (1380214479,), (1380214480,), (1380214481,), (1380214586,), (1380214582,), (1380214583,), (1380214584,), (1380214585,), (1380214614,), (1380214615,), (1380214616,), (1380214617,), (1380214678,), (1380214680,), (1380214682,), (1380214684,), (1380215002,), (1380215004,), (1380215089,), (1380215090,), (1380215091,), (1380215092,), (1380215093,), (1380215160,), (1380215161,), (1380215162,), (1380215163,), (1380215164,), (1380215183,), (1380215184,), (1380215185,), (1380215186,), (1380215187,), (1380215209,), (1380215210,), (1380215212,), (1380215213,), (1380215214,), (1380215215,), (1380215240,), (1380215241,), (1380215242,), (1380215275,), (1380215276,), (1380215277,), (1380215278,), (1380215279,), (1380215299,), (1380215300,), (1380215301,), (1380215302,), (1380215303,), (1380215336,), (1380215337,), (1380215338,), (1380215423,), (1380215424,), (1380215489,), (1380215490,), (1380215491,), (1380215492,), (1380215528,), (1380215524,), (1380215525,), (1380215526,), (1380215527,), (1380215561,), (1380215562,), (1380215563,), (1380215564,), (1380215565,), (1380215566,), (1380215641,), (1380215642,), (1380215643,), (1380215668,), (1380215669,), (1380215670,), (1380215671,), (1380215672,), (1380215673,), (1380215700,), (1380215701,), (1380215702,), (1380215703,), (1380215704,), (1380215756,), (1380215757,), (1380215758,), (1380215901,), (1380215902,), (1380215903,), (1380215904,), (1380215905,), (1380215935,), (1380215936,), (1380215937,), (1380215938,), (1380215939,), (1380215940,), (1380215973,), (1380215974,), (1380215976,), (1380215978,), (1380216105,), (1380216106,), (1380216107,), (1380216108,), (1380216109,), (1380216110,), (1380216142,), (1380216143,), (1380216144,), (1380216145,), (1380216146,), (1380216147,), (1380216232,), (1380216233,), (1380216234,), (1380216272,), (1380216273,), (1380216274,), (1380216275,), (1380216276,), (1380216277,), (1380222266,), (1380222284,), (1380222285,), (1380222286,), (1380222287,), (1380222311,), (1380222312,), (1380222313,), (1380222314,), (1380222315,), (1380222316,), (1380222441,), (1380222442,), (1380222443,), (1380222460,), (1380222461,), (1380222482,), (1380222483,), (1380222484,), (1380222504,), (1380222505,), (1380222506,), (1380222507,), (1380222569,), (1380222570,), (1380222571,), (1380222590,), (1380222591,), (1380222592,), (1380222620,), (1380222621,), (1380222637,), (1380222638,), (1380222640,), (1380222668,), (1380222669,), (1380222670,), (1380222671,), (1380222697,), (1380222698,), (1380222699,), (1380222700,), (1380222722,), (1380222723,), (1380222724,), (1380222725,), (1380222726,), (1380222748,), (1380222749,), (1380222750,), (1380222794,), (1380222789,), (1380222790,), (1380222791,), (1380222792,), (1380222793,), (1380222823,), (1380222824,), (1380222825,), (1380222826,), (1380222827,), (1380222850,), (1380222851,), (1380222852,), (1380222853,), (1380222854,), (1380222872,), (1380222873,), (1380222874,), (1380222875,), (1380222977,), (1380222978,), (1380222979,), (1380222980,), (1380222981,), (1380222996,), (1380222997,), (1380222998,), (1380222999,), (1380223000,), (1380223021,), (1380223022,), (1380223023,), (1380223024,), (1380223045,), (1380223046,), (1380223047,), (1380223048,), (1380223068,), (1380223069,), (1380223070,), (1380223071,), (1380223072,), (1380223086,), (1380223087,), (1380223088,), (1380223140,), (1380223141,), (1380223142,), (1380223143,), (1380223162,), (1380223163,), (1380223164,), (1380223165,), (1380223166,), (1380223190,), (1380223191,), (1380223215,), (1380223216,), (1380223218,), (1380223219,), (1380223220,), (1380223225,), (1380223226,), (1380223227,), (1380223228,), (1380223260,), (1380223257,), (1380223258,), (1380223259,), (1380223329,), (1380223330,), (1380223331,), (1380223332,), (1380223348,), (1380223349,), (1380223626,), (1380223628,), (1380223630,), (1380223632,), (1380223634,), (1380223636,), (1380224001,), (1380224003,), (1380224005,), (1380224007,), (1380224009,), (1380224352,), (1380224359,), (1380224367,), (1380224374,), (1380224381,), (1380224730,), (1380224731,), (1380224732,), (1380224828,), (1380224829,), (1380224830,), (1380224831,), (1380224832,), (1380224846,), (1380224847,), (1380224848,), (1380224849,), (1380224850,), (1380224884,), (1380224885,), (1380224886,), (1380224887,), (1380224888,), (1380224977,), (1380224978,), (1380224979,), (1380224980,), (1380225214,), (1380225216,), (1380225218,), (1380225220,), (1380225610,), (1380225612,), (1380225614,), (1380226082,), (1380226084,), (1380227110,), (1380227105,), (1380227106,), (1380227107,), (1380227108,), (1380227109,), (1380227212,), (1380227274,), (1380227276,), (1380227278,), (1380227280,), (1380227448,), (1380227449,), (1380227450,), (1380227451,), (1380227470,), (1380227471,), (1380227472,), (1380227473,), (1380227558,), (1380227559,), (1380227560,), (1380227561,), (1380227597,), (1380227598,), (1380227599,), (1380227600,), (1380227601,), (1380227727,), (1380227728,), (1380227729,), (1380227730,), (1380227788,), (1380227789,), (1380227790,), (1380227791,), (1380227792,), (1380227818,), (1380227827,), (1380227828,), (1380227829,), (1380227830,), (1380227848,), (1380227849,), (1380227850,), (1380227851,), (1380227955,), (1380227956,), (1380227957,), (1380227958,), (1380227959,), (1380227960,), (1380227977,), (1380227978,), (1380227979,), (1380228007,), (1380228008,), (1380228009,), (1380228028,), (1380228025,), (1380228026,), (1380228027,), (1380228052,), (1380228053,), (1380228054,), (1380228055,), (1380228056,), (1380228111,), (1380228112,), (1380228113,), (1380228114,), (1380228129,), (1380228130,), (1380228131,), (1380228132,), (1380228133,), (1380228157,), (1380228160,), (1380228161,), (1380228162,), (1380228185,), (1380228186,), (1380228187,), (1380228188,), (1380228213,), (1380228214,), (1380228215,), (1380228216,), (1380228249,), (1380228251,), (1380228253,), (1380228255,), (1380228256,), (1380228274,), (1380228275,), (1380228276,), (1380228277,), (1380228314,), (1380228315,), (1380228337,), (1380228338,), (1380228339,), (1380228340,), (1380228341,), (1380228366,), (1380228367,), (1380228368,), (1380228369,), (1380228391,), (1380228392,), (1380228393,), (1380228431,), (1380228432,), (1380228433,), (1380228434,), (1380228435,), (1380228451,), (1380228452,), (1380228479,), (1380228477,), (1380228478,), (1380228500,), (1380228501,), (1380228502,), (1380228503,), (1380228504,), (1380228571,), (1380228572,), (1380228573,), (1380228574,), (1380228594,), (1380228595,), (1380228597,), (1380228598,), (1380228627,), (1380228628,), (1380228629,), (1380228674,), (1380228675,), (1380228712,), (1380228713,), (1380228714,), (1380228715,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'30082025': {'nb_upload': 24, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26359561]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] map_info['map_portfolio_photo'] : {26359561: [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674, 1380228629, 1380228628, 1380228627, 1380228598, 1380228597, 1380228595, 1380228594, 1380228574, 1380228573, 1380228572, 1380228571, 1380228504, 1380228503, 1380228502, 1380228501, 1380228500, 1380228478, 1380228477]} final : True mtd_id 4302 list_pids : [1380228715, 1380228714, 1380228713, 1380228712, 1380228675, 1380228674] Looping around the photos to save general results len do output : 1 /26359561Didn'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, '3640553') ('4302', '26359561', '1380228715', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228714', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228713', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228712', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228675', None, None, None, None, None, '3640553') ('4302', None, None, None, None, None, None, None, '3640553') ('4302', '26359561', '1380228674', None, None, None, None, None, '3640553') 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, '26359561', 'None', None, None, None, None, '3640553'), ('4302', '26359561', '1380228715', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228714', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228713', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228712', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228675', None, None, None, None, None, '3640553'), ('4302', '26359561', '1380228674', None, None, None, None, None, '3640553')] time used for this insertion : 0.015561103820800781 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.880195140838623 time spend to save output : 0.015724897384643555 total time spend for step 5 : 0.8959200382232666 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 (3640553) 1.83user 2.72system 0:06.50elapsed 70%CPU (0avgtext+0avgdata 161380maxresident)k 3176inputs+4592outputs (32major+64107minor)pagefaults 0swaps