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 : 1135480 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 (3274195) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3274195) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869534 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3274195'] with mtr_portfolio_ids : ['24869534'] and first list_photo_ids : [] new path : /proc/1135480/ Name: python3 Umask: 0002 State: R (running) Tgid: 1135480 Ngid: 0 Pid: 1135480 PPid: 1135479 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1135480 NSpid: 1135480 NSpgid: 1134262 NSsid: 1134262 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99288 kB VmRSS: 99288 kB RssAnon: 59804 kB RssFile: 39484 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 588 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/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: 48 nonvoluntary_ctxt_switches: 86 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1135480', 'Ngid': '0', 'Pid': '1135480', 'PPid': '1135479', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1135480', 'NSpid': '1135480', 'NSpgid': '1134262', 'NSsid': '1134262', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99288 kB', 'VmRSS': '99288 kB', 'RssAnon': '59804 kB', 'RssFile': '39484 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '588 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/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': '48', 'nonvoluntary_ctxt_switches': '86'} ('datou_batch_current', '1135480', '1106868', '0', '1106868', '865620', '99288', b'', 'marlene', '3274195') 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 (24869534) 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 (3274195 ) ) 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 (24869534) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1371780616, 'portfolio_id': 24869534}, {'photo_id': 1371780614, 'portfolio_id': 24869534}, {'photo_id': 1371780611, 'portfolio_id': 24869534}, {'photo_id': 1371780608, 'portfolio_id': 24869534}, {'photo_id': 1371780605, 'portfolio_id': 24869534}, {'photo_id': 1371780603, 'portfolio_id': 24869534}, {'photo_id': 1371780561, 'portfolio_id': 24869534}, {'photo_id': 1371780559, 'portfolio_id': 24869534}, {'photo_id': 1371780557, 'portfolio_id': 24869534}, {'photo_id': 1371780556, 'portfolio_id': 24869534}, {'photo_id': 1371780551, 'portfolio_id': 24869534}, {'photo_id': 1371780547, 'portfolio_id': 24869534}] map_portfolio_id_photo_id: {24869534: [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547]} ##### 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.013939857482910156 #### 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 Jul 12 02:18:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24869534) 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 : 24869534 get user id for portfolio 24869534 get sub ptf for main ptf 24869534, type 3726 and hashtags ['autre_refus', 'plastique', 'Carton_gris', 'cartonnette', 'Carton_brun', 'mal_croppe', 'metal', 'kraft', 'environnement', 'flou', 'Teint_Dans_La_Masse', 'papier'] 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`=24869534 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) 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`=24869534 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[24869534, 24869538, 3726, 0.5, 2107752406, 979], [24869534, 24869539, 3726, 0.5, 492725882, 979], [24869534, 24869540, 3726, 0.5, 2107753020, 979], [24869534, 24869541, 3726, 0.5, 702398920, 979], [24869534, 24869542, 3726, 0.5, 2107753024, 979], [24869534, 24869543, 3726, 0.5, 2107755527, 979], [24869534, 24869544, 3726, 0.5, 492628673, 979], [24869534, 24869545, 3726, 0.5, 493202403, 979], [24869534, 24869546, 3726, 0.5, 493012381, 979], [24869534, 24869547, 3726, 0.5, 492777938, 979], [24869534, 24869548, 3726, 0.5, 2107752385, 979], [24869534, 24869549, 3726, 0.5, 492668766, 979]] 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`=24869534 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) 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`=24869534 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 24869534, 'sub_port_id': 24869538, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742675, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'plastique': {'main_port_id': 24869534, 'sub_port_id': 24869539, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742676, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'Carton_gris': {'main_port_id': 24869534, 'sub_port_id': 24869540, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742677, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'cartonnette': {'main_port_id': 24869534, 'sub_port_id': 24869541, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742678, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'Carton_brun': {'main_port_id': 24869534, 'sub_port_id': 24869542, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742679, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'mal_croppe': {'main_port_id': 24869534, 'sub_port_id': 24869543, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742680, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'metal': {'main_port_id': 24869534, 'sub_port_id': 24869544, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742681, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'kraft': {'main_port_id': 24869534, 'sub_port_id': 24869545, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742682, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'environnement': {'main_port_id': 24869534, 'sub_port_id': 24869546, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742683, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'flou': {'main_port_id': 24869534, 'sub_port_id': 24869547, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742684, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 24869534, 'sub_port_id': 24869548, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742685, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}, 'papier': {'main_port_id': 24869534, 'sub_port_id': 24869549, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742686, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 18, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869538 , 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=24869534 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 (24869538) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869539 , 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=24869534 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 (24869539) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869540 , 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=24869534 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 (24869540) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869541 , 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=24869534 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 (24869541) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869542 , 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=24869534 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 (24869542) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869543 , 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=24869534 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 (24869543) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869544 , 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=24869534 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 (24869544) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869545 , 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=24869534 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 (24869545) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869546 , 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=24869534 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 (24869546) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869547 , 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=24869534 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 (24869547) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869548 , 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=24869534 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 (24869548) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24869549 , 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=24869534 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 (24869549) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24869534) result : ((1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24869534 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) 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`=24869534 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__12072025_02_15_04_010144_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[24869534, 24869550, 4417, 0.5, 2107752406, 979], [24869534, 24869551, 4417, 0.5, 492725882, 979], [24869534, 24869552, 4417, 0.5, 2107753020, 979], [24869534, 24869553, 4417, 0.5, 702398920, 979], [24869534, 24869554, 4417, 0.5, 2107753024, 979], [24869534, 24869555, 4417, 0.5, 2107755527, 979], [24869534, 24869556, 4417, 0.5, 492628673, 979], [24869534, 24869557, 4417, 0.5, 493202403, 979], [24869534, 24869558, 4417, 0.5, 493012381, 979], [24869534, 24869559, 4417, 0.5, 492777938, 979], [24869534, 24869560, 4417, 0.5, 2107752385, 979], [24869534, 24869561, 4417, 0.5, 492668766, 979]] 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`=24869534 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) 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`=24869534 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','plastique','Carton_gris','cartonnette','Carton_brun','mal_croppe','metal','kraft','environnement','flou','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 24869534, 'sub_port_id': 24869550, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742687, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'plastique': {'main_port_id': 24869534, 'sub_port_id': 24869551, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742688, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'Carton_gris': {'main_port_id': 24869534, 'sub_port_id': 24869552, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742689, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'cartonnette': {'main_port_id': 24869534, 'sub_port_id': 24869553, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742690, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'Carton_brun': {'main_port_id': 24869534, 'sub_port_id': 24869554, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742691, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'mal_croppe': {'main_port_id': 24869534, 'sub_port_id': 24869555, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742692, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'metal': {'main_port_id': 24869534, 'sub_port_id': 24869556, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742693, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'kraft': {'main_port_id': 24869534, 'sub_port_id': 24869557, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742694, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'environnement': {'main_port_id': 24869534, 'sub_port_id': 24869558, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742695, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'flou': {'main_port_id': 24869534, 'sub_port_id': 24869559, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742696, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 24869534, 'sub_port_id': 24869560, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742697, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}, 'papier': {'main_port_id': 24869534, 'sub_port_id': 24869561, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16742698, 'last_updated_at': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_desc': datetime.datetime(2025, 7, 12, 2, 19, 1), 'last_updated_at_asc': datetime.datetime(2025, 7, 12, 2, 19, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869550,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869538 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869551,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869539 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869552,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869540 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869553,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869541 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869554,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869542 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869555,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869543 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869556,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869544 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869557,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869545 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869558,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869546 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869559,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869547 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869560,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869548 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24869561,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24869549 lien utilise dans velours : https://www.fotonower.com/velours/24869550,24869551,24869552,24869553,24869554,24869555,24869556,24869557,24869558,24869559,24869560,24869561?tags=autre_refus,plastique,Carton_gris,cartonnette,Carton_brun,mal_croppe,metal,kraft,environnement,flou,Teint_Dans_La_Masse,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24869534]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] map_info['map_portfolio_photo'] : {24869534: [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547]} final : False mtd_id 4302 list_pids : [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] Looping around the photos to save general results len do output : 1 /24869534. 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, '3274195') ('4302', '24869534', '1371780616', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780614', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780611', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780608', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780605', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780603', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780561', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780559', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780557', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780556', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780551', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780547', None, None, None, None, None, '3274195') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '24869534', "{'autre_refus': 24869538, 'plastique': 24869539, 'Carton_gris': 24869540, 'cartonnette': 24869541, 'Carton_brun': 24869542, 'mal_croppe': 24869543, 'metal': 24869544, 'kraft': 24869545, 'environnement': 24869546, 'flou': 24869547, 'Teint_Dans_La_Masse': 24869548, 'papier': 24869549}", None, None, None, None, '3274195'), ('4302', '24869534', '1371780616', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780614', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780611', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780608', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780605', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780603', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780561', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780559', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780557', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780556', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780551', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780547', None, None, None, None, None, '3274195')] time used for this insertion : 0.3850595951080322 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1568031311035156 time spend to save output : 0.3853647708892822 total time spend for step 1 : 2.542167901992798 step2:final Sat Jul 12 02:19:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (24869534) 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 24869534 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1371780561,1371780559,1371780557,1371780556,1371780551,1371780547,1371780616,1371780614,1371780611,1371780608,1371780605,1371780603); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24869534]) Inside saveOutput : final : False verbose : True original output for save of step final : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} new output for save of step final : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] map_info['map_portfolio_photo'] : {24869534: [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547]} final : False mtd_id 4302 list_pids : [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] Looping around the photos to save general results len do output : 12 /1371780616.Didn't retrieve data . /1371780614.Didn't retrieve data . /1371780611.Didn't retrieve data . /1371780608.Didn't retrieve data . /1371780605.Didn't retrieve data . /1371780603.Didn't retrieve data . /1371780561.Didn't retrieve data . /1371780559.Didn't retrieve data . /1371780557.Didn't retrieve data . /1371780556.Didn't retrieve data . /1371780551.Didn't retrieve data . /1371780547.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, '3274195') ('4302', '24869534', '1371780616', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780614', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780611', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780608', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780605', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780603', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780561', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780559', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780557', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780556', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780551', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780547', None, None, None, None, None, '3274195') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 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', '24869534', '1371780616', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780614', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780611', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780608', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780605', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780603', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780561', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780559', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780557', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780556', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780551', '0.0', None, None, None, None, '3274195'), ('4302', '24869534', '1371780547', '0.0', None, None, None, None, '3274195')] time used for this insertion : 0.09451746940612793 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.014003276824951172 time spend to save output : 0.09509730339050293 total time spend for step 2 : 0.1091005802154541 step3:velours_tree Sat Jul 12 02:19:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {24869534: [{'autre_refus': 24869538, 'plastique': 24869539, 'Carton_gris': 24869540, 'cartonnette': 24869541, 'Carton_brun': 24869542, 'mal_croppe': 24869543, 'metal': 24869544, 'kraft': 24869545, 'environnement': 24869546, 'flou': 24869547, 'Teint_Dans_La_Masse': 24869548, 'papier': 24869549}]} input_args_next_step : {24869534: ()} output_args : {24869534: [{'autre_refus': 24869538, 'plastique': 24869539, 'Carton_gris': 24869540, 'cartonnette': 24869541, 'Carton_brun': 24869542, 'mal_croppe': 24869543, 'metal': 24869544, 'kraft': 24869545, 'environnement': 24869546, 'flou': 24869547, 'Teint_Dans_La_Masse': 24869548, 'papier': 24869549}]} args : 24869534 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 : ({'autre_refus': 24869538, 'plastique': 24869539, 'Carton_gris': 24869540, 'cartonnette': 24869541, 'Carton_brun': 24869542, 'mal_croppe': 24869543, 'metal': 24869544, 'kraft': 24869545, 'environnement': 24869546, 'flou': 24869547, 'Teint_Dans_La_Masse': 24869548, 'papier': 24869549},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24869534) 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([24869534]) 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.27974390983581543 time spend to save output : 4.1961669921875e-05 total time spend for step 3 : 0.2797858715057373 step4:send_mail_cod Sat Jul 12 02:19:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} input_args_next_step : {1371780616: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780616 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780614 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780611 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780608 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780605 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780603 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780561 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780559 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780557 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780556 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780551 depend.output_id : 0 input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ()} output_args : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',)} args : 1371780547 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 : {24869534: [{'autre_refus': 24869538, 'plastique': 24869539, 'Carton_gris': 24869540, 'cartonnette': 24869541, 'Carton_brun': 24869542, 'mal_croppe': 24869543, 'metal': 24869544, 'kraft': 24869545, 'environnement': 24869546, 'flou': 24869547, 'Teint_Dans_La_Masse': 24869548, 'papier': 24869549}]} input_args_next_step : {1371780616: ('0.0',), 1371780614: ('0.0',), 1371780611: ('0.0',), 1371780608: ('0.0',), 1371780605: ('0.0',), 1371780603: ('0.0',), 1371780561: ('0.0',), 1371780559: ('0.0',), 1371780557: ('0.0',), 1371780556: ('0.0',), 1371780551: ('0.0',), 1371780547: ('0.0',), 24869534: ()} output_args : {24869534: [{'autre_refus': 24869538, 'plastique': 24869539, 'Carton_gris': 24869540, 'cartonnette': 24869541, 'Carton_brun': 24869542, 'mal_croppe': 24869543, 'metal': 24869544, 'kraft': 24869545, 'environnement': 24869546, 'flou': 24869547, 'Teint_Dans_La_Masse': 24869548, 'papier': 24869549}]} args : 24869534 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 :13, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24869534) 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 (1371780616,1371780614,1371780611,1371780608,1371780605,1371780603,1371780561,1371780559,1371780557,1371780556,1371780551,1371780547) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1371780547 begin to download photo : 1371780557 begin to download photo : 1371780603 begin to download photo : 1371780611 download finish for photo 1371780603 begin to download photo : 1371780605 download finish for photo 1371780611 begin to download photo : 1371780614 download finish for photo 1371780557 begin to download photo : 1371780559 download finish for photo 1371780547 begin to download photo : 1371780551 download finish for photo 1371780614 begin to download photo : 1371780616 download finish for photo 1371780605 begin to download photo : 1371780608 download finish for photo 1371780551 begin to download photo : 1371780556 download finish for photo 1371780559 begin to download photo : 1371780561 download finish for photo 1371780556 download finish for photo 1371780616 download finish for photo 1371780608 download finish for photo 1371780561 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette248695381752279542/ imagette248695391752279542/ imagette248695411752279542/ imagette248695431752279542/ imagette248695441752279542/ imagette248695451752279542/ imagette248695471752279542/ imagette248695401752279542/ imagette248695421752279542/ imagette248695481752279542/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24869534_12-07-2025_02_19_02.pdf 24869538 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=24869538 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695381752279542 24869539 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=24869539 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695391752279542 24869541 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=24869541 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695411752279542 24869543 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=24869543 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695431752279542 24869544 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=24869544 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695441752279542 24869545 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=24869545 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695451752279542 24869547 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=24869547 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695471752279542 24869540 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=24869540 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695401752279542 24869542 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=24869542 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695421752279542 24869548 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=24869548 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette248695481752279542 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24869534 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24869550,24869551,24869552,24869553,24869554,24869555,24869556,24869557,24869558,24869559,24869560,24869561?tags=autre_refus,plastique,Carton_gris,cartonnette,Carton_brun,mal_croppe,metal,kraft,environnement,flou,Teint_Dans_La_Masse,papier your option no_mail is active, we will not send the real mail to your client args[1371780616] : ('0.0',) no score found for photo 1371780616 We are sending mail with results at report@fotonower.com args[1371780614] : ('0.0',) no score found for photo 1371780614 We are sending mail with results at report@fotonower.com args[1371780611] : ('0.0',) no score found for photo 1371780611 We are sending mail with results at report@fotonower.com args[1371780608] : ('0.0',) no score found for photo 1371780608 We are sending mail with results at report@fotonower.com args[1371780605] : ('0.0',) no score found for photo 1371780605 We are sending mail with results at report@fotonower.com args[1371780603] : ('0.0',) no score found for photo 1371780603 We are sending mail with results at report@fotonower.com args[1371780561] : ('0.0',) no score found for photo 1371780561 We are sending mail with results at report@fotonower.com args[1371780559] : ('0.0',) no score found for photo 1371780559 We are sending mail with results at report@fotonower.com args[1371780557] : ('0.0',) no score found for photo 1371780557 We are sending mail with results at report@fotonower.com args[1371780556] : ('0.0',) no score found for photo 1371780556 We are sending mail with results at report@fotonower.com args[1371780551] : ('0.0',) no score found for photo 1371780551 We are sending mail with results at report@fotonower.com args[1371780547] : ('0.0',) no score found for photo 1371780547 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24869534 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_P24869534_12-07-2025_02_19_02.pdf results_Auto_P24869534_12-07-2025_02_19_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24869534_12-07-2025_02_19_02.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','24869534','results_Auto_P24869534_12-07-2025_02_19_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24869534_12-07-2025_02_19_02.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24869534]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] map_info['map_portfolio_photo'] : {24869534: [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547]} final : False mtd_id 4302 list_pids : [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] 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, '3274195') ('4302', '24869534', '1371780616', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780614', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780611', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780608', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780605', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780603', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780561', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780559', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780557', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780556', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780551', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780547', None, None, None, None, None, '3274195') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24869534', '1371780616', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780614', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780611', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780608', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780605', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780603', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780561', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780559', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780557', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780556', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780551', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780547', None, None, None, None, None, '3274195')] time used for this insertion : 0.19316673278808594 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5550389289855957 time spend to save output : 0.1934525966644287 total time spend for step 4 : 1.7484915256500244 step5:split_time_score Sat Jul 12 02:19:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24869534'] 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 : [('24869534',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24869534) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1371780547: {'path': 'temp/1752279542_1135480_1371780547_bf1ccd18d592c798b806a357ba90db59.jpg', 'extension': 'jpg'}, 1371780551: {'path': 'temp/1752279542_1135480_1371780551_69183d8260a39bb56bf9b86de25ddafa.jpg', 'extension': 'jpg'}, 1371780556: {'path': 'temp/1752279542_1135480_1371780556_35146e28bd68389a40fe10292e6150e2.jpg', 'extension': 'jpg'}, 1371780611: {'path': 'temp/1752279542_1135480_1371780611_6216e5d5d1e19046a125ef734f1d9257.jpg', 'extension': 'jpg'}, 1371780614: {'path': 'temp/1752279542_1135480_1371780614_dfbc1a17578bb66e5b4aad7ba51929d1.jpg', 'extension': 'jpg'}, 1371780616: {'path': 'temp/1752279542_1135480_1371780616_4bf9a76fd555e36eae5785969ba1c012.jpg', 'extension': 'jpg'}, 1371780603: {'path': 'temp/1752279542_1135480_1371780603_0a5763f55bc9f042e254fc57e4774662.jpg', 'extension': 'jpg'}, 1371780605: {'path': 'temp/1752279542_1135480_1371780605_3b647c8cc000a720155c0bd7796422a8.jpg', 'extension': 'jpg'}, 1371780608: {'path': 'temp/1752279542_1135480_1371780608_a03a980180aa181f8fc2f3c4b3d4dc8d.jpg', 'extension': 'jpg'}, 1371780557: {'path': 'temp/1752279542_1135480_1371780557_881bf1030310239ac108bace411e54e7.jpg', 'extension': 'jpg'}, 1371780559: {'path': 'temp/1752279542_1135480_1371780559_f1ff1d7334666fcbef5312bce5e6f19b.jpg', 'extension': 'jpg'}, 1371780561: {'path': 'temp/1752279542_1135480_1371780561_e67110e21b01f49f40c7454ad88eee77.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 = 24869534; (('arc_en_ciel_jrm_live',),) 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 = 24869534 group by h (('02', 12),) 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=24869534 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 (24869534) 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 (24869534) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 12072025 24869534 Nombre de photos uploadées : 12 / 23040 (0%) 12072025 24869534 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 12072025 24869534 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1371780561, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/e67110e21b01f49f40c7454ad88eee77.jpg', 'username': None, 'uploaded_at': 1752279367, 'text': 'image_12072025_02_15_04_10144.jpg'}, {'photo_id': 1371780559, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/f1ff1d7334666fcbef5312bce5e6f19b.jpg', 'username': None, 'uploaded_at': 1752279367, 'text': 'image_12072025_02_15_14_10139.jpg'}, {'photo_id': 1371780557, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/881bf1030310239ac108bace411e54e7.jpg', 'username': None, 'uploaded_at': 1752279367, 'text': 'image_12072025_02_15_24_10135.jpg'}, {'photo_id': 1371780556, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/12/35146e28bd68389a40fe10292e6150e2.jpg', 'username': None, 'uploaded_at': 1752279367, 'text': 'image_12072025_02_15_35_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 9.298324584960938e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006730556488037109 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24869534, '2025-07-12' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1971997,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03648233413696289 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= 1971997 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1971997, 'dashboard_run_id': 1979791, 'mtr_portfolio_id': 24867390, 'dashboard_result_id': 12451520, '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_P24867390_12-07-2025_01_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24867515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24867516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24867517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24867518, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24867519, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24867520, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24867521, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24867522, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24867523, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24867524, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24867525, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24867526, 'pht': 3726}}"}, {'dashboat_entry_day': 1971997, 'dashboard_run_id': 1979791, 'mtr_portfolio_id': 24868411, 'dashboard_result_id': 12451521, '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_P24868411_12-07-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24868440, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868441, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868443, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868447, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868450, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868451, 'pht': 3726}}"}, {'dashboat_entry_day': 1971997, 'dashboard_run_id': 1979791, 'mtr_portfolio_id': 24868961, 'dashboard_result_id': 12451522, '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_P24868961_12-07-2025_02_16_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868990, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868992, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24868995, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868999, 'pht': 3726}}"}, {'dashboat_entry_day': 1971997, 'dashboard_run_id': 1979791, 'mtr_portfolio_id': 24869534, 'dashboard_result_id': 12451523, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] 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 = 24867390 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': 3274040, 'mtr_portfolio_id': 24867390, 'created_at': datetime.datetime(2025, 7, 12, 1, 46, 59), 'result': '0.039274434489525195', 'result_long': None, 'result_double': None}] Qualite : 0.039274434489525195 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24867390 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24867390_12-07-2025_01_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24867390 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_P24867390_12-07-2025_01_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24867515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24867516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24867517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24867518, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24867519, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24867520, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24867521, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24867522, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24867523, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24867524, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24867525, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24867526, 'pht': 3726}}" where mtr_portfolio_id = 24867390 and dashboard_run_id = 1979791 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`=24867390 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12451520, 0.039274434489525195, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24867390_12-07-2025_01_46_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24867515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24867516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24867517, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24867518, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24867519, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24867520, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24867521, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24867522, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24867523, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24867524, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24867525, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24867526, '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 = 24868411 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': 3274086, 'mtr_portfolio_id': 24868411, 'created_at': datetime.datetime(2025, 7, 12, 2, 3), 'result': '0.03749161848983475', 'result_long': None, 'result_double': None}] Qualite : 0.03749161848983475 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24868411 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868411_12-07-2025_02_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24868411 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_P24868411_12-07-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24868440, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868441, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868443, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868447, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868450, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868451, 'pht': 3726}}" where mtr_portfolio_id = 24868411 and dashboard_run_id = 1979791 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`=24868411 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12451521, 0.03749161848983475, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868411_12-07-2025_02_03_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24868440, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868441, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868443, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868444, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868445, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868446, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868447, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868449, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868450, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868451, '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 = 24868961 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': 3274146, 'mtr_portfolio_id': 24868961, 'created_at': datetime.datetime(2025, 7, 12, 2, 16, 57), 'result': '0.02968191619785732', 'result_long': None, 'result_double': None}] Qualite : 0.02968191619785732 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24868961 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868961_12-07-2025_02_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24868961 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_P24868961_12-07-2025_02_16_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868990, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868992, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24868995, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868999, 'pht': 3726}}" where mtr_portfolio_id = 24868961 and dashboard_run_id = 1979791 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`=24868961 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12451522, 0.02968191619785732, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24868961_12-07-2025_02_16_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24868988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24868989, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24868990, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24868991, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24868992, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24868993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24868994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24868995, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24868996, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24868997, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24868998, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24868999, '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 = 24869534 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24869534 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 24869534 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24869534 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24869534 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24869534 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24869534_12-07-2025_02_19_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24869534 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_P24869534_12-07-2025_02_19_02.pdf'}" where mtr_portfolio_id = 24869534 and dashboard_run_id = 1979791 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24867390,24868411,24868961,24869534) result : ((1371768392,), (1371768431,), (1371768481,), (1371768538,), (1371768569,), (1371768674,), (1371769369,), (1371769405,), (1371769461,), (1371769523,), (1371769558,), (1371769585,), (1371769831,), (1371769857,), (1371769883,), (1371769917,), (1371769945,), (1371769979,), (1371770071,), (1371770099,), (1371770122,), (1371770148,), (1371770174,), (1371770199,), (1371770824,), (1371770863,), (1371770906,), (1371770952,), (1371771003,), (1371771056,), (1371771490,), (1371771564,), (1371771588,), (1371771631,), (1371771647,), (1371771675,), (1371771770,), (1371771774,), (1371771790,), (1371771811,), (1371771816,), (1371771836,), (1371772100,), (1371772123,), (1371772147,), (1371772175,), (1371772192,), (1371772224,), (1371772528,), (1371772550,), (1371772583,), (1371772623,), (1371772645,), (1371772666,), (1371772807,), (1371772830,), (1371772860,), (1371772886,), (1371772913,), (1371772918,), (1371773175,), (1371773198,), (1371773220,), (1371773232,), (1371773246,), (1371773254,), (1371773812,), (1371773843,), (1371773876,), (1371773932,), (1371773981,), (1371774026,), (1371774161,), (1371774164,), (1371774167,), (1371774169,), (1371774174,), (1371774180,), (1371774192,), (1371774200,), (1371774203,), (1371774205,), (1371774206,), (1371774207,), (1371774234,), (1371774237,), (1371774240,), (1371774242,), (1371774244,), (1371774247,), (1371774417,), (1371774442,), (1371774465,), (1371774492,), (1371774527,), (1371774555,), (1371774626,), (1371774636,), (1371774640,), (1371774643,), (1371774653,), (1371774655,), (1371774697,), (1371774699,), (1371774702,), (1371774703,), (1371774707,), (1371774715,), (1371774729,), (1371774734,), (1371774738,), (1371774741,), (1371774744,), (1371774745,), (1371774765,), (1371774767,), (1371774771,), (1371774773,), (1371774776,), (1371774778,), (1371774807,), (1371774809,), (1371774811,), (1371774812,), (1371774813,), (1371774814,), (1371774832,), (1371774841,), (1371774845,), (1371774849,), (1371774852,), (1371774855,), (1371774931,), (1371774936,), (1371774941,), (1371774946,), (1371774950,), (1371774953,), (1371775067,), (1371775091,), (1371775116,), (1371775139,), (1371775160,), (1371775184,), (1371775332,), (1371775333,), (1371775363,), (1371775374,), (1371775415,), (1371775424,), (1371775461,), (1371775468,), (1371775501,), (1371775516,), (1371775551,), (1371775562,), (1371775671,), (1371775706,), (1371775724,), (1371775728,), (1371775729,), (1371775730,), (1371775859,), (1371775862,), (1371775865,), (1371775868,), (1371775870,), (1371775872,), (1371776209,), (1371776254,), (1371776293,), (1371776337,), (1371776389,), (1371776415,), (1371776860,), (1371776866,), (1371776891,), (1371776901,), (1371776904,), (1371776907,), (1371776915,), (1371776917,), (1371776924,), (1371776932,), (1371776934,), (1371776942,), (1371776944,), (1371776955,), (1371776963,), (1371776965,), (1371776967,), (1371777018,), (1371777023,), (1371777039,), (1371777067,), (1371777092,), (1371777117,), (1371777255,), (1371777350,), (1371777462,), (1371777578,), (1371777682,), (1371777788,), (1371778657,), (1371778699,), (1371778754,), (1371778783,), (1371778827,), (1371778887,), (1371779059,), (1371779112,), (1371779146,), (1371779177,), (1371779213,), (1371779220,), (1371779434,), (1371779482,), (1371779527,), (1371779591,), (1371779639,), (1371779684,), (1371779998,), (1371780013,), (1371780026,), (1371780050,), (1371780072,), (1371780086,), (1371780243,), (1371780244,), (1371780248,), (1371780249,), (1371780253,), (1371780254,), (1371780259,), (1371780261,), (1371780265,), (1371780266,), (1371780271,), (1371780272,), (1371780279,), (1371780280,), (1371780282,), (1371780283,), (1371780285,), (1371780287,), (1371780313,), (1371780316,), (1371780320,), (1371780324,), (1371780326,), (1371780329,), (1371780365,), (1371780368,), (1371780371,), (1371780372,), (1371780375,), (1371780380,), (1371780392,), (1371780394,), (1371780398,), (1371780401,), (1371780408,), (1371780409,), (1371780435,), (1371780437,), (1371780440,), (1371780443,), (1371780446,), (1371780448,), (1371780471,), (1371780474,), (1371780475,), (1371780477,), (1371780479,), (1371780480,), (1371780520,), (1371780521,), (1371780523,), (1371780524,), (1371780526,), (1371780527,), (1371780529,), (1371780530,), (1371780531,), (1371780534,), (1371780535,), (1371780538,), (1371780547,), (1371780551,), (1371780556,), (1371780557,), (1371780559,), (1371780561,), (1371780603,), (1371780605,), (1371780608,), (1371780611,), (1371780614,), (1371780616,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'12072025': {'nb_upload': 12, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24869534]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] map_info['map_portfolio_photo'] : {24869534: [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547]} final : True mtd_id 4302 list_pids : [1371780616, 1371780614, 1371780611, 1371780608, 1371780605, 1371780603, 1371780561, 1371780559, 1371780557, 1371780556, 1371780551, 1371780547] Looping around the photos to save general results len do output : 1 /24869534Didn'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, '3274195') ('4302', '24869534', '1371780616', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780614', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780611', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780608', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780605', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780603', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780561', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780559', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780557', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780556', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780551', None, None, None, None, None, '3274195') ('4302', None, None, None, None, None, None, None, '3274195') ('4302', '24869534', '1371780547', None, None, None, None, None, '3274195') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '24869534', 'None', None, None, None, None, '3274195'), ('4302', '24869534', '1371780616', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780614', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780611', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780608', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780605', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780603', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780561', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780559', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780557', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780556', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780551', None, None, None, None, None, '3274195'), ('4302', '24869534', '1371780547', None, None, None, None, None, '3274195')] time used for this insertion : 0.6997787952423096 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.369199275970459 time spend to save output : 0.7000312805175781 total time spend for step 5 : 1.069230556488037 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 (3274195) 2.01user 2.35system 0:09.88elapsed 44%CPU (0avgtext+0avgdata 160048maxresident)k 0inputs+5888outputs (19major+64132minor)pagefaults 0swaps