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 : 2465327 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 (3299153) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3299153) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992907 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3299153'] with mtr_portfolio_ids : ['24992907'] and first list_photo_ids : [] new path : /proc/2465327/ Name: python3 Umask: 0002 State: R (running) Tgid: 2465327 Ngid: 0 Pid: 2465327 PPid: 2465326 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2465327 NSpid: 2465327 NSpgid: 2463773 NSsid: 2463773 VmPeak: 1106876 kB VmSize: 1106876 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100140 kB VmRSS: 100140 kB RssAnon: 59824 kB RssFile: 40316 kB RssShmem: 0 kB VmData: 865628 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 51 nonvoluntary_ctxt_switches: 95 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2465327', 'Ngid': '0', 'Pid': '2465327', 'PPid': '2465326', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2465327', 'NSpid': '2465327', 'NSpgid': '2463773', 'NSsid': '2463773', 'VmPeak': '1106876 kB', 'VmSize': '1106876 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100140 kB', 'VmRSS': '100140 kB', 'RssAnon': '59824 kB', 'RssFile': '40316 kB', 'RssShmem': '0 kB', 'VmData': '865628 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '51', 'nonvoluntary_ctxt_switches': '95'} ('datou_batch_current', '2465327', '1106876', '0', '1106876', '865628', '100140', b'', 'marlene', '3299153') 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 (24992907) 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 (3299153 ) ) 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 (24992907) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1372281948, 'portfolio_id': 24992907}, {'photo_id': 1372281935, 'portfolio_id': 24992907}, {'photo_id': 1372281925, 'portfolio_id': 24992907}, {'photo_id': 1372281919, 'portfolio_id': 24992907}, {'photo_id': 1372281915, 'portfolio_id': 24992907}, {'photo_id': 1372281911, 'portfolio_id': 24992907}, {'photo_id': 1372281893, 'portfolio_id': 24992907}, {'photo_id': 1372281889, 'portfolio_id': 24992907}, {'photo_id': 1372281880, 'portfolio_id': 24992907}, {'photo_id': 1372281864, 'portfolio_id': 24992907}, {'photo_id': 1372281828, 'portfolio_id': 24992907}, {'photo_id': 1372281824, 'portfolio_id': 24992907}] map_portfolio_id_photo_id: {24992907: [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824]} ##### 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.013766288757324219 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Jul 16 08:18:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24992907) 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 : 24992907 get user id for portfolio 24992907 get sub ptf for main ptf 24992907, type 3726 and hashtags ['plastique', 'cartonnette', 'kraft', 'papier', 'Teint_Dans_La_Masse', 'environnement', 'flou', 'mal_croppe', 'Carton_brun', 'autre_refus', 'Carton_gris', 'metal'] 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`=24992907 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) 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`=24992907 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_3726_metal_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)[[24992907, 24992910, 3726, 0.5, 492725882, 979], [24992907, 24992911, 3726, 0.5, 702398920, 979], [24992907, 24992912, 3726, 0.5, 493202403, 979], [24992907, 24992913, 3726, 0.5, 492668766, 979], [24992907, 24992914, 3726, 0.5, 2107752385, 979], [24992907, 24992915, 3726, 0.5, 493012381, 979], [24992907, 24992916, 3726, 0.5, 492777938, 979], [24992907, 24992917, 3726, 0.5, 2107755527, 979], [24992907, 24992918, 3726, 0.5, 2107753024, 979], [24992907, 24992919, 3726, 0.5, 2107752406, 979], [24992907, 24992920, 3726, 0.5, 2107753020, 979], [24992907, 24992921, 3726, 0.5, 492628673, 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`=24992907 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) 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`=24992907 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 24992907, 'sub_port_id': 24992910, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838162, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'cartonnette': {'main_port_id': 24992907, 'sub_port_id': 24992911, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838163, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'kraft': {'main_port_id': 24992907, 'sub_port_id': 24992912, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838164, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'papier': {'main_port_id': 24992907, 'sub_port_id': 24992913, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838165, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 24992907, 'sub_port_id': 24992914, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838166, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'environnement': {'main_port_id': 24992907, 'sub_port_id': 24992915, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838167, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'flou': {'main_port_id': 24992907, 'sub_port_id': 24992916, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838168, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'mal_croppe': {'main_port_id': 24992907, 'sub_port_id': 24992917, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838169, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'Carton_brun': {'main_port_id': 24992907, 'sub_port_id': 24992918, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838170, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'autre_refus': {'main_port_id': 24992907, 'sub_port_id': 24992919, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838171, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'Carton_gris': {'main_port_id': 24992907, 'sub_port_id': 24992920, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838172, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}, 'metal': {'main_port_id': 24992907, 'sub_port_id': 24992921, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838173, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 18, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24992910 , 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=24992907 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 (24992910) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992911 , 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=24992907 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 (24992911) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992912 , 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=24992907 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 (24992912) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992913 , 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=24992907 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 (24992913) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992914 , 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=24992907 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 (24992914) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992915 , 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=24992907 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 (24992915) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992916 , 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=24992907 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 (24992916) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992917 , 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=24992907 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 (24992917) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992918 , 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=24992907 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 (24992918) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992919 , 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=24992907 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 (24992919) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992920 , 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=24992907 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 (24992920) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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 24992921 , 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=24992907 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 (24992921) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24992907) result : ((1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) 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`=24992907 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) 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`=24992907 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_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__16072025_08_15_03_010147_4417_metal_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)[[24992907, 24992931, 4417, 0.5, 492725882, 979], [24992907, 24992933, 4417, 0.5, 702398920, 979], [24992907, 24992934, 4417, 0.5, 493202403, 979], [24992907, 24992935, 4417, 0.5, 492668766, 979], [24992907, 24992936, 4417, 0.5, 2107752385, 979], [24992907, 24992938, 4417, 0.5, 493012381, 979], [24992907, 24992939, 4417, 0.5, 492777938, 979], [24992907, 24992940, 4417, 0.5, 2107755527, 979], [24992907, 24992941, 4417, 0.5, 2107753024, 979], [24992907, 24992943, 4417, 0.5, 2107752406, 979], [24992907, 24992944, 4417, 0.5, 2107753020, 979], [24992907, 24992945, 4417, 0.5, 492628673, 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`=24992907 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) 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`=24992907 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','cartonnette','kraft','papier','Teint_Dans_La_Masse','environnement','flou','mal_croppe','Carton_brun','autre_refus','Carton_gris','metal')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 24992907, 'sub_port_id': 24992931, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838186, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'cartonnette': {'main_port_id': 24992907, 'sub_port_id': 24992933, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838187, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'kraft': {'main_port_id': 24992907, 'sub_port_id': 24992934, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838188, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'papier': {'main_port_id': 24992907, 'sub_port_id': 24992935, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838189, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'Teint_Dans_La_Masse': {'main_port_id': 24992907, 'sub_port_id': 24992936, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838190, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'environnement': {'main_port_id': 24992907, 'sub_port_id': 24992938, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838191, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'flou': {'main_port_id': 24992907, 'sub_port_id': 24992939, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838192, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'mal_croppe': {'main_port_id': 24992907, 'sub_port_id': 24992940, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838193, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'Carton_brun': {'main_port_id': 24992907, 'sub_port_id': 24992941, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838194, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'autre_refus': {'main_port_id': 24992907, 'sub_port_id': 24992943, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838195, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'Carton_gris': {'main_port_id': 24992907, 'sub_port_id': 24992944, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838196, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}, 'metal': {'main_port_id': 24992907, 'sub_port_id': 24992945, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16838197, 'last_updated_at': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 8, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 8, 19)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992931,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992910 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992933,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992911 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992934,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992912 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992935,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992913 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992936,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992914 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992938,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992915 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992939,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992916 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992940,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992917 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992941,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992918 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992943,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992919 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992944,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992920 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24992945,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24992921 lien utilise dans velours : https://www.fotonower.com/velours/24992931,24992933,24992934,24992935,24992936,24992938,24992939,24992940,24992941,24992943,24992944,24992945?tags=plastique,cartonnette,kraft,papier,Teint_Dans_La_Masse,environnement,flou,mal_croppe,Carton_brun,autre_refus,Carton_gris,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24992907]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] map_info['map_portfolio_photo'] : {24992907: [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824]} final : False mtd_id 4302 list_pids : [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] Looping around the photos to save general results len do output : 1 /24992907. 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, '3299153') ('4302', '24992907', '1372281948', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281935', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281925', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281919', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281915', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281911', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281893', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281889', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281880', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281864', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281828', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281824', None, None, None, None, None, '3299153') 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, '24992907', "{'plastique': 24992910, 'cartonnette': 24992911, 'kraft': 24992912, 'papier': 24992913, 'Teint_Dans_La_Masse': 24992914, 'environnement': 24992915, 'flou': 24992916, 'mal_croppe': 24992917, 'Carton_brun': 24992918, 'autre_refus': 24992919, 'Carton_gris': 24992920, 'metal': 24992921}", None, None, None, None, '3299153'), ('4302', '24992907', '1372281948', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281935', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281925', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281919', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281915', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281911', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281893', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281889', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281880', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281864', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281828', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281824', None, None, None, None, None, '3299153')] time used for this insertion : 0.03669571876525879 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.091830015182495 time spend to save output : 0.03739595413208008 total time spend for step 1 : 2.129225969314575 step2:final Wed Jul 16 08:19:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (24992907) 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 24992907 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1372281893,1372281889,1372281880,1372281864,1372281828,1372281824,1372281948,1372281935,1372281925,1372281919,1372281915,1372281911); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24992907]) Inside saveOutput : final : False verbose : True original output for save of step final : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} new output for save of step final : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] map_info['map_portfolio_photo'] : {24992907: [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824]} final : False mtd_id 4302 list_pids : [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] Looping around the photos to save general results len do output : 12 /1372281948.Didn't retrieve data . /1372281935.Didn't retrieve data . /1372281925.Didn't retrieve data . /1372281919.Didn't retrieve data . /1372281915.Didn't retrieve data . /1372281911.Didn't retrieve data . /1372281893.Didn't retrieve data . /1372281889.Didn't retrieve data . /1372281880.Didn't retrieve data . /1372281864.Didn't retrieve data . /1372281828.Didn't retrieve data . /1372281824.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, '3299153') ('4302', '24992907', '1372281948', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281935', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281925', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281919', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281915', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281911', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281893', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281889', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281880', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281864', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281828', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281824', None, None, None, None, None, '3299153') 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', '24992907', '1372281948', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281935', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281925', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281919', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281915', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281911', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281893', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281889', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281880', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281864', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281828', '0.0', None, None, None, None, '3299153'), ('4302', '24992907', '1372281824', '0.0', None, None, None, None, '3299153')] time used for this insertion : 0.05212712287902832 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.015743732452392578 time spend to save output : 0.05281400680541992 total time spend for step 2 : 0.0685577392578125 step3:velours_tree Wed Jul 16 08:19:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {24992907: [{'plastique': 24992910, 'cartonnette': 24992911, 'kraft': 24992912, 'papier': 24992913, 'Teint_Dans_La_Masse': 24992914, 'environnement': 24992915, 'flou': 24992916, 'mal_croppe': 24992917, 'Carton_brun': 24992918, 'autre_refus': 24992919, 'Carton_gris': 24992920, 'metal': 24992921}]} input_args_next_step : {24992907: ()} output_args : {24992907: [{'plastique': 24992910, 'cartonnette': 24992911, 'kraft': 24992912, 'papier': 24992913, 'Teint_Dans_La_Masse': 24992914, 'environnement': 24992915, 'flou': 24992916, 'mal_croppe': 24992917, 'Carton_brun': 24992918, 'autre_refus': 24992919, 'Carton_gris': 24992920, 'metal': 24992921}]} args : 24992907 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 : ({'plastique': 24992910, 'cartonnette': 24992911, 'kraft': 24992912, 'papier': 24992913, 'Teint_Dans_La_Masse': 24992914, 'environnement': 24992915, 'flou': 24992916, 'mal_croppe': 24992917, 'Carton_brun': 24992918, 'autre_refus': 24992919, 'Carton_gris': 24992920, 'metal': 24992921},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24992907) 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([24992907]) 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.27733612060546875 time spend to save output : 4.410743713378906e-05 total time spend for step 3 : 0.27738022804260254 step4:send_mail_cod Wed Jul 16 08:19:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} input_args_next_step : {1372281948: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281948 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281935 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281925 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281919 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281915 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281911 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281893 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281889 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281880 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281864 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281828 depend.output_id : 0 input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ()} output_args : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',)} args : 1372281824 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 : {24992907: [{'plastique': 24992910, 'cartonnette': 24992911, 'kraft': 24992912, 'papier': 24992913, 'Teint_Dans_La_Masse': 24992914, 'environnement': 24992915, 'flou': 24992916, 'mal_croppe': 24992917, 'Carton_brun': 24992918, 'autre_refus': 24992919, 'Carton_gris': 24992920, 'metal': 24992921}]} input_args_next_step : {1372281948: ('0.0',), 1372281935: ('0.0',), 1372281925: ('0.0',), 1372281919: ('0.0',), 1372281915: ('0.0',), 1372281911: ('0.0',), 1372281893: ('0.0',), 1372281889: ('0.0',), 1372281880: ('0.0',), 1372281864: ('0.0',), 1372281828: ('0.0',), 1372281824: ('0.0',), 24992907: ()} output_args : {24992907: [{'plastique': 24992910, 'cartonnette': 24992911, 'kraft': 24992912, 'papier': 24992913, 'Teint_Dans_La_Masse': 24992914, 'environnement': 24992915, 'flou': 24992916, 'mal_croppe': 24992917, 'Carton_brun': 24992918, 'autre_refus': 24992919, 'Carton_gris': 24992920, 'metal': 24992921}]} args : 24992907 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 (24992907) 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 (1372281948,1372281935,1372281925,1372281919,1372281915,1372281911,1372281893,1372281889,1372281880,1372281864,1372281828,1372281824) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1372281824 begin to download photo : 1372281880 begin to download photo : 1372281911 begin to download photo : 1372281925 download finish for photo 1372281824 begin to download photo : 1372281828 download finish for photo 1372281925 begin to download photo : 1372281935 download finish for photo 1372281911 begin to download photo : 1372281915 download finish for photo 1372281880 begin to download photo : 1372281889 download finish for photo 1372281935 begin to download photo : 1372281948 download finish for photo 1372281828 begin to download photo : 1372281864 download finish for photo 1372281915 begin to download photo : 1372281919 download finish for photo 1372281889 begin to download photo : 1372281893 download finish for photo 1372281948 download finish for photo 1372281919 download finish for photo 1372281864 download finish for photo 1372281893 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette249929101752646741/ imagette249929111752646741/ imagette249929121752646741/ imagette249929161752646741/ imagette249929171752646741/ imagette249929191752646741/ imagette249929211752646741/ imagette249929141752646741/ imagette249929181752646741/ imagette249929201752646741/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24992907_16-07-2025_08_19_01.pdf 24992910 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=24992910 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929101752646741 24992911 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=24992911 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929111752646741 24992912 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=24992912 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929121752646741 24992916 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=24992916 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929161752646741 24992917 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=24992917 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929171752646741 24992919 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=24992919 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929191752646741 24992921 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=24992921 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929211752646741 24992914 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=24992914 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929141752646741 24992918 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=24992918 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929181752646741 24992920 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=24992920 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249929201752646741 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24992907 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24992931,24992933,24992934,24992935,24992936,24992938,24992939,24992940,24992941,24992943,24992944,24992945?tags=plastique,cartonnette,kraft,papier,Teint_Dans_La_Masse,environnement,flou,mal_croppe,Carton_brun,autre_refus,Carton_gris,metal your option no_mail is active, we will not send the real mail to your client args[1372281948] : ('0.0',) no score found for photo 1372281948 We are sending mail with results at report@fotonower.com args[1372281935] : ('0.0',) no score found for photo 1372281935 We are sending mail with results at report@fotonower.com args[1372281925] : ('0.0',) no score found for photo 1372281925 We are sending mail with results at report@fotonower.com args[1372281919] : ('0.0',) no score found for photo 1372281919 We are sending mail with results at report@fotonower.com args[1372281915] : ('0.0',) no score found for photo 1372281915 We are sending mail with results at report@fotonower.com args[1372281911] : ('0.0',) no score found for photo 1372281911 We are sending mail with results at report@fotonower.com args[1372281893] : ('0.0',) no score found for photo 1372281893 We are sending mail with results at report@fotonower.com args[1372281889] : ('0.0',) no score found for photo 1372281889 We are sending mail with results at report@fotonower.com args[1372281880] : ('0.0',) no score found for photo 1372281880 We are sending mail with results at report@fotonower.com args[1372281864] : ('0.0',) no score found for photo 1372281864 We are sending mail with results at report@fotonower.com args[1372281828] : ('0.0',) no score found for photo 1372281828 We are sending mail with results at report@fotonower.com args[1372281824] : ('0.0',) no score found for photo 1372281824 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=24992907 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_P24992907_16-07-2025_08_19_01.pdf results_Auto_P24992907_16-07-2025_08_19_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24992907_16-07-2025_08_19_01.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','24992907','results_Auto_P24992907_16-07-2025_08_19_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24992907_16-07-2025_08_19_01.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24992907]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] map_info['map_portfolio_photo'] : {24992907: [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824]} final : False mtd_id 4302 list_pids : [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] 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, '3299153') ('4302', '24992907', '1372281948', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281935', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281925', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281919', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281915', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281911', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281893', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281889', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281880', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281864', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281828', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281824', None, None, None, None, None, '3299153') 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', '24992907', '1372281948', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281935', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281925', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281919', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281915', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281911', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281893', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281889', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281880', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281864', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281828', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281824', None, None, None, None, None, '3299153')] time used for this insertion : 0.0419154167175293 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5550944805145264 time spend to save output : 0.042205095291137695 total time spend for step 4 : 1.597299575805664 step5:split_time_score Wed Jul 16 08:19:03 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 : ['24992907'] 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 : [('24992907',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24992907) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1372281925: {'path': 'temp/1752646741_2465327_1372281925_90f00557ec9f8544e73e76853e2b81ce.jpg', 'extension': 'jpg'}, 1372281935: {'path': 'temp/1752646741_2465327_1372281935_736aec945f210ec44e60b7e10686d6fb.jpg', 'extension': 'jpg'}, 1372281948: {'path': 'temp/1752646741_2465327_1372281948_3421182c3083992ce29403b514c5b2c0.jpg', 'extension': 'jpg'}, 1372281911: {'path': 'temp/1752646741_2465327_1372281911_abb2d6752fae9cd92d5da77f2dc54631.jpg', 'extension': 'jpg'}, 1372281915: {'path': 'temp/1752646741_2465327_1372281915_9f002a35476123a32eae3ab6fbaa1db1.jpg', 'extension': 'jpg'}, 1372281919: {'path': 'temp/1752646741_2465327_1372281919_c7b7d0091365eab5929b2b6b30d798cb.jpg', 'extension': 'jpg'}, 1372281824: {'path': 'temp/1752646741_2465327_1372281824_1d78ffa890b0d7f73f7803a1dbf36001.jpg', 'extension': 'jpg'}, 1372281828: {'path': 'temp/1752646741_2465327_1372281828_2b43c3cb1bedfe21024c7b5e86fff495.jpg', 'extension': 'jpg'}, 1372281864: {'path': 'temp/1752646741_2465327_1372281864_81c5a0b597060ef36a2a9045a2e17e37.jpg', 'extension': 'jpg'}, 1372281880: {'path': 'temp/1752646741_2465327_1372281880_393d1ffe9f6a10d1fb4bb53156868573.jpg', 'extension': 'jpg'}, 1372281889: {'path': 'temp/1752646741_2465327_1372281889_77819331ab2cd4ed6e0cebdd29d22a6b.jpg', 'extension': 'jpg'}, 1372281893: {'path': 'temp/1752646741_2465327_1372281893_2fa82e9916da019a8bc41d2b8a78f99c.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 = 24992907; (('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 = 24992907 group by h (('08', 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=24992907 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 (24992907) 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 (24992907) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 16072025 24992907 Nombre de photos uploadées : 12 / 23040 (0%) 16072025 24992907 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 16072025 24992907 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1372281893, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/2fa82e9916da019a8bc41d2b8a78f99c.jpg', 'username': None, 'uploaded_at': 1752646563, 'text': 'image_16072025_08_15_03_10147.jpg'}, {'photo_id': 1372281889, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/77819331ab2cd4ed6e0cebdd29d22a6b.jpg', 'username': None, 'uploaded_at': 1752646563, 'text': 'image_16072025_08_15_13_10137.jpg'}, {'photo_id': 1372281880, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/393d1ffe9f6a10d1fb4bb53156868573.jpg', 'username': None, 'uploaded_at': 1752646563, 'text': 'image_16072025_08_15_24_10138.jpg'}, {'photo_id': 1372281864, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/81c5a0b597060ef36a2a9045a2e17e37.jpg', 'username': None, 'uploaded_at': 1752646563, 'text': 'image_16072025_08_15_34_10133.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 7.3909759521484375e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006616115570068359 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24992907, '2025-07-16' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1982205,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.030056238174438477 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= 1982205 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1982205, 'dashboard_run_id': 1990841, 'mtr_portfolio_id': 24991112, 'dashboard_result_id': 12623907, '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_P24991112_16-07-2025_07_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24991159, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24991160, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24991161, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24991162, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24991163, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24991164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24991165, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24991166, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24991167, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24991168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24991169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24991170, 'pht': 3726}}"}, {'dashboat_entry_day': 1982205, 'dashboard_run_id': 1990841, 'mtr_portfolio_id': 24991716, 'dashboard_result_id': 12623908, '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_P24991716_16-07-2025_08_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24991730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24991731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24991732, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24991733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24991734, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24991735, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24991736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24991737, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24991738, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24991739, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24991740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24991741, 'pht': 3726}}"}, {'dashboat_entry_day': 1982205, 'dashboard_run_id': 1990841, 'mtr_portfolio_id': 24992323, 'dashboard_result_id': 12623909, '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_P24992323_16-07-2025_08_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24992326, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24992327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24992328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24992329, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24992330, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24992331, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24992332, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24992333, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24992334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24992335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24992336, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24992337, 'pht': 3726}}"}, {'dashboat_entry_day': 1982205, 'dashboard_run_id': 1990841, 'mtr_portfolio_id': 24992907, 'dashboard_result_id': 12623910, '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 = 24991112 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': 3298999, 'mtr_portfolio_id': 24991112, 'created_at': datetime.datetime(2025, 7, 16, 7, 46, 59), 'result': '0.040229499376188645', 'result_long': None, 'result_double': None}] Qualite : 0.040229499376188645 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24991112 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24991112_16-07-2025_07_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24991112 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_P24991112_16-07-2025_07_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24991159, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24991160, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24991161, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24991162, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24991163, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24991164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24991165, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24991166, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24991167, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24991168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24991169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24991170, 'pht': 3726}}" where mtr_portfolio_id = 24991112 and dashboard_run_id = 1990841 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`=24991112 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12623907, 0.040229499376188645, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24991112_16-07-2025_07_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24991159, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24991160, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24991161, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24991162, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24991163, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24991164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24991165, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24991166, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24991167, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24991168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24991169, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24991170, '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 = 24991716 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': 3299047, 'mtr_portfolio_id': 24991716, 'created_at': datetime.datetime(2025, 7, 16, 8, 2, 59), 'result': '0.04842220647253989', 'result_long': None, 'result_double': None}] Qualite : 0.04842220647253989 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24991716 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24991716_16-07-2025_08_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24991716 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_P24991716_16-07-2025_08_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24991730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24991731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24991732, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24991733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24991734, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24991735, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24991736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24991737, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24991738, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24991739, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24991740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24991741, 'pht': 3726}}" where mtr_portfolio_id = 24991716 and dashboard_run_id = 1990841 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`=24991716 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12623908, 0.04842220647253989, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24991716_16-07-2025_08_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24991730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24991731, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24991732, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24991733, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24991734, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24991735, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24991736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24991737, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24991738, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24991739, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24991740, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24991741, '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 = 24992323 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': 3299111, 'mtr_portfolio_id': 24992323, 'created_at': datetime.datetime(2025, 7, 16, 8, 16, 58), 'result': '0.04160586902852723', 'result_long': None, 'result_double': None}] Qualite : 0.04160586902852723 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24992323 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24992323_16-07-2025_08_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24992323 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_P24992323_16-07-2025_08_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24992326, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24992327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24992328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24992329, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24992330, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24992331, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24992332, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24992333, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24992334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24992335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24992336, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24992337, 'pht': 3726}}" where mtr_portfolio_id = 24992323 and dashboard_run_id = 1990841 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`=24992323 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12623909, 0.04160586902852723, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24992323_16-07-2025_08_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24992326, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24992327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24992328, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24992329, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24992330, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24992331, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24992332, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24992333, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24992334, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24992335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24992336, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24992337, '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 = 24992907 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 = 24992907 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 = 24992907 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24992907 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 = 24992907 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 = 24992907 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24992907_16-07-2025_08_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24992907 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_P24992907_16-07-2025_08_19_01.pdf'}" where mtr_portfolio_id = 24992907 and dashboard_run_id = 1990841 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24991112,24991716,24992323,24992907) result : ((1372277439,), (1372277442,), (1372277446,), (1372277450,), (1372277456,), (1372277460,), (1372277475,), (1372277478,), (1372277491,), (1372277497,), (1372277501,), (1372277504,), (1372277519,), (1372277523,), (1372277525,), (1372277529,), (1372277534,), (1372277538,), (1372277555,), (1372277559,), (1372277568,), (1372277575,), (1372277583,), (1372277586,), (1372277610,), (1372277617,), (1372277619,), (1372277622,), (1372277627,), (1372277631,), (1372277647,), (1372277655,), (1372277660,), (1372277662,), (1372277668,), (1372277673,), (1372277696,), (1372277700,), (1372277704,), (1372277708,), (1372277713,), (1372277717,), (1372277738,), (1372277748,), (1372277753,), (1372277758,), (1372277762,), (1372277765,), (1372277778,), (1372277783,), (1372277787,), (1372277791,), (1372277797,), (1372277800,), (1372277815,), (1372277827,), (1372277835,), (1372277839,), (1372277843,), (1372277845,), (1372277868,), (1372277870,), (1372277873,), (1372277878,), (1372277884,), (1372277888,), (1372277912,), (1372277924,), (1372277932,), (1372277935,), (1372277940,), (1372277944,), (1372277968,), (1372277974,), (1372277978,), (1372277986,), (1372277994,), (1372277998,), (1372278017,), (1372278027,), (1372278038,), (1372278041,), (1372278045,), (1372278047,), (1372278076,), (1372278079,), (1372278081,), (1372278085,), (1372278091,), (1372278098,), (1372278121,), (1372278126,), (1372278130,), (1372278134,), (1372278140,), (1372278146,), (1372278163,), (1372278166,), (1372278170,), (1372278171,), (1372278176,), (1372278180,), (1372278201,), (1372278204,), (1372278207,), (1372278211,), (1372278216,), (1372278218,), (1372278241,), (1372278285,), (1372278288,), (1372278291,), (1372278294,), (1372278300,), (1372278304,), (1372278324,), (1372278327,), (1372278329,), (1372278331,), (1372278336,), (1372278339,), (1372278395,), (1372278405,), (1372278413,), (1372278416,), (1372278419,), (1372278422,), (1372278444,), (1372278449,), (1372278453,), (1372278459,), (1372278463,), (1372278467,), (1372278488,), (1372278496,), (1372278505,), (1372278510,), (1372278514,), (1372278518,), (1372278534,), (1372278539,), (1372278541,), (1372278545,), (1372278550,), (1372278553,), (1372278566,), (1372278571,), (1372278575,), (1372278580,), (1372278584,), (1372278588,), (1372278608,), (1372278612,), (1372278615,), (1372278617,), (1372278621,), (1372278623,), (1372278644,), (1372278650,), (1372278654,), (1372278659,), (1372278664,), (1372278669,), (1372279039,), (1372279074,), (1372279088,), (1372279094,), (1372279115,), (1372279119,), (1372279135,), (1372279304,), (1372279346,), (1372279383,), (1372279420,), (1372279457,), (1372279493,), (1372279852,), (1372279889,), (1372279933,), (1372279973,), (1372280012,), (1372280054,), (1372280178,), (1372280188,), (1372280225,), (1372280261,), (1372280301,), (1372280307,), (1372280354,), (1372280362,), (1372280368,), (1372280391,), (1372280423,), (1372280465,), (1372280577,), (1372280598,), (1372280624,), (1372280630,), (1372280635,), (1372280664,), (1372280697,), (1372280721,), (1372280727,), (1372280766,), (1372280809,), (1372280831,), (1372280884,), (1372280889,), (1372280922,), (1372280957,), (1372280959,), (1372280962,), (1372281029,), (1372281033,), (1372281037,), (1372281041,), (1372281046,), (1372281049,), (1372281068,), (1372281072,), (1372281076,), (1372281082,), (1372281089,), (1372281097,), (1372281118,), (1372281126,), (1372281132,), (1372281135,), (1372281141,), (1372281146,), (1372281165,), (1372281169,), (1372281184,), (1372281192,), (1372281203,), (1372281214,), (1372281316,), (1372281354,), (1372281397,), (1372281432,), (1372281471,), (1372281511,), (1372281587,), (1372281592,), (1372281594,), (1372281597,), (1372281601,), (1372281636,), (1372281738,), (1372281743,), (1372281748,), (1372281751,), (1372281778,), (1372281805,), (1372281824,), (1372281828,), (1372281864,), (1372281880,), (1372281889,), (1372281893,), (1372281911,), (1372281915,), (1372281919,), (1372281925,), (1372281935,), (1372281948,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'16072025': {'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([24992907]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] map_info['map_portfolio_photo'] : {24992907: [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824]} final : True mtd_id 4302 list_pids : [1372281948, 1372281935, 1372281925, 1372281919, 1372281915, 1372281911, 1372281893, 1372281889, 1372281880, 1372281864, 1372281828, 1372281824] Looping around the photos to save general results len do output : 1 /24992907Didn'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, '3299153') ('4302', '24992907', '1372281948', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281935', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281925', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281919', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281915', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281911', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281893', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281889', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281880', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281864', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281828', None, None, None, None, None, '3299153') ('4302', None, None, None, None, None, None, None, '3299153') ('4302', '24992907', '1372281824', None, None, None, None, None, '3299153') 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, '24992907', 'None', None, None, None, None, '3299153'), ('4302', '24992907', '1372281948', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281935', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281925', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281919', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281915', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281911', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281893', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281889', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281880', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281864', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281828', None, None, None, None, None, '3299153'), ('4302', '24992907', '1372281824', None, None, None, None, None, '3299153')] time used for this insertion : 0.18858075141906738 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.32717037200927734 time spend to save output : 0.18883132934570312 total time spend for step 5 : 0.5160017013549805 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 (3299153) 2.01user 2.45system 0:08.44elapsed 52%CPU (0avgtext+0avgdata 160280maxresident)k 8inputs+4896outputs (0major+64009minor)pagefaults 0swaps