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 : 3551360 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 (3244268) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3244268) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670302 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3244268'] with mtr_portfolio_ids : ['24670302'] and first list_photo_ids : [] new path : /proc/3551360/ Name: python3 Umask: 0002 State: R (running) Tgid: 3551360 Ngid: 0 Pid: 3551360 PPid: 3551359 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3551360 NSpid: 3551360 NSpgid: 3550490 NSsid: 3550490 VmPeak: 1106864 kB VmSize: 1106864 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98728 kB VmRSS: 98728 kB RssAnon: 59800 kB RssFile: 38928 kB RssShmem: 0 kB VmData: 865616 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 43 nonvoluntary_ctxt_switches: 91 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3551360', 'Ngid': '0', 'Pid': '3551360', 'PPid': '3551359', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3551360', 'NSpid': '3551360', 'NSpgid': '3550490', 'NSsid': '3550490', 'VmPeak': '1106864 kB', 'VmSize': '1106864 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98728 kB', 'VmRSS': '98728 kB', 'RssAnon': '59800 kB', 'RssFile': '38928 kB', 'RssShmem': '0 kB', 'VmData': '865616 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '43', 'nonvoluntary_ctxt_switches': '91'} ('datou_batch_current', '3551360', '1106864', '0', '1106864', '865616', '98728', b'', 'marlene', '3244268') 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 (24670302) 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 (3244268 ) ) 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 (24670302) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1371000272, 'portfolio_id': 24670302}, {'photo_id': 1371000270, 'portfolio_id': 24670302}, {'photo_id': 1371000268, 'portfolio_id': 24670302}, {'photo_id': 1371000266, 'portfolio_id': 24670302}, {'photo_id': 1371000264, 'portfolio_id': 24670302}, {'photo_id': 1371000259, 'portfolio_id': 24670302}, {'photo_id': 1371000230, 'portfolio_id': 24670302}, {'photo_id': 1371000226, 'portfolio_id': 24670302}, {'photo_id': 1371000215, 'portfolio_id': 24670302}, {'photo_id': 1371000208, 'portfolio_id': 24670302}, {'photo_id': 1371000202, 'portfolio_id': 24670302}, {'photo_id': 1371000191, 'portfolio_id': 24670302}] map_portfolio_id_photo_id: {24670302: [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191]} ##### 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.01308441162109375 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Jul 7 09: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 (24670302) 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 : 24670302 get user id for portfolio 24670302 get sub ptf for main ptf 24670302, type 3726 and hashtags ['environnement', 'papier', 'cartonnette', 'Carton_gris', 'Teint_Dans_La_Masse', 'Carton_brun', 'kraft', 'metal', 'mal_croppe', 'flou', 'autre_refus', 'plastique'] 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`=24670302 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) 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`=24670302 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_3726_plastique_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)[[24670302, 24670307, 3726, 0.5, 493012381, 979], [24670302, 24670308, 3726, 0.5, 492668766, 979], [24670302, 24670309, 3726, 0.5, 702398920, 979], [24670302, 24670310, 3726, 0.5, 2107753020, 979], [24670302, 24670311, 3726, 0.5, 2107752385, 979], [24670302, 24670312, 3726, 0.5, 2107753024, 979], [24670302, 24670313, 3726, 0.5, 493202403, 979], [24670302, 24670314, 3726, 0.5, 492628673, 979], [24670302, 24670315, 3726, 0.5, 2107755527, 979], [24670302, 24670316, 3726, 0.5, 492777938, 979], [24670302, 24670317, 3726, 0.5, 2107752406, 979], [24670302, 24670318, 3726, 0.5, 492725882, 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`=24670302 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) 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`=24670302 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 24670302, 'sub_port_id': 24670307, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582276, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'papier': {'main_port_id': 24670302, 'sub_port_id': 24670308, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582277, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'cartonnette': {'main_port_id': 24670302, 'sub_port_id': 24670309, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582278, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'Carton_gris': {'main_port_id': 24670302, 'sub_port_id': 24670310, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582279, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 24670302, 'sub_port_id': 24670311, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582280, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'Carton_brun': {'main_port_id': 24670302, 'sub_port_id': 24670312, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582281, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'kraft': {'main_port_id': 24670302, 'sub_port_id': 24670313, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582282, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'metal': {'main_port_id': 24670302, 'sub_port_id': 24670314, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582283, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'mal_croppe': {'main_port_id': 24670302, 'sub_port_id': 24670315, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582284, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'flou': {'main_port_id': 24670302, 'sub_port_id': 24670316, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582285, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'autre_refus': {'main_port_id': 24670302, 'sub_port_id': 24670317, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582286, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}, 'plastique': {'main_port_id': 24670302, 'sub_port_id': 24670318, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582287, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 18, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24670307 , 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=24670302 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 (24670307) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670308 , 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=24670302 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 (24670308) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670309 , 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=24670302 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 (24670309) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670310 , 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=24670302 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 (24670310) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670311 , 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=24670302 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 (24670311) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670312 , 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=24670302 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 (24670312) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670313 , 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=24670302 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 (24670313) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670314 , 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=24670302 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 (24670314) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670315 , 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=24670302 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 (24670315) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670316 , 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=24670302 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 (24670316) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670317 , 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=24670302 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 (24670317) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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 24670318 , 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=24670302 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 (24670318) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24670302) result : ((1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) 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`=24670302 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) 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`=24670302 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_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__07072025_09_15_04_010137_4417_plastique_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)[[24670302, 24670319, 4417, 0.5, 493012381, 979], [24670302, 24670320, 4417, 0.5, 492668766, 979], [24670302, 24670321, 4417, 0.5, 702398920, 979], [24670302, 24670322, 4417, 0.5, 2107753020, 979], [24670302, 24670323, 4417, 0.5, 2107752385, 979], [24670302, 24670324, 4417, 0.5, 2107753024, 979], [24670302, 24670325, 4417, 0.5, 493202403, 979], [24670302, 24670326, 4417, 0.5, 492628673, 979], [24670302, 24670327, 4417, 0.5, 2107755527, 979], [24670302, 24670328, 4417, 0.5, 492777938, 979], [24670302, 24670329, 4417, 0.5, 2107752406, 979], [24670302, 24670330, 4417, 0.5, 492725882, 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`=24670302 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) 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`=24670302 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','cartonnette','Carton_gris','Teint_Dans_La_Masse','Carton_brun','kraft','metal','mal_croppe','flou','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 24670302, 'sub_port_id': 24670319, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582288, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'papier': {'main_port_id': 24670302, 'sub_port_id': 24670320, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582289, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'cartonnette': {'main_port_id': 24670302, 'sub_port_id': 24670321, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582290, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'Carton_gris': {'main_port_id': 24670302, 'sub_port_id': 24670322, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582291, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'Teint_Dans_La_Masse': {'main_port_id': 24670302, 'sub_port_id': 24670323, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582292, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'Carton_brun': {'main_port_id': 24670302, 'sub_port_id': 24670324, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582293, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'kraft': {'main_port_id': 24670302, 'sub_port_id': 24670325, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582294, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'metal': {'main_port_id': 24670302, 'sub_port_id': 24670326, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582295, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'mal_croppe': {'main_port_id': 24670302, 'sub_port_id': 24670327, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582296, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'flou': {'main_port_id': 24670302, 'sub_port_id': 24670328, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582297, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'autre_refus': {'main_port_id': 24670302, 'sub_port_id': 24670329, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582298, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}, 'plastique': {'main_port_id': 24670302, 'sub_port_id': 24670330, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16582299, 'last_updated_at': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 7, 9, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 7, 9, 19)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670319,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670307 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670320,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670308 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670321,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670309 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670322,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670310 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670323,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670311 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670324,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670312 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670325,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670313 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670326,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670314 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670327,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670315 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670328,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670316 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670329,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670317 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24670330,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24670318 lien utilise dans velours : https://www.fotonower.com/velours/24670319,24670320,24670321,24670322,24670323,24670324,24670325,24670326,24670327,24670328,24670329,24670330?tags=environnement,papier,cartonnette,Carton_gris,Teint_Dans_La_Masse,Carton_brun,kraft,metal,mal_croppe,flou,autre_refus,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24670302]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] map_info['map_portfolio_photo'] : {24670302: [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191]} final : False mtd_id 4302 list_pids : [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] Looping around the photos to save general results len do output : 1 /24670302. 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, '3244268') ('4302', '24670302', '1371000272', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000270', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000268', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000266', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000264', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000259', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000230', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000226', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000215', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000208', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000202', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000191', None, None, None, None, None, '3244268') 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, '24670302', "{'environnement': 24670307, 'papier': 24670308, 'cartonnette': 24670309, 'Carton_gris': 24670310, 'Teint_Dans_La_Masse': 24670311, 'Carton_brun': 24670312, 'kraft': 24670313, 'metal': 24670314, 'mal_croppe': 24670315, 'flou': 24670316, 'autre_refus': 24670317, 'plastique': 24670318}", None, None, None, None, '3244268'), ('4302', '24670302', '1371000272', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000270', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000268', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000266', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000264', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000259', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000230', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000226', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000215', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000208', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000202', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000191', None, None, None, None, None, '3244268')] time used for this insertion : 0.08470869064331055 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.0933167934417725 time spend to save output : 0.08499002456665039 total time spend for step 1 : 2.178306818008423 step2:final Mon Jul 7 09:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24670302) 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 24670302 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1371000230,1371000226,1371000215,1371000208,1371000202,1371000191,1371000272,1371000270,1371000268,1371000266,1371000264,1371000259); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24670302]) Inside saveOutput : final : False verbose : True original output for save of step final : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} new output for save of step final : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] map_info['map_portfolio_photo'] : {24670302: [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191]} final : False mtd_id 4302 list_pids : [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] Looping around the photos to save general results len do output : 12 /1371000272.Didn't retrieve data . /1371000270.Didn't retrieve data . /1371000268.Didn't retrieve data . /1371000266.Didn't retrieve data . /1371000264.Didn't retrieve data . /1371000259.Didn't retrieve data . /1371000230.Didn't retrieve data . /1371000226.Didn't retrieve data . /1371000215.Didn't retrieve data . /1371000208.Didn't retrieve data . /1371000202.Didn't retrieve data . /1371000191.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, '3244268') ('4302', '24670302', '1371000272', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000270', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000268', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000266', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000264', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000259', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000230', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000226', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000215', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000208', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000202', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000191', None, None, None, None, None, '3244268') 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', '24670302', '1371000272', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000270', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000268', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000266', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000264', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000259', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000230', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000226', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000215', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000208', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000202', '0.0', None, None, None, None, '3244268'), ('4302', '24670302', '1371000191', '0.0', None, None, None, None, '3244268')] time used for this insertion : 0.03722739219665527 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.013978004455566406 time spend to save output : 0.03778386116027832 total time spend for step 2 : 0.05176186561584473 step3:velours_tree Mon Jul 7 09:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {24670302: [{'environnement': 24670307, 'papier': 24670308, 'cartonnette': 24670309, 'Carton_gris': 24670310, 'Teint_Dans_La_Masse': 24670311, 'Carton_brun': 24670312, 'kraft': 24670313, 'metal': 24670314, 'mal_croppe': 24670315, 'flou': 24670316, 'autre_refus': 24670317, 'plastique': 24670318}]} input_args_next_step : {24670302: ()} output_args : {24670302: [{'environnement': 24670307, 'papier': 24670308, 'cartonnette': 24670309, 'Carton_gris': 24670310, 'Teint_Dans_La_Masse': 24670311, 'Carton_brun': 24670312, 'kraft': 24670313, 'metal': 24670314, 'mal_croppe': 24670315, 'flou': 24670316, 'autre_refus': 24670317, 'plastique': 24670318}]} args : 24670302 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 24670307, 'papier': 24670308, 'cartonnette': 24670309, 'Carton_gris': 24670310, 'Teint_Dans_La_Masse': 24670311, 'Carton_brun': 24670312, 'kraft': 24670313, 'metal': 24670314, 'mal_croppe': 24670315, 'flou': 24670316, 'autre_refus': 24670317, 'plastique': 24670318},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24670302) 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([24670302]) 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.3021063804626465 time spend to save output : 5.4836273193359375e-05 total time spend for step 3 : 0.30216121673583984 step4:send_mail_cod Mon Jul 7 09:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} input_args_next_step : {1371000272: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000272 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000270 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000268 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000266 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000264 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000259 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000230 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000226 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000215 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000208 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000202 depend.output_id : 0 input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ()} output_args : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',)} args : 1371000191 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 : {24670302: [{'environnement': 24670307, 'papier': 24670308, 'cartonnette': 24670309, 'Carton_gris': 24670310, 'Teint_Dans_La_Masse': 24670311, 'Carton_brun': 24670312, 'kraft': 24670313, 'metal': 24670314, 'mal_croppe': 24670315, 'flou': 24670316, 'autre_refus': 24670317, 'plastique': 24670318}]} input_args_next_step : {1371000272: ('0.0',), 1371000270: ('0.0',), 1371000268: ('0.0',), 1371000266: ('0.0',), 1371000264: ('0.0',), 1371000259: ('0.0',), 1371000230: ('0.0',), 1371000226: ('0.0',), 1371000215: ('0.0',), 1371000208: ('0.0',), 1371000202: ('0.0',), 1371000191: ('0.0',), 24670302: ()} output_args : {24670302: [{'environnement': 24670307, 'papier': 24670308, 'cartonnette': 24670309, 'Carton_gris': 24670310, 'Teint_Dans_La_Masse': 24670311, 'Carton_brun': 24670312, 'kraft': 24670313, 'metal': 24670314, 'mal_croppe': 24670315, 'flou': 24670316, 'autre_refus': 24670317, 'plastique': 24670318}]} args : 24670302 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 (24670302) 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 (1371000272,1371000270,1371000268,1371000266,1371000264,1371000259,1371000230,1371000226,1371000215,1371000208,1371000202,1371000191) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1371000191 begin to download photo : 1371000215 begin to download photo : 1371000259 begin to download photo : 1371000268 download finish for photo 1371000191 begin to download photo : 1371000202 download finish for photo 1371000215 begin to download photo : 1371000226 download finish for photo 1371000268 begin to download photo : 1371000270 download finish for photo 1371000259 begin to download photo : 1371000264 download finish for photo 1371000270 begin to download photo : 1371000272 download finish for photo 1371000202 begin to download photo : 1371000208 download finish for photo 1371000226 begin to download photo : 1371000230 download finish for photo 1371000264 begin to download photo : 1371000266 download finish for photo 1371000208 download finish for photo 1371000272 download finish for photo 1371000230 download finish for photo 1371000266 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette246703091751872741/ imagette246703131751872741/ imagette246703141751872741/ imagette246703151751872741/ imagette246703161751872741/ imagette246703171751872741/ imagette246703181751872741/ imagette246703101751872741/ imagette246703111751872741/ imagette246703121751872741/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24670302_07-07-2025_09_19_01.pdf 24670309 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=24670309 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703091751872741 24670313 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=24670313 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703131751872741 24670314 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=24670314 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703141751872741 24670315 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=24670315 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703151751872741 24670316 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=24670316 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703161751872741 24670317 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=24670317 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703171751872741 24670318 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=24670318 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703181751872741 24670310 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=24670310 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703101751872741 24670311 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=24670311 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703111751872741 24670312 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=24670312 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette246703121751872741 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24670302 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24670319,24670320,24670321,24670322,24670323,24670324,24670325,24670326,24670327,24670328,24670329,24670330?tags=environnement,papier,cartonnette,Carton_gris,Teint_Dans_La_Masse,Carton_brun,kraft,metal,mal_croppe,flou,autre_refus,plastique your option no_mail is active, we will not send the real mail to your client args[1371000272] : ('0.0',) no score found for photo 1371000272 We are sending mail with results at report@fotonower.com args[1371000270] : ('0.0',) no score found for photo 1371000270 We are sending mail with results at report@fotonower.com args[1371000268] : ('0.0',) no score found for photo 1371000268 We are sending mail with results at report@fotonower.com args[1371000266] : ('0.0',) no score found for photo 1371000266 We are sending mail with results at report@fotonower.com args[1371000264] : ('0.0',) no score found for photo 1371000264 We are sending mail with results at report@fotonower.com args[1371000259] : ('0.0',) no score found for photo 1371000259 We are sending mail with results at report@fotonower.com args[1371000230] : ('0.0',) no score found for photo 1371000230 We are sending mail with results at report@fotonower.com args[1371000226] : ('0.0',) no score found for photo 1371000226 We are sending mail with results at report@fotonower.com args[1371000215] : ('0.0',) no score found for photo 1371000215 We are sending mail with results at report@fotonower.com args[1371000208] : ('0.0',) no score found for photo 1371000208 We are sending mail with results at report@fotonower.com args[1371000202] : ('0.0',) no score found for photo 1371000202 We are sending mail with results at report@fotonower.com args[1371000191] : ('0.0',) no score found for photo 1371000191 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=24670302 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_P24670302_07-07-2025_09_19_01.pdf results_Auto_P24670302_07-07-2025_09_19_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24670302_07-07-2025_09_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','24670302','results_Auto_P24670302_07-07-2025_09_19_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24670302_07-07-2025_09_19_01.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24670302]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] map_info['map_portfolio_photo'] : {24670302: [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191]} final : False mtd_id 4302 list_pids : [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] 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, '3244268') ('4302', '24670302', '1371000272', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000270', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000268', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000266', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000264', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000259', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000230', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000226', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000215', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000208', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000202', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000191', None, None, None, None, None, '3244268') 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', '24670302', '1371000272', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000270', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000268', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000266', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000264', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000259', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000230', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000226', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000215', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000208', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000202', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000191', None, None, None, None, None, '3244268')] time used for this insertion : 0.049828290939331055 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.681229829788208 time spend to save output : 0.050060272216796875 total time spend for step 4 : 1.7312901020050049 step5:split_time_score Mon Jul 7 09:19:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24670302'] 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 : [('24670302',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24670302) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1371000191: {'path': 'temp/1751872740_3551360_1371000191_db905f3a2b1df04898af13efacc10b5d.jpg', 'extension': 'jpg'}, 1371000202: {'path': 'temp/1751872740_3551360_1371000202_e7ddbf909bec080509a3501283bce744.jpg', 'extension': 'jpg'}, 1371000208: {'path': 'temp/1751872740_3551360_1371000208_5687a7457e0ef77ee0ebe761c3a7b4fe.jpg', 'extension': 'jpg'}, 1371000268: {'path': 'temp/1751872740_3551360_1371000268_ec26af464db3f3bd1f2680e577aa81f4.jpg', 'extension': 'jpg'}, 1371000270: {'path': 'temp/1751872740_3551360_1371000270_11ff9ee61371ac0ce33563abc4869d0b.jpg', 'extension': 'jpg'}, 1371000272: {'path': 'temp/1751872740_3551360_1371000272_d45b3791829ce246eafa5045c2185163.jpg', 'extension': 'jpg'}, 1371000215: {'path': 'temp/1751872740_3551360_1371000215_436f284176beff469ea7e043a1dd5378.jpg', 'extension': 'jpg'}, 1371000226: {'path': 'temp/1751872740_3551360_1371000226_04a9a4acd63abdb8de00bf4f735ce01f.jpg', 'extension': 'jpg'}, 1371000230: {'path': 'temp/1751872740_3551360_1371000230_ac90731782d4c6d3c95d1d8dfc645a2d.jpg', 'extension': 'jpg'}, 1371000259: {'path': 'temp/1751872740_3551360_1371000259_8cfdc87921814f3913245fa2fff77657.jpg', 'extension': 'jpg'}, 1371000264: {'path': 'temp/1751872740_3551360_1371000264_47bae6c262cde21c4920cbea4ceedc2d.jpg', 'extension': 'jpg'}, 1371000266: {'path': 'temp/1751872740_3551360_1371000266_b73fb85ce8ba1b6b3f6730c2ca1989a6.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 = 24670302; (('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 = 24670302 group by h (('09', 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=24670302 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 (24670302) 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 (24670302) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 07072025 24670302 Nombre de photos uploadées : 12 / 23040 (0%) 07072025 24670302 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 07072025 24670302 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1371000230, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/ac90731782d4c6d3c95d1d8dfc645a2d.jpg', 'username': None, 'uploaded_at': 1751872564, 'text': 'image_07072025_09_15_04_10137.jpg'}, {'photo_id': 1371000226, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/04a9a4acd63abdb8de00bf4f735ce01f.jpg', 'username': None, 'uploaded_at': 1751872564, 'text': 'image_07072025_09_15_14_10137.jpg'}, {'photo_id': 1371000215, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/436f284176beff469ea7e043a1dd5378.jpg', 'username': None, 'uploaded_at': 1751872564, 'text': 'image_07072025_09_15_23_9124.jpg'}, {'photo_id': 1371000208, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/7/5687a7457e0ef77ee0ebe761c3a7b4fe.jpg', 'username': None, 'uploaded_at': 1751872564, 'text': 'image_07072025_09_15_34_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006053447723388672 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24670302, '2025-07-07' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1957078,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03009939193725586 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= 1957078 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1957078, 'dashboard_run_id': 1965200, 'mtr_portfolio_id': 24668575, 'dashboard_result_id': 12208303, '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_P24668575_07-07-2025_08_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24668580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24668581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24668582, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24668583, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24668584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24668585, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24668586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24668587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24668588, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24668589, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24668590, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24668591, 'pht': 3726}}"}, {'dashboat_entry_day': 1957078, 'dashboard_run_id': 1965200, 'mtr_portfolio_id': 24669145, 'dashboard_result_id': 12208304, '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_P24669145_07-07-2025_09_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24669148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24669149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24669150, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24669151, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24669152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24669153, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24669154, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24669155, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24669156, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24669157, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24669158, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24669159, 'pht': 3726}}"}, {'dashboat_entry_day': 1957078, 'dashboard_run_id': 1965200, 'mtr_portfolio_id': 24669610, 'dashboard_result_id': 12208305, '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_P24669610_07-07-2025_09_16_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24669665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24669666, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24669667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24669668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24669669, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24669670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24669671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24669672, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24669673, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24669674, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24669675, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24669676, 'pht': 3726}}"}, {'dashboat_entry_day': 1957078, 'dashboard_run_id': 1965200, 'mtr_portfolio_id': 24670302, 'dashboard_result_id': 12208306, '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 = 24668575 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': 3244060, 'mtr_portfolio_id': 24668575, 'created_at': datetime.datetime(2025, 7, 7, 8, 46, 59), 'result': '0.021158375268420196', 'result_long': None, 'result_double': None}] Qualite : 0.021158375268420196 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24668575 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24668575_07-07-2025_08_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24668575 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_P24668575_07-07-2025_08_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24668580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24668581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24668582, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24668583, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24668584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24668585, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24668586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24668587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24668588, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24668589, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24668590, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24668591, 'pht': 3726}}" where mtr_portfolio_id = 24668575 and dashboard_run_id = 1965200 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`=24668575 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12208303, 0.021158375268420196, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24668575_07-07-2025_08_47_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24668580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24668581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24668582, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24668583, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24668584, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24668585, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24668586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24668587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24668588, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24668589, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24668590, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24668591, '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 = 24669145 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': 3244135, 'mtr_portfolio_id': 24669145, 'created_at': datetime.datetime(2025, 7, 7, 9, 2, 59), 'result': '0.014148944608773537', 'result_long': None, 'result_double': None}] Qualite : 0.014148944608773537 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24669145 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24669145_07-07-2025_09_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24669145 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_P24669145_07-07-2025_09_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24669148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24669149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24669150, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24669151, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24669152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24669153, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24669154, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24669155, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24669156, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24669157, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24669158, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24669159, 'pht': 3726}}" where mtr_portfolio_id = 24669145 and dashboard_run_id = 1965200 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`=24669145 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12208304, 0.014148944608773537, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24669145_07-07-2025_09_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24669148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24669149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24669150, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24669151, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24669152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24669153, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24669154, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24669155, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24669156, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24669157, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24669158, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24669159, '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 = 24669610 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': 3244200, 'mtr_portfolio_id': 24669610, 'created_at': datetime.datetime(2025, 7, 7, 9, 16, 58), 'result': '0.016755775287521434', 'result_long': None, 'result_double': None}] Qualite : 0.016755775287521434 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24669610 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24669610_07-07-2025_09_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24669610 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_P24669610_07-07-2025_09_16_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24669665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24669666, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24669667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24669668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24669669, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24669670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24669671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24669672, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24669673, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24669674, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24669675, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24669676, 'pht': 3726}}" where mtr_portfolio_id = 24669610 and dashboard_run_id = 1965200 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`=24669610 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12208305, 0.016755775287521434, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24669610_07-07-2025_09_16_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24669665, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24669666, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24669667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24669668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24669669, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24669670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24669671, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24669672, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24669673, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24669674, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24669675, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24669676, '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 = 24670302 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 = 24670302 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 = 24670302 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24670302 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 = 24670302 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 = 24670302 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24670302_07-07-2025_09_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24670302 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_P24670302_07-07-2025_09_19_01.pdf'}" where mtr_portfolio_id = 24670302 and dashboard_run_id = 1965200 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24668575,24669145,24669610,24670302) result : ((1370995978,), (1370995982,), (1370995985,), (1370995990,), (1370995994,), (1370996002,), (1370996022,), (1370996025,), (1370996026,), (1370996027,), (1370996029,), (1370996032,), (1370996060,), (1370996062,), (1370996063,), (1370996065,), (1370996068,), (1370996071,), (1370996081,), (1370996085,), (1370996088,), (1370996091,), (1370996094,), (1370996098,), (1370996132,), (1370996147,), (1370996154,), (1370996169,), (1370996172,), (1370996188,), (1370996205,), (1370996215,), (1370996219,), (1370996221,), (1370996224,), (1370996228,), (1370996251,), (1370996256,), (1370996259,), (1370996261,), (1370996264,), (1370996266,), (1370996281,), (1370996285,), (1370996287,), (1370996288,), (1370996290,), (1370996311,), (1370996334,), (1370996338,), (1370996342,), (1370996344,), (1370996346,), (1370996349,), (1370996362,), (1370996367,), (1370996380,), (1370996383,), (1370996385,), (1370996389,), (1370996413,), (1370996418,), (1370996420,), (1370996421,), (1370996422,), (1370996424,), (1370996443,), (1370996446,), (1370996448,), (1370996460,), (1370996463,), (1370996466,), (1370996491,), (1370996496,), (1370996499,), (1370996502,), (1370996506,), (1370996509,), (1370996524,), (1370996527,), (1370996529,), (1370996530,), (1370996532,), (1370996534,), (1370996561,), (1370996564,), (1370996574,), (1370996580,), (1370996584,), (1370996588,), (1370996604,), (1370996615,), (1370996618,), (1370996621,), (1370996623,), (1370996636,), (1370996667,), (1370996672,), (1370996675,), (1370996676,), (1370996677,), (1370996678,), (1370996690,), (1370996696,), (1370996701,), (1370996704,), (1370996708,), (1370996713,), (1370996732,), (1370996735,), (1370996739,), (1370996742,), (1370996746,), (1370996749,), (1370996761,), (1370996766,), (1370996768,), (1370996779,), (1370996782,), (1370996785,), (1370996809,), (1370996821,), (1370996823,), (1370996826,), (1370996830,), (1370996834,), (1370996842,), (1370996846,), (1370996850,), (1370996853,), (1370996864,), (1370996867,), (1370996885,), (1370996896,), (1370996900,), (1370996904,), (1370996908,), (1370996913,), (1370996924,), (1370996925,), (1370996927,), (1370996930,), (1370996934,), (1370996939,), (1370996956,), (1370996961,), (1370996964,), (1370996975,), (1370996979,), (1370996983,), (1370996995,), (1370997006,), (1370997013,), (1370997014,), (1370997017,), (1370997020,), (1370997037,), (1370997039,), (1370997040,), (1370997042,), (1370997044,), (1370997047,), (1370997057,), (1370997068,), (1370997071,), (1370997075,), (1370997079,), (1370997082,), (1370997399,), (1370997432,), (1370997471,), (1370997505,), (1370997540,), (1370997585,), (1370997823,), (1370997856,), (1370997890,), (1370997924,), (1370997964,), (1370998188,), (1370998223,), (1370998275,), (1370998321,), (1370998325,), (1370998351,), (1370998444,), (1370998503,), (1370998547,), (1370998591,), (1370998639,), (1370998688,), (1370998855,), (1370998889,), (1370998924,), (1370998958,), (1370998992,), (1370999023,), (1370999241,), (1370999277,), (1370999296,), (1370999298,), (1370999300,), (1370999302,), (1370999312,), (1370999316,), (1370999347,), (1370999380,), (1370999414,), (1370999457,), (1370999648,), (1370999663,), (1370999682,), (1370999700,), (1370999726,), (1370999731,), (1370999753,), (1370999766,), (1370999776,), (1370999779,), (1370999792,), (1370999802,), (1370999874,), (1370999888,), (1370999893,), (1370999896,), (1370999899,), (1370999902,), (1370999930,), (1370999933,), (1370999939,), (1370999944,), (1370999948,), (1370999951,), (1370999958,), (1370999963,), (1370999967,), (1370999970,), (1370999974,), (1370999987,), (1371000005,), (1371000009,), (1371000011,), (1371000020,), (1371000021,), (1371000023,), (1371000050,), (1371000061,), (1371000064,), (1371000066,), (1371000069,), (1371000073,), (1371000088,), (1371000091,), (1371000093,), (1371000096,), (1371000099,), (1371000101,), (1371000127,), (1371000132,), (1371000135,), (1371000136,), (1371000137,), (1371000138,), (1371000160,), (1371000164,), (1371000168,), (1371000170,), (1371000173,), (1371000178,), (1371000191,), (1371000202,), (1371000208,), (1371000215,), (1371000226,), (1371000230,), (1371000259,), (1371000264,), (1371000266,), (1371000268,), (1371000270,), (1371000272,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'07072025': {'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([24670302]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] map_info['map_portfolio_photo'] : {24670302: [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191]} final : True mtd_id 4302 list_pids : [1371000272, 1371000270, 1371000268, 1371000266, 1371000264, 1371000259, 1371000230, 1371000226, 1371000215, 1371000208, 1371000202, 1371000191] Looping around the photos to save general results len do output : 1 /24670302Didn'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, '3244268') ('4302', '24670302', '1371000272', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000270', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000268', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000266', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000264', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000259', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000230', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000226', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000215', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000208', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000202', None, None, None, None, None, '3244268') ('4302', None, None, None, None, None, None, None, '3244268') ('4302', '24670302', '1371000191', None, None, None, None, None, '3244268') 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, '24670302', 'None', None, None, None, None, '3244268'), ('4302', '24670302', '1371000272', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000270', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000268', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000266', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000264', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000259', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000230', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000226', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000215', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000208', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000202', None, None, None, None, None, '3244268'), ('4302', '24670302', '1371000191', None, None, None, None, None, '3244268')] time used for this insertion : 0.0919952392578125 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3679032325744629 time spend to save output : 0.09220409393310547 total time spend for step 5 : 0.46010732650756836 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 (3244268) 1.98user 2.30system 0:06.95elapsed 61%CPU (0avgtext+0avgdata 159380maxresident)k 0inputs+5720outputs (1major+79017minor)pagefaults 0swaps