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 : 659699 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 (3303344) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3303344) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029623 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3303344'] with mtr_portfolio_ids : ['25029623'] and first list_photo_ids : [] new path : /proc/659699/ Name: python3 Umask: 0002 State: R (running) Tgid: 659699 Ngid: 0 Pid: 659699 PPid: 659698 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 659699 NSpid: 659699 NSpgid: 658537 NSsid: 658537 VmPeak: 1106884 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98792 kB VmRSS: 98792 kB RssAnon: 59784 kB RssFile: 39008 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 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: 50 nonvoluntary_ctxt_switches: 82 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '659699', 'Ngid': '0', 'Pid': '659699', 'PPid': '659698', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '659699', 'NSpid': '659699', 'NSpgid': '658537', 'NSsid': '658537', 'VmPeak': '1106884 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98792 kB', 'VmRSS': '98792 kB', 'RssAnon': '59784 kB', 'RssFile': '39008 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 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': '50', 'nonvoluntary_ctxt_switches': '82'} ('datou_batch_current', '659699', '1106884', '0', '1106884', '865636', '98792', b'', 'marlene', '3303344') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (25029623) 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 (3303344 ) ) 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 (25029623) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1372458686, 'portfolio_id': 25029623}, {'photo_id': 1372458680, 'portfolio_id': 25029623}, {'photo_id': 1372458659, 'portfolio_id': 25029623}, {'photo_id': 1372458637, 'portfolio_id': 25029623}, {'photo_id': 1372458611, 'portfolio_id': 25029623}, {'photo_id': 1372458592, 'portfolio_id': 25029623}, {'photo_id': 1372458429, 'portfolio_id': 25029623}, {'photo_id': 1372458406, 'portfolio_id': 25029623}, {'photo_id': 1372458383, 'portfolio_id': 25029623}, {'photo_id': 1372458363, 'portfolio_id': 25029623}, {'photo_id': 1372458339, 'portfolio_id': 25029623}, {'photo_id': 1372458315, 'portfolio_id': 25029623}] map_portfolio_id_photo_id: {25029623: [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315]} ##### 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.03899121284484863 #### 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 Thu Jul 17 16:18:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25029623) 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 : 25029623 get user id for portfolio 25029623 get sub ptf for main ptf 25029623, type 3726 and hashtags ['Carton_gris', 'flou', 'plastique', 'environnement', 'mal_croppe', 'Teint_Dans_La_Masse', 'autre_refus', 'kraft', 'papier', 'cartonnette', 'Carton_brun', 'metal'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25029623 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25029623 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_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__17072025_16_15_04_010137_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[25029623, 25029644, 3726, 0.5, 2107753020, 979], [25029623, 25029645, 3726, 0.5, 492777938, 979], [25029623, 25029648, 3726, 0.5, 492725882, 979], [25029623, 25029649, 3726, 0.5, 493012381, 979], [25029623, 25029651, 3726, 0.5, 2107755527, 979], [25029623, 25029653, 3726, 0.5, 2107752385, 979], [25029623, 25029655, 3726, 0.5, 2107752406, 979], [25029623, 25029657, 3726, 0.5, 493202403, 979], [25029623, 25029659, 3726, 0.5, 492668766, 979], [25029623, 25029660, 3726, 0.5, 702398920, 979], [25029623, 25029662, 3726, 0.5, 2107753024, 979], [25029623, 25029663, 3726, 0.5, 492628673, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25029623 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25029623 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 25029623, 'sub_port_id': 25029644, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866134, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'flou': {'main_port_id': 25029623, 'sub_port_id': 25029645, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866135, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'plastique': {'main_port_id': 25029623, 'sub_port_id': 25029648, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866136, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'environnement': {'main_port_id': 25029623, 'sub_port_id': 25029649, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866137, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'mal_croppe': {'main_port_id': 25029623, 'sub_port_id': 25029651, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866138, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 25029623, 'sub_port_id': 25029653, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866139, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'autre_refus': {'main_port_id': 25029623, 'sub_port_id': 25029655, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866140, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'kraft': {'main_port_id': 25029623, 'sub_port_id': 25029657, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866141, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'papier': {'main_port_id': 25029623, 'sub_port_id': 25029659, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866142, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'cartonnette': {'main_port_id': 25029623, 'sub_port_id': 25029660, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866143, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'Carton_brun': {'main_port_id': 25029623, 'sub_port_id': 25029662, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866144, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}, 'metal': {'main_port_id': 25029623, 'sub_port_id': 25029663, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866145, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 18, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25029644 , 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=25029623 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 (25029644) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029645 , 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=25029623 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 (25029645) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029648 , 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=25029623 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 (25029648) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029649 , 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=25029623 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 (25029649) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029651 , 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=25029623 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 (25029651) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029653 , 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=25029623 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 (25029653) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029655 , 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=25029623 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 (25029655) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029657 , 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=25029623 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 (25029657) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029659 , 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=25029623 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 (25029659) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029660 , 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=25029623 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 (25029660) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029662 , 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=25029623 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 (25029662) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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 25029663 , 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=25029623 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 (25029663) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25029623) result : ((1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) 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`=25029623 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25029623 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_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__17072025_16_15_04_010137_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17072025_16_15_04_010137_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[25029623, 25029670, 4417, 0.5, 2107753020, 979], [25029623, 25029671, 4417, 0.5, 492777938, 979], [25029623, 25029672, 4417, 0.5, 492725882, 979], [25029623, 25029673, 4417, 0.5, 493012381, 979], [25029623, 25029674, 4417, 0.5, 2107755527, 979], [25029623, 25029675, 4417, 0.5, 2107752385, 979], [25029623, 25029676, 4417, 0.5, 2107752406, 979], [25029623, 25029677, 4417, 0.5, 493202403, 979], [25029623, 25029678, 4417, 0.5, 492668766, 979], [25029623, 25029679, 4417, 0.5, 702398920, 979], [25029623, 25029680, 4417, 0.5, 2107753024, 979], [25029623, 25029681, 4417, 0.5, 492628673, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25029623 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25029623 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','flou','plastique','environnement','mal_croppe','Teint_Dans_La_Masse','autre_refus','kraft','papier','cartonnette','Carton_brun','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 25029623, 'sub_port_id': 25029670, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866158, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'flou': {'main_port_id': 25029623, 'sub_port_id': 25029671, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866159, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'plastique': {'main_port_id': 25029623, 'sub_port_id': 25029672, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866160, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'environnement': {'main_port_id': 25029623, 'sub_port_id': 25029673, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866161, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'mal_croppe': {'main_port_id': 25029623, 'sub_port_id': 25029674, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866162, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'Teint_Dans_La_Masse': {'main_port_id': 25029623, 'sub_port_id': 25029675, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866163, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'autre_refus': {'main_port_id': 25029623, 'sub_port_id': 25029676, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866164, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'kraft': {'main_port_id': 25029623, 'sub_port_id': 25029677, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866165, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'papier': {'main_port_id': 25029623, 'sub_port_id': 25029678, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866166, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'cartonnette': {'main_port_id': 25029623, 'sub_port_id': 25029679, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866167, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'Carton_brun': {'main_port_id': 25029623, 'sub_port_id': 25029680, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866168, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}, 'metal': {'main_port_id': 25029623, 'sub_port_id': 25029681, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16866169, 'last_updated_at': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_desc': datetime.datetime(2025, 7, 17, 16, 19, 4), 'last_updated_at_asc': datetime.datetime(2025, 7, 17, 16, 19, 4)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029670,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029644 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029671,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029645 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029672,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029648 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029673,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029649 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029674,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029651 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029675,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029653 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029676,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029655 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029677,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029657 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029678,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029659 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029679,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029660 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029680,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029662 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25029681,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25029663 lien utilise dans velours : https://www.fotonower.com/velours/25029670,25029671,25029672,25029673,25029674,25029675,25029676,25029677,25029678,25029679,25029680,25029681?tags=Carton_gris,flou,plastique,environnement,mal_croppe,Teint_Dans_La_Masse,autre_refus,kraft,papier,cartonnette,Carton_brun,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25029623]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] map_info['map_portfolio_photo'] : {25029623: [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315]} final : False mtd_id 4302 list_pids : [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] Looping around the photos to save general results len do output : 1 /25029623. 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, '3303344') ('4302', '25029623', '1372458686', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458680', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458659', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458637', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458611', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458592', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458429', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458406', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458383', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458363', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458339', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458315', None, None, None, None, None, '3303344') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25029623', "{'Carton_gris': 25029644, 'flou': 25029645, 'plastique': 25029648, 'environnement': 25029649, 'mal_croppe': 25029651, 'Teint_Dans_La_Masse': 25029653, 'autre_refus': 25029655, 'kraft': 25029657, 'papier': 25029659, 'cartonnette': 25029660, 'Carton_brun': 25029662, 'metal': 25029663}", None, None, None, None, '3303344'), ('4302', '25029623', '1372458686', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458680', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458659', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458637', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458611', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458592', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458429', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458406', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458383', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458363', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458339', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458315', None, None, None, None, None, '3303344')] time used for this insertion : 0.04080677032470703 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.762287378311157 time spend to save output : 0.041144371032714844 total time spend for step 1 : 5.803431749343872 step2:final Thu Jul 17 16:19:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (25029623) 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 25029623 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1372458429,1372458406,1372458383,1372458363,1372458339,1372458315,1372458686,1372458680,1372458659,1372458637,1372458611,1372458592); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25029623]) Inside saveOutput : final : False verbose : True original output for save of step final : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} new output for save of step final : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] map_info['map_portfolio_photo'] : {25029623: [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315]} final : False mtd_id 4302 list_pids : [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] Looping around the photos to save general results len do output : 12 /1372458686.Didn't retrieve data . /1372458680.Didn't retrieve data . /1372458659.Didn't retrieve data . /1372458637.Didn't retrieve data . /1372458611.Didn't retrieve data . /1372458592.Didn't retrieve data . /1372458429.Didn't retrieve data . /1372458406.Didn't retrieve data . /1372458383.Didn't retrieve data . /1372458363.Didn't retrieve data . /1372458339.Didn't retrieve data . /1372458315.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, '3303344') ('4302', '25029623', '1372458686', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458680', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458659', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458637', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458611', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458592', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458429', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458406', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458383', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458363', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458339', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458315', None, None, None, None, None, '3303344') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25029623', '1372458686', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458680', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458659', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458637', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458611', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458592', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458429', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458406', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458383', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458363', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458339', '0.0', None, None, None, None, '3303344'), ('4302', '25029623', '1372458315', '0.0', None, None, None, None, '3303344')] time used for this insertion : 0.03061962127685547 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.04138684272766113 time spend to save output : 0.031137704849243164 total time spend for step 2 : 0.0725245475769043 step3:velours_tree Thu Jul 17 16:19:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25029623: [{'Carton_gris': 25029644, 'flou': 25029645, 'plastique': 25029648, 'environnement': 25029649, 'mal_croppe': 25029651, 'Teint_Dans_La_Masse': 25029653, 'autre_refus': 25029655, 'kraft': 25029657, 'papier': 25029659, 'cartonnette': 25029660, 'Carton_brun': 25029662, 'metal': 25029663}]} input_args_next_step : {25029623: ()} output_args : {25029623: [{'Carton_gris': 25029644, 'flou': 25029645, 'plastique': 25029648, 'environnement': 25029649, 'mal_croppe': 25029651, 'Teint_Dans_La_Masse': 25029653, 'autre_refus': 25029655, 'kraft': 25029657, 'papier': 25029659, 'cartonnette': 25029660, 'Carton_brun': 25029662, 'metal': 25029663}]} args : 25029623 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': 25029644, 'flou': 25029645, 'plastique': 25029648, 'environnement': 25029649, 'mal_croppe': 25029651, 'Teint_Dans_La_Masse': 25029653, 'autre_refus': 25029655, 'kraft': 25029657, 'papier': 25029659, 'cartonnette': 25029660, 'Carton_brun': 25029662, 'metal': 25029663},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25029623) 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([25029623]) 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.3842489719390869 time spend to save output : 6.175041198730469e-05 total time spend for step 3 : 0.3843107223510742 step4:send_mail_cod Thu Jul 17 16:19:05 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 : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} input_args_next_step : {1372458686: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458686 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458680 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458659 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458637 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458611 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458592 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458429 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458406 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458383 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458363 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458339 depend.output_id : 0 input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ()} output_args : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',)} args : 1372458315 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 : {25029623: [{'Carton_gris': 25029644, 'flou': 25029645, 'plastique': 25029648, 'environnement': 25029649, 'mal_croppe': 25029651, 'Teint_Dans_La_Masse': 25029653, 'autre_refus': 25029655, 'kraft': 25029657, 'papier': 25029659, 'cartonnette': 25029660, 'Carton_brun': 25029662, 'metal': 25029663}]} input_args_next_step : {1372458686: ('0.0',), 1372458680: ('0.0',), 1372458659: ('0.0',), 1372458637: ('0.0',), 1372458611: ('0.0',), 1372458592: ('0.0',), 1372458429: ('0.0',), 1372458406: ('0.0',), 1372458383: ('0.0',), 1372458363: ('0.0',), 1372458339: ('0.0',), 1372458315: ('0.0',), 25029623: ()} output_args : {25029623: [{'Carton_gris': 25029644, 'flou': 25029645, 'plastique': 25029648, 'environnement': 25029649, 'mal_croppe': 25029651, 'Teint_Dans_La_Masse': 25029653, 'autre_refus': 25029655, 'kraft': 25029657, 'papier': 25029659, 'cartonnette': 25029660, 'Carton_brun': 25029662, 'metal': 25029663}]} args : 25029623 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25029623) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1372458686,1372458680,1372458659,1372458637,1372458611,1372458592,1372458429,1372458406,1372458383,1372458363,1372458339,1372458315) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1372458315 begin to download photo : 1372458383 begin to download photo : 1372458592 begin to download photo : 1372458659 download finish for photo 1372458659 begin to download photo : 1372458680 download finish for photo 1372458592 begin to download photo : 1372458611 download finish for photo 1372458383 begin to download photo : 1372458406 download finish for photo 1372458315 begin to download photo : 1372458339 download finish for photo 1372458680 begin to download photo : 1372458686 download finish for photo 1372458611 begin to download photo : 1372458637 download finish for photo 1372458406 begin to download photo : 1372458429 download finish for photo 1372458339 begin to download photo : 1372458363 download finish for photo 1372458686 download finish for photo 1372458637 download finish for photo 1372458429 download finish for photo 1372458363 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette250296451752761945/ imagette250296481752761945/ imagette250296511752761945/ imagette250296551752761945/ imagette250296571752761945/ imagette250296601752761945/ imagette250296631752761945/ imagette250296441752761945/ imagette250296531752761945/ imagette250296621752761945/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P25029623_17-07-2025_16_19_05.pdf 25029645 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029645 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296451752761945 25029648 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029648 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296481752761945 25029651 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029651 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296511752761945 25029655 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029655 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296551752761945 25029657 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029657 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296571752761945 25029660 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029660 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296601752761945 25029663 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029663 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296631752761945 25029644 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029644 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296441752761945 25029653 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029653 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296531752761945 25029662 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029662 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette250296621752761945 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25029623 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25029670,25029671,25029672,25029673,25029674,25029675,25029676,25029677,25029678,25029679,25029680,25029681?tags=Carton_gris,flou,plastique,environnement,mal_croppe,Teint_Dans_La_Masse,autre_refus,kraft,papier,cartonnette,Carton_brun,metal your option no_mail is active, we will not send the real mail to your client args[1372458686] : ('0.0',) no score found for photo 1372458686 We are sending mail with results at report@fotonower.com args[1372458680] : ('0.0',) no score found for photo 1372458680 We are sending mail with results at report@fotonower.com args[1372458659] : ('0.0',) no score found for photo 1372458659 We are sending mail with results at report@fotonower.com args[1372458637] : ('0.0',) no score found for photo 1372458637 We are sending mail with results at report@fotonower.com args[1372458611] : ('0.0',) no score found for photo 1372458611 We are sending mail with results at report@fotonower.com args[1372458592] : ('0.0',) no score found for photo 1372458592 We are sending mail with results at report@fotonower.com args[1372458429] : ('0.0',) no score found for photo 1372458429 We are sending mail with results at report@fotonower.com args[1372458406] : ('0.0',) no score found for photo 1372458406 We are sending mail with results at report@fotonower.com args[1372458383] : ('0.0',) no score found for photo 1372458383 We are sending mail with results at report@fotonower.com args[1372458363] : ('0.0',) no score found for photo 1372458363 We are sending mail with results at report@fotonower.com args[1372458339] : ('0.0',) no score found for photo 1372458339 We are sending mail with results at report@fotonower.com args[1372458315] : ('0.0',) no score found for photo 1372458315 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029623 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_P25029623_17-07-2025_16_19_05.pdf results_Auto_P25029623_17-07-2025_16_19_05.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25029623_17-07-2025_16_19_05.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','25029623','results_Auto_P25029623_17-07-2025_16_19_05.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25029623_17-07-2025_16_19_05.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25029623]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] map_info['map_portfolio_photo'] : {25029623: [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315]} final : False mtd_id 4302 list_pids : [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] 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, '3303344') ('4302', '25029623', '1372458686', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458680', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458659', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458637', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458611', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458592', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458429', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458406', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458383', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458363', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458339', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458315', None, None, None, None, None, '3303344') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25029623', '1372458686', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458680', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458659', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458637', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458611', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458592', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458429', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458406', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458383', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458363', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458339', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458315', None, None, None, None, None, '3303344')] time used for this insertion : 0.03315448760986328 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.224705934524536 time spend to save output : 0.03340291976928711 total time spend for step 4 : 2.2581088542938232 step5:split_time_score Thu Jul 17 16:19:07 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 : ['25029623'] 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 : [('25029623',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25029623) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1372458659: {'path': 'temp/1752761945_659699_1372458659_fef8d6fe2d678be4f9afc4d4cb331d58.jpg', 'extension': 'jpg'}, 1372458680: {'path': 'temp/1752761945_659699_1372458680_b6d40ee187cdad9dd59beda2835c1219.jpg', 'extension': 'jpg'}, 1372458686: {'path': 'temp/1752761945_659699_1372458686_5cff7734bb245ccc63b9755dc75098f6.jpg', 'extension': 'jpg'}, 1372458592: {'path': 'temp/1752761945_659699_1372458592_466c146184bb440fed1b3b9b696417f0.jpg', 'extension': 'jpg'}, 1372458611: {'path': 'temp/1752761945_659699_1372458611_972609ca97213843a64821d2db76989a.jpg', 'extension': 'jpg'}, 1372458637: {'path': 'temp/1752761945_659699_1372458637_1ea42eea2b8cdbd0d9f0ce32805fa909.jpg', 'extension': 'jpg'}, 1372458383: {'path': 'temp/1752761945_659699_1372458383_c97e7c2b80c3a40c302ef4f8e7d52108.jpg', 'extension': 'jpg'}, 1372458406: {'path': 'temp/1752761945_659699_1372458406_d74cb6c1a63ca05d848f84bc99ff506a.jpg', 'extension': 'jpg'}, 1372458429: {'path': 'temp/1752761945_659699_1372458429_63496e3d80b511533e8a8420ada9f850.jpg', 'extension': 'jpg'}, 1372458315: {'path': 'temp/1752761945_659699_1372458315_069d5c9810a510eda5a5b901cc6abe70.jpg', 'extension': 'jpg'}, 1372458339: {'path': 'temp/1752761945_659699_1372458339_9c6a354ee70e752392a1119324be742d.jpg', 'extension': 'jpg'}, 1372458363: {'path': 'temp/1752761945_659699_1372458363_3413d4fc265a8c53e35a20e55b13b6ec.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 = 25029623; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25029623 group by h (('16', 12),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25029623 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 (25029623) 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 (25029623) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17072025 25029623 Nombre de photos uploadées : 12 / 23040 (0%) 17072025 25029623 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 17072025 25029623 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1372458429, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/17/63496e3d80b511533e8a8420ada9f850.jpg', 'username': None, 'uploaded_at': 1752761763, 'text': 'image_17072025_16_15_04_10137.jpg'}, {'photo_id': 1372458406, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/17/d74cb6c1a63ca05d848f84bc99ff506a.jpg', 'username': None, 'uploaded_at': 1752761763, 'text': 'image_17072025_16_15_14_10133.jpg'}, {'photo_id': 1372458383, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/17/c97e7c2b80c3a40c302ef4f8e7d52108.jpg', 'username': None, 'uploaded_at': 1752761763, 'text': 'image_17072025_16_15_24_10137.jpg'}, {'photo_id': 1372458363, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/17/3413d4fc265a8c53e35a20e55b13b6ec.jpg', 'username': None, 'uploaded_at': 1752761763, 'text': 'image_17072025_16_15_34_10144.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 8.58306884765625e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006926059722900391 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 25029623, '2025-07-17' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1984003,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.06998538970947266 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= 1984003 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1984003, 'dashboard_run_id': 1993012, 'mtr_portfolio_id': 25026217, 'dashboard_result_id': 12659458, '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_P25026217_17-07-2025_15_47_04.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25026269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25026271, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25026272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25026274, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25026276, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25026277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25026279, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25026281, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25026282, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25026284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25026286, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25026288, 'pht': 3726}}"}, {'dashboat_entry_day': 1984003, 'dashboard_run_id': 1993012, 'mtr_portfolio_id': 25027283, 'dashboard_result_id': 12659459, '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_P25027283_17-07-2025_16_03_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25027289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25027290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25027291, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25027292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25027293, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25027294, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25027295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25027296, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25027297, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25027298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25027299, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25027300, 'pht': 3726}}"}, {'dashboat_entry_day': 1984003, 'dashboard_run_id': 1993012, 'mtr_portfolio_id': 25028437, 'dashboard_result_id': 12659460, '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_P25028437_17-07-2025_16_17_03.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25028495, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25028496, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25028497, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25028498, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25028499, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25028500, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25028501, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25028502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25028503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25028504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25028505, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25028507, 'pht': 3726}}"}, {'dashboat_entry_day': 1984003, 'dashboard_run_id': 1993012, 'mtr_portfolio_id': 25029623, 'dashboard_result_id': 12659461, '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 = 25026217 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': 3302913, 'mtr_portfolio_id': 25026217, 'created_at': datetime.datetime(2025, 7, 17, 15, 47, 3), 'result': '0.031106441517177664', 'result_long': None, 'result_double': None}] Qualite : 0.031106441517177664 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25026217 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25026217_17-07-2025_15_47_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25026217 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_P25026217_17-07-2025_15_47_04.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25026269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25026271, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25026272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25026274, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25026276, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25026277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25026279, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25026281, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25026282, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25026284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25026286, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25026288, 'pht': 3726}}" where mtr_portfolio_id = 25026217 and dashboard_run_id = 1993012 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`=25026217 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12659458, 0.031106441517177664, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25026217_17-07-2025_15_47_04.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25026269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25026271, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25026272, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25026274, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25026276, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25026277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25026279, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25026281, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25026282, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25026284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25026286, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25026288, '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 = 25027283 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': 3303169, 'mtr_portfolio_id': 25027283, 'created_at': datetime.datetime(2025, 7, 17, 16, 3, 1), 'result': '0.0473611304044326', 'result_long': None, 'result_double': None}] Qualite : 0.0473611304044326 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25027283 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25027283_17-07-2025_16_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25027283 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_P25027283_17-07-2025_16_03_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25027289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25027290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25027291, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25027292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25027293, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25027294, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25027295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25027296, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25027297, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25027298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25027299, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25027300, 'pht': 3726}}" where mtr_portfolio_id = 25027283 and dashboard_run_id = 1993012 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`=25027283 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12659459, 0.0473611304044326, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25027283_17-07-2025_16_03_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25027289, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25027290, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25027291, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25027292, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25027293, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25027294, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25027295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25027296, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25027297, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25027298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25027299, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25027300, '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 = 25028437 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': 3303244, 'mtr_portfolio_id': 25028437, 'created_at': datetime.datetime(2025, 7, 17, 16, 17, 2), 'result': '0.022938076418153968', 'result_long': None, 'result_double': None}] Qualite : 0.022938076418153968 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25028437 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25028437_17-07-2025_16_17_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25028437 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_P25028437_17-07-2025_16_17_03.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25028495, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25028496, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25028497, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25028498, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25028499, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25028500, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25028501, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25028502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25028503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25028504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25028505, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25028507, 'pht': 3726}}" where mtr_portfolio_id = 25028437 and dashboard_run_id = 1993012 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`=25028437 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12659460, 0.022938076418153968, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25028437_17-07-2025_16_17_03.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25028495, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25028496, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25028497, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25028498, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25028499, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25028500, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25028501, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25028502, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25028503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25028504, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25028505, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25028507, '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 = 25029623 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 = 25029623 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 = 25029623 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25029623 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 = 25029623 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 = 25029623 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25029623_17-07-2025_16_19_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25029623 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_P25029623_17-07-2025_16_19_05.pdf'}" where mtr_portfolio_id = 25029623 and dashboard_run_id = 1993012 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25026217,25027283,25028437,25029623) result : ((1372440268,), (1372440270,), (1372440276,), (1372440280,), (1372440311,), (1372440317,), (1372440370,), (1372440390,), (1372440397,), (1372440411,), (1372440418,), (1372440449,), (1372440521,), (1372440530,), (1372440534,), (1372440536,), (1372440539,), (1372440541,), (1372440591,), (1372440601,), (1372440609,), (1372440611,), (1372440614,), (1372440644,), (1372440664,), (1372440669,), (1372440672,), (1372440676,), (1372440679,), (1372440683,), (1372440702,), (1372440705,), (1372440708,), (1372440712,), (1372440714,), (1372440718,), (1372440768,), (1372440805,), (1372440819,), (1372440832,), (1372440839,), (1372440847,), (1372440882,), (1372440890,), (1372440893,), (1372440928,), (1372440996,), (1372441004,), (1372441064,), (1372441099,), (1372441104,), (1372441111,), (1372441138,), (1372441148,), (1372441234,), (1372441238,), (1372441240,), (1372441242,), (1372441248,), (1372441254,), (1372441352,), (1372441356,), (1372441364,), (1372441369,), (1372441373,), (1372441377,), (1372441397,), (1372441399,), (1372441401,), (1372441402,), (1372441406,), (1372441409,), (1372441572,), (1372441592,), (1372441633,), (1372441661,), (1372441684,), (1372441696,), (1372441834,), (1372442343,), (1372442386,), (1372442424,), (1372442447,), (1372442468,), (1372442487,), (1372442755,), (1372442789,), (1372442815,), (1372442836,), (1372442860,), (1372442896,), (1372443101,), (1372443188,), (1372443255,), (1372443321,), (1372443373,), (1372443404,), (1372443815,), (1372443834,), (1372443875,), (1372443932,), (1372443975,), (1372444028,), (1372444320,), (1372444398,), (1372444460,), (1372444522,), (1372444586,), (1372444622,), (1372444999,), (1372445094,), (1372445172,), (1372445253,), (1372445329,), (1372445431,), (1372445891,), (1372445944,), (1372445993,), (1372446019,), (1372446072,), (1372446109,), (1372446420,), (1372446450,), (1372446471,), (1372446509,), (1372446535,), (1372446562,), (1372446827,), (1372446885,), (1372446929,), (1372446965,), (1372447032,), (1372447081,), (1372447350,), (1372447393,), (1372447411,), (1372447427,), (1372447451,), (1372447466,), (1372447537,), (1372447561,), (1372447565,), (1372447586,), (1372447605,), (1372447639,), (1372447814,), (1372447818,), (1372447822,), (1372447860,), (1372447907,), (1372447939,), (1372448305,), (1372448340,), (1372448375,), (1372448416,), (1372448466,), (1372448475,), (1372448589,), (1372448600,), (1372448610,), (1372448613,), (1372448644,), (1372448673,), (1372449331,), (1372449386,), (1372449432,), (1372449489,), (1372449542,), (1372449622,), (1372450119,), (1372450173,), (1372450266,), (1372450372,), (1372450460,), (1372450559,), (1372451066,), (1372451125,), (1372451174,), (1372451249,), (1372451338,), (1372451403,), (1372451994,), (1372452079,), (1372452154,), (1372452234,), (1372452313,), (1372452408,), (1372452912,), (1372452944,), (1372452982,), (1372453019,), (1372453038,), (1372453066,), (1372453699,), (1372453760,), (1372453843,), (1372453908,), (1372453978,), (1372454063,), (1372454621,), (1372454659,), (1372454718,), (1372454760,), (1372454795,), (1372454813,), (1372455092,), (1372455110,), (1372455126,), (1372455152,), (1372455189,), (1372455271,), (1372455470,), (1372455999,), (1372456086,), (1372456145,), (1372456308,), (1372456378,), (1372456462,), (1372456839,), (1372456875,), (1372456902,), (1372456922,), (1372456926,), (1372456935,), (1372457060,), (1372457064,), (1372457066,), (1372457067,), (1372457069,), (1372457072,), (1372457134,), (1372457158,), (1372457185,), (1372457229,), (1372457281,), (1372457320,), (1372457798,), (1372457829,), (1372457852,), (1372457873,), (1372457909,), (1372457954,), (1372458228,), (1372458238,), (1372458241,), (1372458242,), (1372458244,), (1372458248,), (1372458286,), (1372458315,), (1372458339,), (1372458363,), (1372458383,), (1372458406,), (1372458429,), (1372458592,), (1372458611,), (1372458637,), (1372458659,), (1372458680,), (1372458686,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17072025': {'nb_upload': 12, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25029623]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] map_info['map_portfolio_photo'] : {25029623: [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315]} final : True mtd_id 4302 list_pids : [1372458686, 1372458680, 1372458659, 1372458637, 1372458611, 1372458592, 1372458429, 1372458406, 1372458383, 1372458363, 1372458339, 1372458315] Looping around the photos to save general results len do output : 1 /25029623Didn'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, '3303344') ('4302', '25029623', '1372458686', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458680', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458659', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458637', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458611', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458592', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458429', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458406', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458383', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458363', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458339', None, None, None, None, None, '3303344') ('4302', None, None, None, None, None, None, None, '3303344') ('4302', '25029623', '1372458315', None, None, None, None, None, '3303344') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25029623', 'None', None, None, None, None, '3303344'), ('4302', '25029623', '1372458686', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458680', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458659', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458637', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458611', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458592', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458429', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458406', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458383', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458363', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458339', None, None, None, None, None, '3303344'), ('4302', '25029623', '1372458315', None, None, None, None, None, '3303344')] time used for this insertion : 0.020916223526000977 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7463679313659668 time spend to save output : 0.021132469177246094 total time spend for step 5 : 0.7675004005432129 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 (3303344) 2.02user 2.54system 0:13.24elapsed 34%CPU (0avgtext+0avgdata 159748maxresident)k 976inputs+6248outputs (33major+64037minor)pagefaults 0swaps