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 : 1308470 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 (3248715) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3248715) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708456 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3248715'] with mtr_portfolio_ids : ['24708456'] and first list_photo_ids : [] new path : /proc/1308470/ Name: python3 Umask: 0002 State: R (running) Tgid: 1308470 Ngid: 0 Pid: 1308470 PPid: 1308469 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1308470 NSpid: 1308470 NSpgid: 1307332 NSsid: 1307332 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100104 kB VmRSS: 100104 kB RssAnon: 59804 kB RssFile: 40300 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 588 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 46 nonvoluntary_ctxt_switches: 89 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1308470', 'Ngid': '0', 'Pid': '1308470', 'PPid': '1308469', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1308470', 'NSpid': '1308470', 'NSpgid': '1307332', 'NSsid': '1307332', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100104 kB', 'VmRSS': '100104 kB', 'RssAnon': '59804 kB', 'RssFile': '40300 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '588 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '46', 'nonvoluntary_ctxt_switches': '89'} ('datou_batch_current', '1308470', '1106868', '0', '1106868', '865620', '100104', b'', 'marlene', '3248715') 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 (24708456) 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 (3248715 ) ) 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 (24708456) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1371120233, 'portfolio_id': 24708456}, {'photo_id': 1371120231, 'portfolio_id': 24708456}, {'photo_id': 1371120229, 'portfolio_id': 24708456}, {'photo_id': 1371120226, 'portfolio_id': 24708456}, {'photo_id': 1371120222, 'portfolio_id': 24708456}, {'photo_id': 1371120217, 'portfolio_id': 24708456}, {'photo_id': 1371120187, 'portfolio_id': 24708456}, {'photo_id': 1371120184, 'portfolio_id': 24708456}, {'photo_id': 1371120181, 'portfolio_id': 24708456}, {'photo_id': 1371120178, 'portfolio_id': 24708456}, {'photo_id': 1371120173, 'portfolio_id': 24708456}, {'photo_id': 1371120168, 'portfolio_id': 24708456}] map_portfolio_id_photo_id: {24708456: [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168]} ##### 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.014948129653930664 #### 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 Tue Jul 8 03: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 (24708456) 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 : 24708456 get user id for portfolio 24708456 get sub ptf for main ptf 24708456, type 3726 and hashtags ['Carton_gris', 'environnement', 'Teint_Dans_La_Masse', 'metal', 'Carton_brun', 'autre_refus', 'plastique', 'papier', 'mal_croppe', 'cartonnette', 'flou', 'kraft'] 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`=24708456 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) 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`=24708456 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_3726_kraft_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)[[24708456, 24708484, 3726, 0.5, 2107753020, 979], [24708456, 24708485, 3726, 0.5, 493012381, 979], [24708456, 24708486, 3726, 0.5, 2107752385, 979], [24708456, 24708487, 3726, 0.5, 492628673, 979], [24708456, 24708488, 3726, 0.5, 2107753024, 979], [24708456, 24708489, 3726, 0.5, 2107752406, 979], [24708456, 24708490, 3726, 0.5, 492725882, 979], [24708456, 24708491, 3726, 0.5, 492668766, 979], [24708456, 24708492, 3726, 0.5, 2107755527, 979], [24708456, 24708493, 3726, 0.5, 702398920, 979], [24708456, 24708494, 3726, 0.5, 492777938, 979], [24708456, 24708495, 3726, 0.5, 493202403, 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`=24708456 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) 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`=24708456 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 24708456, 'sub_port_id': 24708484, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614567, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'environnement': {'main_port_id': 24708456, 'sub_port_id': 24708485, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614568, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 24708456, 'sub_port_id': 24708486, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614569, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'metal': {'main_port_id': 24708456, 'sub_port_id': 24708487, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614570, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'Carton_brun': {'main_port_id': 24708456, 'sub_port_id': 24708488, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614571, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'autre_refus': {'main_port_id': 24708456, 'sub_port_id': 24708489, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614572, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'plastique': {'main_port_id': 24708456, 'sub_port_id': 24708490, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614573, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'papier': {'main_port_id': 24708456, 'sub_port_id': 24708491, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614574, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'mal_croppe': {'main_port_id': 24708456, 'sub_port_id': 24708492, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614575, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'cartonnette': {'main_port_id': 24708456, 'sub_port_id': 24708493, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614576, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'flou': {'main_port_id': 24708456, 'sub_port_id': 24708494, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614577, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}, 'kraft': {'main_port_id': 24708456, 'sub_port_id': 24708495, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614578, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 18, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24708484 , 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=24708456 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 (24708484) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708485 , 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=24708456 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 (24708485) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708486 , 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=24708456 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 (24708486) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708487 , 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=24708456 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 (24708487) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708488 , 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=24708456 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 (24708488) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708489 , 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=24708456 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 (24708489) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708490 , 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=24708456 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 (24708490) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708491 , 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=24708456 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 (24708491) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708492 , 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=24708456 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 (24708492) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708493 , 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=24708456 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 (24708493) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708494 , 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=24708456 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 (24708494) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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 24708495 , 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=24708456 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 (24708495) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24708456) result : ((1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) 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`=24708456 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) 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`=24708456 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_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__08072025_03_15_04_010150_4417_kraft_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)[[24708456, 24708496, 4417, 0.5, 2107753020, 979], [24708456, 24708497, 4417, 0.5, 493012381, 979], [24708456, 24708498, 4417, 0.5, 2107752385, 979], [24708456, 24708499, 4417, 0.5, 492628673, 979], [24708456, 24708500, 4417, 0.5, 2107753024, 979], [24708456, 24708501, 4417, 0.5, 2107752406, 979], [24708456, 24708502, 4417, 0.5, 492725882, 979], [24708456, 24708503, 4417, 0.5, 492668766, 979], [24708456, 24708504, 4417, 0.5, 2107755527, 979], [24708456, 24708505, 4417, 0.5, 702398920, 979], [24708456, 24708506, 4417, 0.5, 492777938, 979], [24708456, 24708507, 4417, 0.5, 493202403, 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`=24708456 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) 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`=24708456 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','environnement','Teint_Dans_La_Masse','metal','Carton_brun','autre_refus','plastique','papier','mal_croppe','cartonnette','flou','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 24708456, 'sub_port_id': 24708496, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614579, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'environnement': {'main_port_id': 24708456, 'sub_port_id': 24708497, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614580, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'Teint_Dans_La_Masse': {'main_port_id': 24708456, 'sub_port_id': 24708498, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614581, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'metal': {'main_port_id': 24708456, 'sub_port_id': 24708499, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614582, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'Carton_brun': {'main_port_id': 24708456, 'sub_port_id': 24708500, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614583, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'autre_refus': {'main_port_id': 24708456, 'sub_port_id': 24708501, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614584, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'plastique': {'main_port_id': 24708456, 'sub_port_id': 24708502, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614585, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'papier': {'main_port_id': 24708456, 'sub_port_id': 24708503, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614586, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'mal_croppe': {'main_port_id': 24708456, 'sub_port_id': 24708504, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614587, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'cartonnette': {'main_port_id': 24708456, 'sub_port_id': 24708505, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614588, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'flou': {'main_port_id': 24708456, 'sub_port_id': 24708506, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614589, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}, 'kraft': {'main_port_id': 24708456, 'sub_port_id': 24708507, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16614590, 'last_updated_at': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_desc': datetime.datetime(2025, 7, 8, 3, 19), 'last_updated_at_asc': datetime.datetime(2025, 7, 8, 3, 19)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708496,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708484 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708497,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708485 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708498,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708486 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708499,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708487 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708500,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708488 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708501,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708489 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708502,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708490 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708503,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708491 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708504,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708492 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708505,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708493 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708506,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708494 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24708507,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24708495 lien utilise dans velours : https://www.fotonower.com/velours/24708496,24708497,24708498,24708499,24708500,24708501,24708502,24708503,24708504,24708505,24708506,24708507?tags=Carton_gris,environnement,Teint_Dans_La_Masse,metal,Carton_brun,autre_refus,plastique,papier,mal_croppe,cartonnette,flou,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24708456]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] map_info['map_portfolio_photo'] : {24708456: [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168]} final : False mtd_id 4302 list_pids : [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] Looping around the photos to save general results len do output : 1 /24708456. 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, '3248715') ('4302', '24708456', '1371120233', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120231', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120229', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120226', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120222', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120217', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120187', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120184', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120181', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120178', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120173', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120168', None, None, None, None, None, '3248715') 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, '24708456', "{'Carton_gris': 24708484, 'environnement': 24708485, 'Teint_Dans_La_Masse': 24708486, 'metal': 24708487, 'Carton_brun': 24708488, 'autre_refus': 24708489, 'plastique': 24708490, 'papier': 24708491, 'mal_croppe': 24708492, 'cartonnette': 24708493, 'flou': 24708494, 'kraft': 24708495}", None, None, None, None, '3248715'), ('4302', '24708456', '1371120233', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120231', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120229', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120226', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120222', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120217', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120187', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120184', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120181', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120178', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120173', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120168', None, None, None, None, None, '3248715')] time used for this insertion : 0.016678810119628906 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1247668266296387 time spend to save output : 0.016950607299804688 total time spend for step 1 : 2.1417174339294434 step2:final Tue Jul 8 03: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 (24708456) 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 24708456 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1371120187,1371120184,1371120181,1371120178,1371120173,1371120168,1371120233,1371120231,1371120229,1371120226,1371120222,1371120217); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24708456]) Inside saveOutput : final : False verbose : True original output for save of step final : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} new output for save of step final : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] map_info['map_portfolio_photo'] : {24708456: [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168]} final : False mtd_id 4302 list_pids : [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] Looping around the photos to save general results len do output : 12 /1371120233.Didn't retrieve data . /1371120231.Didn't retrieve data . /1371120229.Didn't retrieve data . /1371120226.Didn't retrieve data . /1371120222.Didn't retrieve data . /1371120217.Didn't retrieve data . /1371120187.Didn't retrieve data . /1371120184.Didn't retrieve data . /1371120181.Didn't retrieve data . /1371120178.Didn't retrieve data . /1371120173.Didn't retrieve data . /1371120168.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, '3248715') ('4302', '24708456', '1371120233', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120231', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120229', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120226', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120222', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120217', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120187', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120184', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120181', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120178', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120173', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120168', None, None, None, None, None, '3248715') 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', '24708456', '1371120233', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120231', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120229', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120226', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120222', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120217', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120187', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120184', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120181', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120178', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120173', '0.0', None, None, None, None, '3248715'), ('4302', '24708456', '1371120168', '0.0', None, None, None, None, '3248715')] time used for this insertion : 0.013693571090698242 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.013427734375 time spend to save output : 0.014252662658691406 total time spend for step 2 : 0.027680397033691406 step3:velours_tree Tue Jul 8 03: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 : {24708456: [{'Carton_gris': 24708484, 'environnement': 24708485, 'Teint_Dans_La_Masse': 24708486, 'metal': 24708487, 'Carton_brun': 24708488, 'autre_refus': 24708489, 'plastique': 24708490, 'papier': 24708491, 'mal_croppe': 24708492, 'cartonnette': 24708493, 'flou': 24708494, 'kraft': 24708495}]} input_args_next_step : {24708456: ()} output_args : {24708456: [{'Carton_gris': 24708484, 'environnement': 24708485, 'Teint_Dans_La_Masse': 24708486, 'metal': 24708487, 'Carton_brun': 24708488, 'autre_refus': 24708489, 'plastique': 24708490, 'papier': 24708491, 'mal_croppe': 24708492, 'cartonnette': 24708493, 'flou': 24708494, 'kraft': 24708495}]} args : 24708456 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_gris': 24708484, 'environnement': 24708485, 'Teint_Dans_La_Masse': 24708486, 'metal': 24708487, 'Carton_brun': 24708488, 'autre_refus': 24708489, 'plastique': 24708490, 'papier': 24708491, 'mal_croppe': 24708492, 'cartonnette': 24708493, 'flou': 24708494, 'kraft': 24708495},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24708456) 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([24708456]) 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.3413503170013428 time spend to save output : 4.1484832763671875e-05 total time spend for step 3 : 0.34139180183410645 step4:send_mail_cod Tue Jul 8 03:19:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} input_args_next_step : {1371120233: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120233 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120231 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120229 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120226 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120222 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120217 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120187 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120184 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120181 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120178 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120173 depend.output_id : 0 input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ()} output_args : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',)} args : 1371120168 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 : {24708456: [{'Carton_gris': 24708484, 'environnement': 24708485, 'Teint_Dans_La_Masse': 24708486, 'metal': 24708487, 'Carton_brun': 24708488, 'autre_refus': 24708489, 'plastique': 24708490, 'papier': 24708491, 'mal_croppe': 24708492, 'cartonnette': 24708493, 'flou': 24708494, 'kraft': 24708495}]} input_args_next_step : {1371120233: ('0.0',), 1371120231: ('0.0',), 1371120229: ('0.0',), 1371120226: ('0.0',), 1371120222: ('0.0',), 1371120217: ('0.0',), 1371120187: ('0.0',), 1371120184: ('0.0',), 1371120181: ('0.0',), 1371120178: ('0.0',), 1371120173: ('0.0',), 1371120168: ('0.0',), 24708456: ()} output_args : {24708456: [{'Carton_gris': 24708484, 'environnement': 24708485, 'Teint_Dans_La_Masse': 24708486, 'metal': 24708487, 'Carton_brun': 24708488, 'autre_refus': 24708489, 'plastique': 24708490, 'papier': 24708491, 'mal_croppe': 24708492, 'cartonnette': 24708493, 'flou': 24708494, 'kraft': 24708495}]} args : 24708456 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 (24708456) 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 (1371120233,1371120231,1371120229,1371120226,1371120222,1371120217,1371120187,1371120184,1371120181,1371120178,1371120173,1371120168) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1371120168 begin to download photo : 1371120181 begin to download photo : 1371120217 begin to download photo : 1371120229 download finish for photo 1371120229 begin to download photo : 1371120231 download finish for photo 1371120168 begin to download photo : 1371120173 download finish for photo 1371120181 begin to download photo : 1371120184 download finish for photo 1371120217 begin to download photo : 1371120222 download finish for photo 1371120231 begin to download photo : 1371120233 download finish for photo 1371120222 begin to download photo : 1371120226 download finish for photo 1371120184 begin to download photo : 1371120187 download finish for photo 1371120173 begin to download photo : 1371120178 download finish for photo 1371120233 download finish for photo 1371120226 download finish for photo 1371120187 download finish for photo 1371120178 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette247084871751937541/ imagette247084891751937541/ imagette247084901751937541/ imagette247084921751937541/ imagette247084931751937541/ imagette247084941751937541/ imagette247084951751937541/ imagette247084841751937541/ imagette247084861751937541/ imagette247084881751937541/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24708456_08-07-2025_03_19_01.pdf 24708487 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=24708487 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084871751937541 24708489 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=24708489 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084891751937541 24708490 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=24708490 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084901751937541 24708492 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=24708492 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084921751937541 24708493 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=24708493 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084931751937541 24708494 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=24708494 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084941751937541 24708495 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=24708495 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084951751937541 24708484 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=24708484 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084841751937541 24708486 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=24708486 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084861751937541 24708488 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=24708488 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247084881751937541 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24708456 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24708496,24708497,24708498,24708499,24708500,24708501,24708502,24708503,24708504,24708505,24708506,24708507?tags=Carton_gris,environnement,Teint_Dans_La_Masse,metal,Carton_brun,autre_refus,plastique,papier,mal_croppe,cartonnette,flou,kraft your option no_mail is active, we will not send the real mail to your client args[1371120233] : ('0.0',) no score found for photo 1371120233 We are sending mail with results at report@fotonower.com args[1371120231] : ('0.0',) no score found for photo 1371120231 We are sending mail with results at report@fotonower.com args[1371120229] : ('0.0',) no score found for photo 1371120229 We are sending mail with results at report@fotonower.com args[1371120226] : ('0.0',) no score found for photo 1371120226 We are sending mail with results at report@fotonower.com args[1371120222] : ('0.0',) no score found for photo 1371120222 We are sending mail with results at report@fotonower.com args[1371120217] : ('0.0',) no score found for photo 1371120217 We are sending mail with results at report@fotonower.com args[1371120187] : ('0.0',) no score found for photo 1371120187 We are sending mail with results at report@fotonower.com args[1371120184] : ('0.0',) no score found for photo 1371120184 We are sending mail with results at report@fotonower.com args[1371120181] : ('0.0',) no score found for photo 1371120181 We are sending mail with results at report@fotonower.com args[1371120178] : ('0.0',) no score found for photo 1371120178 We are sending mail with results at report@fotonower.com args[1371120173] : ('0.0',) no score found for photo 1371120173 We are sending mail with results at report@fotonower.com args[1371120168] : ('0.0',) no score found for photo 1371120168 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=24708456 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_P24708456_08-07-2025_03_19_01.pdf results_Auto_P24708456_08-07-2025_03_19_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24708456_08-07-2025_03_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','24708456','results_Auto_P24708456_08-07-2025_03_19_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24708456_08-07-2025_03_19_01.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24708456]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] map_info['map_portfolio_photo'] : {24708456: [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168]} final : False mtd_id 4302 list_pids : [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] 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, '3248715') ('4302', '24708456', '1371120233', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120231', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120229', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120226', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120222', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120217', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120187', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120184', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120181', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120178', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120173', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120168', None, None, None, None, None, '3248715') 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', '24708456', '1371120233', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120231', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120229', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120226', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120222', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120217', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120187', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120184', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120181', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120178', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120173', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120168', None, None, None, None, None, '3248715')] time used for this insertion : 0.01691579818725586 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5124049186706543 time spend to save output : 0.017130136489868164 total time spend for step 4 : 1.5295350551605225 step5:split_time_score Tue Jul 8 03: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 : ['24708456'] 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 : [('24708456',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24708456) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1371120229: {'path': 'temp/1751937541_1308470_1371120229_7d1d8f1ddc3f0502f5fd92a7f4b6439a.jpg', 'extension': 'jpg'}, 1371120231: {'path': 'temp/1751937541_1308470_1371120231_3fd7d9d7188acae9d48e867fd58e28d0.jpg', 'extension': 'jpg'}, 1371120233: {'path': 'temp/1751937541_1308470_1371120233_d7c5a091f5d2d0f6b701a0448657d0af.jpg', 'extension': 'jpg'}, 1371120217: {'path': 'temp/1751937541_1308470_1371120217_5d5aaae34e6a6d7be622937dce6192da.jpg', 'extension': 'jpg'}, 1371120222: {'path': 'temp/1751937541_1308470_1371120222_083aff8000c827dc0a864e3ce0ed3459.jpg', 'extension': 'jpg'}, 1371120226: {'path': 'temp/1751937541_1308470_1371120226_1197387572722442b062af2b186a6aff.jpg', 'extension': 'jpg'}, 1371120181: {'path': 'temp/1751937541_1308470_1371120181_45bd9c1c20e0fdbafd78ba3466e877bb.jpg', 'extension': 'jpg'}, 1371120184: {'path': 'temp/1751937541_1308470_1371120184_55dbd0ee488e65d47f7822d038165e89.jpg', 'extension': 'jpg'}, 1371120187: {'path': 'temp/1751937541_1308470_1371120187_7dd2e6495b5a5bcbb750ccc9a0014de5.jpg', 'extension': 'jpg'}, 1371120168: {'path': 'temp/1751937541_1308470_1371120168_2e1065dffa41236ba77cc00116cbe24e.jpg', 'extension': 'jpg'}, 1371120173: {'path': 'temp/1751937541_1308470_1371120173_c93c9dc07fefa3b9c688b9d0abb3c977.jpg', 'extension': 'jpg'}, 1371120178: {'path': 'temp/1751937541_1308470_1371120178_0d4931242697c9e2a159beb80328180e.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 = 24708456; (('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 = 24708456 group by h (('03', 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=24708456 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 (24708456) 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 (24708456) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 08072025 24708456 Nombre de photos uploadées : 12 / 23040 (0%) 08072025 24708456 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 08072025 24708456 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1371120187, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/8/7dd2e6495b5a5bcbb750ccc9a0014de5.jpg', 'username': None, 'uploaded_at': 1751937364, 'text': 'image_08072025_03_15_04_10150.jpg'}, {'photo_id': 1371120184, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/8/55dbd0ee488e65d47f7822d038165e89.jpg', 'username': None, 'uploaded_at': 1751937364, 'text': 'image_08072025_03_15_14_10137.jpg'}, {'photo_id': 1371120181, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/8/45bd9c1c20e0fdbafd78ba3466e877bb.jpg', 'username': None, 'uploaded_at': 1751937364, 'text': 'image_08072025_03_15_24_10136.jpg'}, {'photo_id': 1371120178, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/8/0d4931242697c9e2a159beb80328180e.jpg', 'username': None, 'uploaded_at': 1751937364, 'text': 'image_08072025_03_15_34_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 4.5299530029296875e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005807876586914062 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24708456, '2025-07-08' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1960361,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02843332290649414 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= 1960361 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1960361, 'dashboard_run_id': 1968222, 'mtr_portfolio_id': 24707037, 'dashboard_result_id': 12261176, '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_P24707037_08-07-2025_02_46_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707064, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24707066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707067, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707068, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707069, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707070, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707071, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707073, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707074, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707075, 'pht': 3726}}"}, {'dashboat_entry_day': 1960361, 'dashboard_run_id': 1968222, 'mtr_portfolio_id': 24707471, 'dashboard_result_id': 12261177, '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_P24707471_08-07-2025_03_03_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24707485, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707486, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707487, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707488, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707489, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707492, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707494, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707496, 'pht': 3726}}"}, {'dashboat_entry_day': 1960361, 'dashboard_run_id': 1968222, 'mtr_portfolio_id': 24707886, 'dashboard_result_id': 12261178, '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_P24707886_08-07-2025_03_16_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707915, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707917, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707918, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707919, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707920, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707921, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707922, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707924, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24707925, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707926, 'pht': 3726}}"}, {'dashboat_entry_day': 1960361, 'dashboard_run_id': 1968222, 'mtr_portfolio_id': 24708456, 'dashboard_result_id': 12261179, '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 = 24707037 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': 3248565, 'mtr_portfolio_id': 24707037, 'created_at': datetime.datetime(2025, 7, 8, 2, 46, 28), 'result': '0.0514299607126689', 'result_long': None, 'result_double': None}] Qualite : 0.0514299607126689 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24707037 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24707037_08-07-2025_02_46_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24707037 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_P24707037_08-07-2025_02_46_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707064, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24707066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707067, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707068, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707069, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707070, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707071, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707073, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707074, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707075, 'pht': 3726}}" where mtr_portfolio_id = 24707037 and dashboard_run_id = 1968222 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`=24707037 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12261176, 0.0514299607126689, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24707037_08-07-2025_02_46_29.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707064, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24707066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707067, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707068, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707069, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707070, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707071, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707072, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707073, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707074, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707075, '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 = 24707471 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': 3248606, 'mtr_portfolio_id': 24707471, 'created_at': datetime.datetime(2025, 7, 8, 3, 3, 28), 'result': '0.0460695503295449', 'result_long': None, 'result_double': None}] Qualite : 0.0460695503295449 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24707471 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24707471_08-07-2025_03_03_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24707471 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_P24707471_08-07-2025_03_03_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24707485, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707486, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707487, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707488, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707489, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707492, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707494, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707496, 'pht': 3726}}" where mtr_portfolio_id = 24707471 and dashboard_run_id = 1968222 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`=24707471 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12261177, 0.0460695503295449, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24707471_08-07-2025_03_03_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24707485, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707486, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707487, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707488, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707489, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707491, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707492, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707494, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707495, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707496, '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 = 24707886 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': 3248664, 'mtr_portfolio_id': 24707886, 'created_at': datetime.datetime(2025, 7, 8, 3, 16, 58), 'result': '0.037421865257762185', 'result_long': None, 'result_double': None}] Qualite : 0.037421865257762185 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24707886 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24707886_08-07-2025_03_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24707886 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_P24707886_08-07-2025_03_16_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707915, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707917, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707918, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707919, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707920, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707921, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707922, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707924, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24707925, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707926, 'pht': 3726}}" where mtr_portfolio_id = 24707886 and dashboard_run_id = 1968222 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`=24707886 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12261178, 0.037421865257762185, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24707886_08-07-2025_03_16_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24707915, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24707916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24707917, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24707918, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24707919, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24707920, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24707921, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24707922, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24707923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24707924, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24707925, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24707926, '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 = 24708456 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 = 24708456 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 = 24708456 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24708456 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 = 24708456 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 = 24708456 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24708456_08-07-2025_03_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24708456 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_P24708456_08-07-2025_03_19_01.pdf'}" where mtr_portfolio_id = 24708456 and dashboard_run_id = 1968222 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24707037,24707471,24707886,24708456) result : ((1371115989,), (1371115993,), (1371115996,), (1371116000,), (1371116003,), (1371116005,), (1371116017,), (1371116025,), (1371116029,), (1371116032,), (1371116034,), (1371116035,), (1371116053,), (1371116057,), (1371116061,), (1371116063,), (1371116065,), (1371116066,), (1371116077,), (1371116082,), (1371116087,), (1371116091,), (1371116093,), (1371116094,), (1371116101,), (1371116105,), (1371116109,), (1371116113,), (1371116115,), (1371116117,), (1371116129,), (1371116132,), (1371116134,), (1371116137,), (1371116140,), (1371116142,), (1371116160,), (1371116163,), (1371116165,), (1371116169,), (1371116172,), (1371116174,), (1371116193,), (1371116198,), (1371116200,), (1371116203,), (1371116205,), (1371116206,), (1371116212,), (1371116216,), (1371116220,), (1371116225,), (1371116228,), (1371116229,), (1371116240,), (1371116244,), (1371116248,), (1371116251,), (1371116253,), (1371116254,), (1371116286,), (1371116290,), (1371116293,), (1371116296,), (1371116298,), (1371116299,), (1371116305,), (1371116308,), (1371116319,), (1371116323,), (1371116325,), (1371116326,), (1371116342,), (1371116346,), (1371116349,), (1371116352,), (1371116354,), (1371116356,), (1371116366,), (1371116371,), (1371116373,), (1371116375,), (1371116377,), (1371116378,), (1371116405,), (1371116410,), (1371116414,), (1371116417,), (1371116419,), (1371116421,), (1371116437,), (1371116444,), (1371116450,), (1371116453,), (1371116455,), (1371116456,), (1371116464,), (1371116468,), (1371116471,), (1371116474,), (1371116476,), (1371116477,), (1371116487,), (1371116490,), (1371116493,), (1371116496,), (1371116498,), (1371116499,), (1371116520,), (1371116525,), (1371116528,), (1371116531,), (1371116533,), (1371116534,), (1371116551,), (1371116557,), (1371116560,), (1371116563,), (1371116565,), (1371116566,), (1371116596,), (1371116600,), (1371116603,), (1371116607,), (1371116609,), (1371116610,), (1371116624,), (1371116632,), (1371116634,), (1371116636,), (1371116638,), (1371116640,), (1371116653,), (1371116656,), (1371116660,), (1371116663,), (1371116665,), (1371116666,), (1371116677,), (1371116681,), (1371116683,), (1371116685,), (1371116688,), (1371116690,), (1371116697,), (1371116699,), (1371116702,), (1371116704,), (1371116706,), (1371116709,), (1371116717,), (1371116721,), (1371116724,), (1371116726,), (1371116729,), (1371116731,), (1371116747,), (1371116750,), (1371116753,), (1371116755,), (1371116758,), (1371116760,), (1371116835,), (1371116878,), (1371116915,), (1371116949,), (1371116983,), (1371117016,), (1371117526,), (1371117562,), (1371117600,), (1371117638,), (1371117676,), (1371117710,), (1371117976,), (1371118016,), (1371118052,), (1371118089,), (1371118127,), (1371118432,), (1371118475,), (1371118510,), (1371118545,), (1371118582,), (1371118633,), (1371119054,), (1371119090,), (1371119148,), (1371119219,), (1371119266,), (1371119318,), (1371119429,), (1371119433,), (1371119438,), (1371119442,), (1371119448,), (1371119481,), (1371119661,), (1371119687,), (1371119690,), (1371119724,), (1371119732,), (1371119734,), (1371119757,), (1371119759,), (1371119761,), (1371119765,), (1371119768,), (1371119771,), (1371119785,), (1371119789,), (1371119794,), (1371119798,), (1371119801,), (1371119802,), (1371119822,), (1371119829,), (1371119835,), (1371119839,), (1371119843,), (1371119844,), (1371119865,), (1371119869,), (1371119872,), (1371119875,), (1371119877,), (1371119880,), (1371119898,), (1371119900,), (1371119902,), (1371119904,), (1371119907,), (1371119910,), (1371119961,), (1371119965,), (1371119967,), (1371119970,), (1371119974,), (1371119975,), (1371119992,), (1371119996,), (1371119999,), (1371120001,), (1371120004,), (1371120006,), (1371120031,), (1371120034,), (1371120037,), (1371120040,), (1371120044,), (1371120047,), (1371120077,), (1371120080,), (1371120082,), (1371120084,), (1371120087,), (1371120089,), (1371120124,), (1371120128,), (1371120132,), (1371120133,), (1371120141,), (1371120142,), (1371120168,), (1371120173,), (1371120178,), (1371120181,), (1371120184,), (1371120187,), (1371120217,), (1371120222,), (1371120226,), (1371120229,), (1371120231,), (1371120233,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'08072025': {'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([24708456]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] map_info['map_portfolio_photo'] : {24708456: [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168]} final : True mtd_id 4302 list_pids : [1371120233, 1371120231, 1371120229, 1371120226, 1371120222, 1371120217, 1371120187, 1371120184, 1371120181, 1371120178, 1371120173, 1371120168] Looping around the photos to save general results len do output : 1 /24708456Didn'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, '3248715') ('4302', '24708456', '1371120233', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120231', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120229', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120226', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120222', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120217', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120187', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120184', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120181', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120178', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120173', None, None, None, None, None, '3248715') ('4302', None, None, None, None, None, None, None, '3248715') ('4302', '24708456', '1371120168', None, None, None, None, None, '3248715') 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, '24708456', 'None', None, None, None, None, '3248715'), ('4302', '24708456', '1371120233', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120231', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120229', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120226', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120222', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120217', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120187', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120184', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120181', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120178', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120173', None, None, None, None, None, '3248715'), ('4302', '24708456', '1371120168', None, None, None, None, None, '3248715')] time used for this insertion : 0.01581597328186035 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.300095796585083 time spend to save output : 0.016063690185546875 total time spend for step 5 : 0.3161594867706299 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 (3248715) 1.92user 2.25system 0:07.58elapsed 55%CPU (0avgtext+0avgdata 161184maxresident)k 72inputs+6968outputs (1major+64434minor)pagefaults 0swaps