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 : 3880447 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 (3838687) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3838687) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502478 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3838687'] with mtr_portfolio_ids : ['27502478'] and first list_photo_ids : [] new path : /proc/3880447/ Name: python3 Umask: 0002 State: R (running) Tgid: 3880447 Ngid: 0 Pid: 3880447 PPid: 3880445 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3880447 NSpid: 3880447 NSpgid: 3880041 NSsid: 3880041 VmPeak: 1106856 kB VmSize: 1106856 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98396 kB VmRSS: 98396 kB RssAnon: 59848 kB RssFile: 38548 kB RssShmem: 0 kB VmData: 865608 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 556 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 49 nonvoluntary_ctxt_switches: 118 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3880447', 'Ngid': '0', 'Pid': '3880447', 'PPid': '3880445', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3880447', 'NSpid': '3880447', 'NSpgid': '3880041', 'NSsid': '3880041', 'VmPeak': '1106856 kB', 'VmSize': '1106856 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98396 kB', 'VmRSS': '98396 kB', 'RssAnon': '59848 kB', 'RssFile': '38548 kB', 'RssShmem': '0 kB', 'VmData': '865608 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '556 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '49', 'nonvoluntary_ctxt_switches': '118'} ('datou_batch_current', '3880447', '1106856', '0', '1106856', '865608', '98396', b'', 'marlene', '3838687') 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_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27502478) 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 (3838687 ) ) 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 (27502478) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1387685770, 'portfolio_id': 27502478}, {'photo_id': 1387685768, 'portfolio_id': 27502478}, {'photo_id': 1387685766, 'portfolio_id': 27502478}, {'photo_id': 1387685744, 'portfolio_id': 27502478}, {'photo_id': 1387685735, 'portfolio_id': 27502478}, {'photo_id': 1387685726, 'portfolio_id': 27502478}, {'photo_id': 1387685706, 'portfolio_id': 27502478}, {'photo_id': 1387685688, 'portfolio_id': 27502478}, {'photo_id': 1387685667, 'portfolio_id': 27502478}, {'photo_id': 1387685664, 'portfolio_id': 27502478}, {'photo_id': 1387685662, 'portfolio_id': 27502478}, {'photo_id': 1387685661, 'portfolio_id': 27502478}, {'photo_id': 1387685660, 'portfolio_id': 27502478}] map_portfolio_id_photo_id: {27502478: [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660]} ##### 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.0513758659362793 #### 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 Fri Oct 3 20:35:28 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 (27502478) 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 : 27502478 get user id for portfolio 27502478 get sub ptf for main ptf 27502478, type 3726 and hashtags ['Carton_gris', 'metal', 'flou', 'plastique', 'mal_croppe', 'Teint_Dans_La_Masse', 'papier', 'kraft', 'autre_refus', 'environnement', 'Carton_brun', 'cartonnette'] 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`=27502478 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) 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`=27502478 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_3726_cartonnette_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)[[27502478, 27502490, 3726, 0.5, 2107753020, 979], [27502478, 27502491, 3726, 0.5, 492628673, 979], [27502478, 27502492, 3726, 0.5, 492777938, 979], [27502478, 27502493, 3726, 0.5, 492725882, 979], [27502478, 27502494, 3726, 0.5, 2107755527, 979], [27502478, 27502495, 3726, 0.5, 2107752385, 979], [27502478, 27502496, 3726, 0.5, 492668766, 979], [27502478, 27502497, 3726, 0.5, 493202403, 979], [27502478, 27502498, 3726, 0.5, 2107752406, 979], [27502478, 27502499, 3726, 0.5, 493012381, 979], [27502478, 27502509, 3726, 0.5, 2107753024, 979], [27502478, 27502513, 3726, 0.5, 702398920, 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`=27502478 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) 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`=27502478 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 27502478, 'sub_port_id': 27502490, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584845, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'metal': {'main_port_id': 27502478, 'sub_port_id': 27502491, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584846, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'flou': {'main_port_id': 27502478, 'sub_port_id': 27502492, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584847, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'plastique': {'main_port_id': 27502478, 'sub_port_id': 27502493, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584848, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'mal_croppe': {'main_port_id': 27502478, 'sub_port_id': 27502494, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584849, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 27502478, 'sub_port_id': 27502495, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584850, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'papier': {'main_port_id': 27502478, 'sub_port_id': 27502496, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584851, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'kraft': {'main_port_id': 27502478, 'sub_port_id': 27502497, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584852, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'autre_refus': {'main_port_id': 27502478, 'sub_port_id': 27502498, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584853, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'environnement': {'main_port_id': 27502478, 'sub_port_id': 27502499, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584854, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'Carton_brun': {'main_port_id': 27502478, 'sub_port_id': 27502509, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584855, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}, 'cartonnette': {'main_port_id': 27502478, 'sub_port_id': 27502513, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584856, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27502490 , 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=27502478 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 (27502490) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502491 , 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=27502478 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 (27502491) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502492 , 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=27502478 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 (27502492) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502493 , 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=27502478 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 (27502493) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502494 , 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=27502478 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 (27502494) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502495 , 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=27502478 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 (27502495) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502496 , 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=27502478 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 (27502496) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502497 , 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=27502478 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 (27502497) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502498 , 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=27502478 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 (27502498) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502499 , 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=27502478 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 (27502499) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502509 , 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=27502478 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 (27502509) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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 27502513 , 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=27502478 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 (27502513) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27502478) result : ((1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) 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`=27502478 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) 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`=27502478 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_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__03102025_20_31_03_010146_4417_cartonnette_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)[[27502478, 27502527, 4417, 0.5, 2107753020, 979], [27502478, 27502528, 4417, 0.5, 492628673, 979], [27502478, 27502529, 4417, 0.5, 492777938, 979], [27502478, 27502530, 4417, 0.5, 492725882, 979], [27502478, 27502531, 4417, 0.5, 2107755527, 979], [27502478, 27502532, 4417, 0.5, 2107752385, 979], [27502478, 27502533, 4417, 0.5, 492668766, 979], [27502478, 27502534, 4417, 0.5, 493202403, 979], [27502478, 27502536, 4417, 0.5, 2107752406, 979], [27502478, 27502537, 4417, 0.5, 493012381, 979], [27502478, 27502538, 4417, 0.5, 2107753024, 979], [27502478, 27502539, 4417, 0.5, 702398920, 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`=27502478 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) 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`=27502478 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','flou','plastique','mal_croppe','Teint_Dans_La_Masse','papier','kraft','autre_refus','environnement','Carton_brun','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 27502478, 'sub_port_id': 27502527, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584869, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'metal': {'main_port_id': 27502478, 'sub_port_id': 27502528, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584870, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'flou': {'main_port_id': 27502478, 'sub_port_id': 27502529, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584871, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'plastique': {'main_port_id': 27502478, 'sub_port_id': 27502530, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584872, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'mal_croppe': {'main_port_id': 27502478, 'sub_port_id': 27502531, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584873, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 27502478, 'sub_port_id': 27502532, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584874, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'papier': {'main_port_id': 27502478, 'sub_port_id': 27502533, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584875, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'kraft': {'main_port_id': 27502478, 'sub_port_id': 27502534, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584876, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'autre_refus': {'main_port_id': 27502478, 'sub_port_id': 27502536, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584877, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'environnement': {'main_port_id': 27502478, 'sub_port_id': 27502537, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584878, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'Carton_brun': {'main_port_id': 27502478, 'sub_port_id': 27502538, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584879, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}, 'cartonnette': {'main_port_id': 27502478, 'sub_port_id': 27502539, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18584880, 'last_updated_at': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 20, 35, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 20, 35, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502527,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502490 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502528,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502491 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502529,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502492 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502530,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502493 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502531,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502494 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502532,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502495 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502533,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502496 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502534,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502497 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502536,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502498 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502537,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502499 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502538,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502509 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27502539,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27502513 lien utilise dans velours : https://marlene.fotonower.com/velours/27502527,27502528,27502529,27502530,27502531,27502532,27502533,27502534,27502536,27502537,27502538,27502539?tags=Carton_gris,metal,flou,plastique,mal_croppe,Teint_Dans_La_Masse,papier,kraft,autre_refus,environnement,Carton_brun,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27502478]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] map_info['map_portfolio_photo'] : {27502478: [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660]} final : False mtd_id 4302 list_pids : [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] Looping around the photos to save general results len do output : 1 /27502478. 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, '3838687') ('4302', '27502478', '1387685770', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685768', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685766', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685744', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685735', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685726', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685706', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685688', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685667', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685664', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685662', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685661', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685660', None, None, None, None, None, '3838687') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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, '27502478', "{'Carton_gris': 27502490, 'metal': 27502491, 'flou': 27502492, 'plastique': 27502493, 'mal_croppe': 27502494, 'Teint_Dans_La_Masse': 27502495, 'papier': 27502496, 'kraft': 27502497, 'autre_refus': 27502498, 'environnement': 27502499, 'Carton_brun': 27502509, 'cartonnette': 27502513}", None, None, None, None, '3838687'), ('4302', '27502478', '1387685770', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685768', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685766', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685744', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685735', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685726', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685706', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685688', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685667', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685664', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685662', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685661', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685660', None, None, None, None, None, '3838687')] time used for this insertion : 0.037435293197631836 save_final save missing photos in datou_result : time spend for datou_step_exec : 7.038415431976318 time spend to save output : 0.03777289390563965 total time spend for step 1 : 7.076188325881958 step2:final Fri Oct 3 20:35:35 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 (27502478) 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 27502478 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1387685667,1387685664,1387685662,1387685661,1387685660,1387685744,1387685735,1387685726,1387685706,1387685688,1387685770,1387685768,1387685766); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27502478]) Inside saveOutput : final : False verbose : True original output for save of step final : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} new output for save of step final : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] map_info['map_portfolio_photo'] : {27502478: [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660]} final : False mtd_id 4302 list_pids : [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] Looping around the photos to save general results len do output : 13 /1387685770.Didn't retrieve data . /1387685768.Didn't retrieve data . /1387685766.Didn't retrieve data . /1387685744.Didn't retrieve data . /1387685735.Didn't retrieve data . /1387685726.Didn't retrieve data . /1387685706.Didn't retrieve data . /1387685688.Didn't retrieve data . /1387685667.Didn't retrieve data . /1387685664.Didn't retrieve data . /1387685662.Didn't retrieve data . /1387685661.Didn't retrieve data . /1387685660.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, '3838687') ('4302', '27502478', '1387685770', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685768', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685766', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685744', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685735', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685726', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685706', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685688', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685667', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685664', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685662', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685661', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685660', None, None, None, None, None, '3838687') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 39 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', '27502478', '1387685770', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685768', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685766', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685744', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685735', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685726', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685706', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685688', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685667', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685664', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685662', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685661', '0.0', None, None, None, None, '3838687'), ('4302', '27502478', '1387685660', '0.0', None, None, None, None, '3838687')] time used for this insertion : 0.03816938400268555 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05259394645690918 time spend to save output : 0.03883719444274902 total time spend for step 2 : 0.0914311408996582 step3:velours_tree Fri Oct 3 20:35:35 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 : {27502478: [{'Carton_gris': 27502490, 'metal': 27502491, 'flou': 27502492, 'plastique': 27502493, 'mal_croppe': 27502494, 'Teint_Dans_La_Masse': 27502495, 'papier': 27502496, 'kraft': 27502497, 'autre_refus': 27502498, 'environnement': 27502499, 'Carton_brun': 27502509, 'cartonnette': 27502513}]} input_args_next_step : {27502478: ()} output_args : {27502478: [{'Carton_gris': 27502490, 'metal': 27502491, 'flou': 27502492, 'plastique': 27502493, 'mal_croppe': 27502494, 'Teint_Dans_La_Masse': 27502495, 'papier': 27502496, 'kraft': 27502497, 'autre_refus': 27502498, 'environnement': 27502499, 'Carton_brun': 27502509, 'cartonnette': 27502513}]} args : 27502478 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': 27502490, 'metal': 27502491, 'flou': 27502492, 'plastique': 27502493, 'mal_croppe': 27502494, 'Teint_Dans_La_Masse': 27502495, 'papier': 27502496, 'kraft': 27502497, 'autre_refus': 27502498, 'environnement': 27502499, 'Carton_brun': 27502509, 'cartonnette': 27502513},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27502478) 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([27502478]) 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.35335683822631836 time spend to save output : 4.076957702636719e-05 total time spend for step 3 : 0.3533976078033447 step4:send_mail_cod Fri Oct 3 20:35:35 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 : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} input_args_next_step : {1387685770: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685770 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685768 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685766 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685744 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685735 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685726 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685706 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685688 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685667 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685664 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685662 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685661 depend.output_id : 0 input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ()} output_args : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',)} args : 1387685660 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 : {27502478: [{'Carton_gris': 27502490, 'metal': 27502491, 'flou': 27502492, 'plastique': 27502493, 'mal_croppe': 27502494, 'Teint_Dans_La_Masse': 27502495, 'papier': 27502496, 'kraft': 27502497, 'autre_refus': 27502498, 'environnement': 27502499, 'Carton_brun': 27502509, 'cartonnette': 27502513}]} input_args_next_step : {1387685770: ('0.0',), 1387685768: ('0.0',), 1387685766: ('0.0',), 1387685744: ('0.0',), 1387685735: ('0.0',), 1387685726: ('0.0',), 1387685706: ('0.0',), 1387685688: ('0.0',), 1387685667: ('0.0',), 1387685664: ('0.0',), 1387685662: ('0.0',), 1387685661: ('0.0',), 1387685660: ('0.0',), 27502478: ()} output_args : {27502478: [{'Carton_gris': 27502490, 'metal': 27502491, 'flou': 27502492, 'plastique': 27502493, 'mal_croppe': 27502494, 'Teint_Dans_La_Masse': 27502495, 'papier': 27502496, 'kraft': 27502497, 'autre_refus': 27502498, 'environnement': 27502499, 'Carton_brun': 27502509, 'cartonnette': 27502513}]} args : 27502478 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 :14, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27502478) 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_view ph WHERE photo_id IN (1387685770,1387685768,1387685766,1387685744,1387685735,1387685726,1387685706,1387685688,1387685667,1387685664,1387685662,1387685661,1387685660) Found this number of photos: 13 ##### Call download_photos : nb_thread : 5 begin to download photo : 1387685660 begin to download photo : 1387685664 begin to download photo : 1387685706 begin to download photo : 1387685744 begin to download photo : 1387685770 download finish for photo 1387685664 begin to download photo : 1387685667 download finish for photo 1387685706 begin to download photo : 1387685726 download finish for photo 1387685660 begin to download photo : 1387685661 download finish for photo 1387685770 download finish for photo 1387685744 begin to download photo : 1387685766 download finish for photo 1387685661 begin to download photo : 1387685662 download finish for photo 1387685726 begin to download photo : 1387685735 download finish for photo 1387685766 begin to download photo : 1387685768 download finish for photo 1387685735 download finish for photo 1387685667 begin to download photo : 1387685688 download finish for photo 1387685662 download finish for photo 1387685768 download finish for photo 1387685688 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette275024911759516536/ imagette275024921759516536/ imagette275024931759516536/ imagette275024941759516536/ imagette275024971759516536/ imagette275024981759516536/ imagette275025131759516536/ imagette275024901759516536/ imagette275024951759516536/ imagette275025091759516536/ length of list_filenames : 13 ; length of list_pids : 13 ; length of list_args : 13 results_Auto_P27502478_03-10-2025_20_35_36.pdf 27502491 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502491 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024911759516536 27502492 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502492 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024921759516536 27502493 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502493 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024931759516536 27502494 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502494 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024941759516536 27502497 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502497 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024971759516536 27502498 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502498 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024981759516536 27502513 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502513 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275025131759516536 27502490 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502490 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024901759516536 27502495 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502495 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275024951759516536 27502509 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502509 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette275025091759516536 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27502478 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27502527,27502528,27502529,27502530,27502531,27502532,27502533,27502534,27502536,27502537,27502538,27502539?tags=Carton_gris,metal,flou,plastique,mal_croppe,Teint_Dans_La_Masse,papier,kraft,autre_refus,environnement,Carton_brun,cartonnette your option no_mail is active, we will not send the real mail to your client args[1387685770] : ('0.0',) no score found for photo 1387685770 We are sending mail with results at report@fotonower.com args[1387685768] : ('0.0',) no score found for photo 1387685768 We are sending mail with results at report@fotonower.com args[1387685766] : ('0.0',) no score found for photo 1387685766 We are sending mail with results at report@fotonower.com args[1387685744] : ('0.0',) no score found for photo 1387685744 We are sending mail with results at report@fotonower.com args[1387685735] : ('0.0',) no score found for photo 1387685735 We are sending mail with results at report@fotonower.com args[1387685726] : ('0.0',) no score found for photo 1387685726 We are sending mail with results at report@fotonower.com args[1387685706] : ('0.0',) no score found for photo 1387685706 We are sending mail with results at report@fotonower.com args[1387685688] : ('0.0',) no score found for photo 1387685688 We are sending mail with results at report@fotonower.com args[1387685667] : ('0.0',) no score found for photo 1387685667 We are sending mail with results at report@fotonower.com args[1387685664] : ('0.0',) no score found for photo 1387685664 We are sending mail with results at report@fotonower.com args[1387685662] : ('0.0',) no score found for photo 1387685662 We are sending mail with results at report@fotonower.com args[1387685661] : ('0.0',) no score found for photo 1387685661 We are sending mail with results at report@fotonower.com args[1387685660] : ('0.0',) no score found for photo 1387685660 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_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502478 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_P27502478_03-10-2025_20_35_36.pdf results_Auto_P27502478_03-10-2025_20_35_36.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27502478_03-10-2025_20_35_36.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','27502478','results_Auto_P27502478_03-10-2025_20_35_36.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27502478_03-10-2025_20_35_36.pdf','pdf','','0.12','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27502478]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] map_info['map_portfolio_photo'] : {27502478: [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660]} final : False mtd_id 4302 list_pids : [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] 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, '3838687') ('4302', '27502478', '1387685770', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685768', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685766', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685744', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685735', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685726', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685706', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685688', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685667', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685664', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685662', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685661', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685660', None, None, None, None, None, '3838687') 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', '27502478', '1387685770', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685768', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685766', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685744', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685735', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685726', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685706', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685688', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685667', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685664', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685662', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685661', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685660', None, None, None, None, None, '3838687')] time used for this insertion : 0.03737831115722656 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.264869213104248 time spend to save output : 0.03762078285217285 total time spend for step 4 : 2.302489995956421 step5:split_time_score Fri Oct 3 20:35:37 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 : ['27502478'] 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 : [('27502478',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27502478) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1387685770: {'path': 'temp/1759516535_3880447_1387685770_89169795bdae662960cc253b8f9c5437.jpg', 'extension': 'jpg'}, 1387685706: {'path': 'temp/1759516535_3880447_1387685706_e8e1f379813ecfaa403e15b2697f89b8.jpg', 'extension': 'jpg'}, 1387685726: {'path': 'temp/1759516535_3880447_1387685726_1648fa5df58ac50aa3bf86d091ba35c8.jpg', 'extension': 'jpg'}, 1387685735: {'path': 'temp/1759516535_3880447_1387685735_dbb52aaffff61a2e70732582a724b358.jpg', 'extension': 'jpg'}, 1387685660: {'path': 'temp/1759516535_3880447_1387685660_86f5eead53210de68753b985bb35a4a4.jpg', 'extension': 'jpg'}, 1387685661: {'path': 'temp/1759516535_3880447_1387685661_a707e83f5d5664f84f24f8795b1fcd93.jpg', 'extension': 'jpg'}, 1387685662: {'path': 'temp/1759516535_3880447_1387685662_6cae933d1deee45bf3f2407ba3d677bc.jpg', 'extension': 'jpg'}, 1387685744: {'path': 'temp/1759516535_3880447_1387685744_7ba8fe79da3c59ed04a1666eee2c1838.jpg', 'extension': 'jpg'}, 1387685766: {'path': 'temp/1759516535_3880447_1387685766_feb28f7affce8549f907756704785106.jpg', 'extension': 'jpg'}, 1387685768: {'path': 'temp/1759516535_3880447_1387685768_0267edaecb2008402c5abca8aeb48f8e.jpg', 'extension': 'jpg'}, 1387685664: {'path': 'temp/1759516535_3880447_1387685664_0bb7ca82e3917ee3d92523e4ba11ea3d.jpg', 'extension': 'jpg'}, 1387685667: {'path': 'temp/1759516535_3880447_1387685667_5efe20052609fd73ae160e2707473da7.jpg', 'extension': 'jpg'}, 1387685688: {'path': 'temp/1759516535_3880447_1387685688_9c71bb3c5d8a79966e12f15540646e26.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 = 27502478; (('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_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27502478 group by h (('20', 13),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27502478 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 (27502478) 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 (27502478) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 03102025 27502478 Nombre de photos uploadées : 13 / 23040 (0%) 03102025 27502478 Nombre de photos taguées (types de déchets): 0 / 13 (0%) 03102025 27502478 Nombre de photos taguées (volume) : 0 / 13 (0%) [{'photo_id': 1387685667, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/5efe20052609fd73ae160e2707473da7.jpg', 'username': None, 'uploaded_at': 1759516327, 'text': 'image_03102025_20_31_03_10146.jpg'}, {'photo_id': 1387685664, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/0bb7ca82e3917ee3d92523e4ba11ea3d.jpg', 'username': None, 'uploaded_at': 1759516327, 'text': 'image_03102025_20_31_14_10140.jpg'}, {'photo_id': 1387685662, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/6cae933d1deee45bf3f2407ba3d677bc.jpg', 'username': None, 'uploaded_at': 1759516327, 'text': 'image_03102025_20_31_24_10140.jpg'}, {'photo_id': 1387685661, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/a707e83f5d5664f84f24f8795b1fcd93.jpg', 'username': None, 'uploaded_at': 1759516327, 'text': 'image_03102025_20_31_34_10141.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.384185791015625e-06 elapsed_time : order_list_meta_photo_and_scores 7.867813110351562e-06 ????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0007550716400146484 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 27502478, '2025-10-03' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-10-03' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2385199,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6594929695129395 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= 2385199 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2385199, 'dashboard_run_id': 2399357, 'mtr_portfolio_id': 27501189, 'dashboard_result_id': 16005183, '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_P27501189_03-10-2025_20_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501201, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501202, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501203, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501204, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501205, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501206, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501207, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501208, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501210, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501211, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501212, 'pht': 3726}}"}, {'dashboat_entry_day': 2385199, 'dashboard_run_id': 2399357, 'mtr_portfolio_id': 27501488, 'dashboard_result_id': 16005185, '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_P27501488_03-10-2025_20_17_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501519, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501522, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501525, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501528, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501530, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501531, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501532, 'pht': 3726}}"}, {'dashboat_entry_day': 2385199, 'dashboard_run_id': 2399357, 'mtr_portfolio_id': 27501928, 'dashboard_result_id': 16005186, '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_P27501928_03-10-2025_20_35_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501941, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501942, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501943, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501944, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501945, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501946, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501947, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501948, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501949, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501951, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501952, 'pht': 3726}}"}, {'dashboat_entry_day': 2385199, 'dashboard_run_id': 2399357, 'mtr_portfolio_id': 27502478, 'dashboard_result_id': 16005188, '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 = 27501189 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': 3838282, 'mtr_portfolio_id': 27501189, 'created_at': datetime.datetime(2025, 10, 3, 20, 3, 8), 'result': '0.06770150827478265', 'result_long': None, 'result_double': None}] Qualite : 0.06770150827478265 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27501189 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27501189_03-10-2025_20_03_08.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27501189 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_P27501189_03-10-2025_20_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501201, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501202, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501203, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501204, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501205, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501206, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501207, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501208, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501210, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501211, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501212, 'pht': 3726}}" where mtr_portfolio_id = 27501189 and dashboard_run_id = 2399357 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`=27501189 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16005183, 0.06770150827478265, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27501189_03-10-2025_20_03_08.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501201, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501202, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501203, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501204, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501205, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501206, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501207, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501208, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501209, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501210, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501211, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501212, '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 = 27501488 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': 3838358, 'mtr_portfolio_id': 27501488, 'created_at': datetime.datetime(2025, 10, 3, 20, 17, 1), 'result': '0.03977568079652984', 'result_long': None, 'result_double': None}] Qualite : 0.03977568079652984 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27501488 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27501488_03-10-2025_20_17_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27501488 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_P27501488_03-10-2025_20_17_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501519, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501522, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501525, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501528, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501530, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501531, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501532, 'pht': 3726}}" where mtr_portfolio_id = 27501488 and dashboard_run_id = 2399357 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`=27501488 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16005185, 0.03977568079652984, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27501488_03-10-2025_20_17_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501519, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501521, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501522, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501524, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501525, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501526, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501528, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501530, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501531, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501532, '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 = 27501928 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': 3838476, 'mtr_portfolio_id': 27501928, 'created_at': datetime.datetime(2025, 10, 3, 20, 34, 59), 'result': '0.023619652644054218', 'result_long': None, 'result_double': None}] Qualite : 0.023619652644054218 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27501928 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27501928_03-10-2025_20_35_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27501928 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_P27501928_03-10-2025_20_35_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501941, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501942, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501943, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501944, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501945, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501946, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501947, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501948, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501949, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501951, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501952, 'pht': 3726}}" where mtr_portfolio_id = 27501928 and dashboard_run_id = 2399357 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`=27501928 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16005186, 0.023619652644054218, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27501928_03-10-2025_20_35_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27501941, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27501942, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27501943, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27501944, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27501945, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27501946, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27501947, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27501948, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27501949, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27501950, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27501951, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27501952, '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 = 27502478 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 = 27502478 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 = 27502478 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27502478 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 = 27502478 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 = 27502478 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27502478_03-10-2025_20_35_36.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27502478 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_P27502478_03-10-2025_20_35_36.pdf'}" where mtr_portfolio_id = 27502478 and dashboard_run_id = 2399357 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27501189,27501488,27501928,27502478) result : ((1387682378,), (1387682379,), (1387682381,), (1387682384,), (1387682394,), (1387682396,), (1387682399,), (1387682404,), (1387682414,), (1387682418,), (1387682563,), (1387682564,), (1387682582,), (1387682590,), (1387682592,), (1387682594,), (1387682598,), (1387682614,), (1387682615,), (1387682616,), (1387682618,), (1387682637,), (1387682762,), (1387682767,), (1387682772,), (1387682779,), (1387682787,), (1387682792,), (1387682795,), (1387682796,), (1387682797,), (1387682798,), (1387682812,), (1387682813,), (1387682814,), (1387682846,), (1387682847,), (1387682848,), (1387682878,), (1387682886,), (1387682890,), (1387682893,), (1387682896,), (1387682898,), (1387682918,), (1387682920,), (1387682923,), (1387682927,), (1387682929,), (1387682932,), (1387682938,), (1387682943,), (1387682946,), (1387683048,), (1387683049,), (1387683055,), (1387683087,), (1387683088,), (1387683089,), (1387683091,), (1387683110,), (1387683115,), (1387683119,), (1387683124,), (1387683127,), (1387683130,), (1387683135,), (1387683137,), (1387683140,), (1387683191,), (1387683157,), (1387683160,), (1387683178,), (1387683207,), (1387683209,), (1387683211,), (1387683238,), (1387683241,), (1387683246,), (1387683250,), (1387683255,), (1387683275,), (1387683276,), (1387683277,), (1387683279,), (1387683282,), (1387683292,), (1387683293,), (1387683295,), (1387683299,), (1387683302,), (1387683305,), (1387683310,), (1387683312,), (1387683313,), (1387683314,), (1387683316,), (1387683320,), (1387683322,), (1387683326,), (1387683367,), (1387683374,), (1387683376,), (1387683404,), (1387683409,), (1387683427,), (1387683477,), (1387683596,), (1387683598,), (1387683618,), (1387683672,), (1387683697,), (1387683800,), (1387683802,), (1387683806,), (1387683826,), (1387683841,), (1387683842,), (1387683844,), (1387683909,), (1387683910,), (1387683913,), (1387683915,), (1387683918,), (1387683977,), (1387684059,), (1387684061,), (1387684076,), (1387684077,), (1387684078,), (1387684174,), (1387684175,), (1387684176,), (1387684180,), (1387684184,), (1387684192,), (1387684219,), (1387684266,), (1387684268,), (1387684271,), (1387684274,), (1387684285,), (1387684286,), (1387684289,), (1387684292,), (1387684295,), (1387684315,), (1387684348,), (1387684350,), (1387684366,), (1387684351,), (1387684352,), (1387684627,), (1387684629,), (1387684631,), (1387685052,), (1387685053,), (1387685054,), (1387685071,), (1387685079,), (1387685080,), (1387685099,), (1387685100,), (1387685105,), (1387685208,), (1387685210,), (1387685212,), (1387685214,), (1387685251,), (1387685252,), (1387685253,), (1387685255,), (1387685258,), (1387685268,), (1387685269,), (1387685270,), (1387685272,), (1387685288,), (1387685291,), (1387685293,), (1387685298,), (1387685302,), (1387685312,), (1387685321,), (1387685323,), (1387685326,), (1387685331,), (1387685334,), (1387685337,), (1387685339,), (1387685340,), (1387685341,), (1387685342,), (1387685364,), (1387685670,), (1387685660,), (1387685661,), (1387685662,), (1387685664,), (1387685667,), (1387685688,), (1387685706,), (1387685726,), (1387685735,), (1387685744,), (1387685766,), (1387685768,), (1387685770,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03102025': {'nb_upload': 13, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27502478]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] map_info['map_portfolio_photo'] : {27502478: [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660]} final : True mtd_id 4302 list_pids : [1387685770, 1387685768, 1387685766, 1387685744, 1387685735, 1387685726, 1387685706, 1387685688, 1387685667, 1387685664, 1387685662, 1387685661, 1387685660] Looping around the photos to save general results len do output : 1 /27502478Didn'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, '3838687') ('4302', '27502478', '1387685770', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685768', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685766', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685744', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685735', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685726', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685706', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685688', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685667', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685664', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685662', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685661', None, None, None, None, None, '3838687') ('4302', None, None, None, None, None, None, None, '3838687') ('4302', '27502478', '1387685660', None, None, None, None, None, '3838687') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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, '27502478', 'None', None, None, None, None, '3838687'), ('4302', '27502478', '1387685770', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685768', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685766', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685744', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685735', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685726', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685706', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685688', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685667', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685664', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685662', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685661', None, None, None, None, None, '3838687'), ('4302', '27502478', '1387685660', None, None, None, None, None, '3838687')] time used for this insertion : 0.03771471977233887 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6875531673431396 time spend to save output : 0.0379488468170166 total time spend for step 5 : 1.7255020141601562 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 (3838687) 2.22user 1.80system 0:14.45elapsed 27%CPU (0avgtext+0avgdata 158928maxresident)k 216inputs+7832outputs (5major+77137minor)pagefaults 0swaps