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 : 2490870 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 (4012257) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4012257) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277898 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4012257'] with mtr_portfolio_ids : ['28277898'] and first list_photo_ids : [] new path : /proc/2490870/ Name: python3 Umask: 0002 State: R (running) Tgid: 2490870 Ngid: 0 Pid: 2490870 PPid: 2490869 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2490870 NSpid: 2490870 NSpgid: 2490086 NSsid: 2490086 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98200 kB VmRSS: 98200 kB RssAnon: 59904 kB RssFile: 38296 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 556 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 45 nonvoluntary_ctxt_switches: 99 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2490870', 'Ngid': '0', 'Pid': '2490870', 'PPid': '2490869', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2490870', 'NSpid': '2490870', 'NSpgid': '2490086', 'NSsid': '2490086', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98200 kB', 'VmRSS': '98200 kB', 'RssAnon': '59904 kB', 'RssFile': '38296 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '556 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '45', 'nonvoluntary_ctxt_switches': '99'} ('datou_batch_current', '2490870', '1106908', '0', '1106884', '865636', '98200', b'', 'marlene', '4012257') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28277898) 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 (4012257 ) ) 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 (28277898) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1393016679, 'portfolio_id': 28277898}, {'photo_id': 1393016677, 'portfolio_id': 28277898}, {'photo_id': 1393016675, 'portfolio_id': 28277898}, {'photo_id': 1393016602, 'portfolio_id': 28277898}, {'photo_id': 1393016587, 'portfolio_id': 28277898}, {'photo_id': 1393016582, 'portfolio_id': 28277898}, {'photo_id': 1393016578, 'portfolio_id': 28277898}, {'photo_id': 1393016575, 'portfolio_id': 28277898}, {'photo_id': 1393016572, 'portfolio_id': 28277898}, {'photo_id': 1393016538, 'portfolio_id': 28277898}, {'photo_id': 1393016536, 'portfolio_id': 28277898}, {'photo_id': 1393016533, 'portfolio_id': 28277898}, {'photo_id': 1393016531, 'portfolio_id': 28277898}, {'photo_id': 1393016528, 'portfolio_id': 28277898}] map_portfolio_id_photo_id: {28277898: [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528]} ##### 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.01591634750366211 #### 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 Nov 6 22:19:27 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 (28277898) 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 : 28277898 get user id for portfolio 28277898 get sub ptf for main ptf 28277898, type 3726 and hashtags ['kraft', 'mal_croppe', 'environnement', 'plastique', 'Carton_brun', 'Carton_gris', 'metal', 'Teint_Dans_La_Masse', 'flou', 'papier', 'autre_refus', 'cartonnette'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28277898 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28277898 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[28277898, 28277930, 3726, 0.5, 493202403, 979], [28277898, 28277931, 3726, 0.5, 2107755527, 979], [28277898, 28277932, 3726, 0.5, 493012381, 979], [28277898, 28277933, 3726, 0.5, 492725882, 979], [28277898, 28277934, 3726, 0.5, 2107753024, 979], [28277898, 28277935, 3726, 0.5, 2107753020, 979], [28277898, 28277936, 3726, 0.5, 492628673, 979], [28277898, 28277937, 3726, 0.5, 2107752385, 979], [28277898, 28277938, 3726, 0.5, 492777938, 979], [28277898, 28277939, 3726, 0.5, 492668766, 979], [28277898, 28277940, 3726, 0.5, 2107752406, 979], [28277898, 28277941, 3726, 0.5, 702398920, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28277898 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28277898 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 28277898, 'sub_port_id': 28277930, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135797, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'mal_croppe': {'main_port_id': 28277898, 'sub_port_id': 28277931, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135798, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'environnement': {'main_port_id': 28277898, 'sub_port_id': 28277932, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135799, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'plastique': {'main_port_id': 28277898, 'sub_port_id': 28277933, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135800, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'Carton_brun': {'main_port_id': 28277898, 'sub_port_id': 28277934, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135801, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'Carton_gris': {'main_port_id': 28277898, 'sub_port_id': 28277935, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135802, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'metal': {'main_port_id': 28277898, 'sub_port_id': 28277936, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135803, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 28277898, 'sub_port_id': 28277937, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135804, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'flou': {'main_port_id': 28277898, 'sub_port_id': 28277938, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135805, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'papier': {'main_port_id': 28277898, 'sub_port_id': 28277939, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135806, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'autre_refus': {'main_port_id': 28277898, 'sub_port_id': 28277940, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135807, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}, 'cartonnette': {'main_port_id': 28277898, 'sub_port_id': 28277941, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135808, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 28), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28277930 , 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=28277898 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 (28277930) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277931 , 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=28277898 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 (28277931) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277932 , 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=28277898 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 (28277932) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277933 , 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=28277898 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 (28277933) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277934 , 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=28277898 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 (28277934) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277935 , 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=28277898 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 (28277935) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277936 , 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=28277898 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 (28277936) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277937 , 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=28277898 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 (28277937) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277938 , 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=28277898 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 (28277938) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277939 , 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=28277898 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 (28277939) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277940 , 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=28277898 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 (28277940) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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 28277941 , 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=28277898 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 (28277941) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28277898) result : ((1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) 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`=28277898 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28277898 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_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__06112025_22_15_04_010157_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[28277898, 28277943, 4417, 0.5, 493202403, 979], [28277898, 28277944, 4417, 0.5, 2107755527, 979], [28277898, 28277945, 4417, 0.5, 493012381, 979], [28277898, 28277946, 4417, 0.5, 492725882, 979], [28277898, 28277947, 4417, 0.5, 2107753024, 979], [28277898, 28277948, 4417, 0.5, 2107753020, 979], [28277898, 28277949, 4417, 0.5, 492628673, 979], [28277898, 28277950, 4417, 0.5, 2107752385, 979], [28277898, 28277951, 4417, 0.5, 492777938, 979], [28277898, 28277952, 4417, 0.5, 492668766, 979], [28277898, 28277953, 4417, 0.5, 2107752406, 979], [28277898, 28277954, 4417, 0.5, 702398920, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28277898 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28277898 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','mal_croppe','environnement','plastique','Carton_brun','Carton_gris','metal','Teint_Dans_La_Masse','flou','papier','autre_refus','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 28277898, 'sub_port_id': 28277943, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135809, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'mal_croppe': {'main_port_id': 28277898, 'sub_port_id': 28277944, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135810, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'environnement': {'main_port_id': 28277898, 'sub_port_id': 28277945, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135811, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'plastique': {'main_port_id': 28277898, 'sub_port_id': 28277946, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135812, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'Carton_brun': {'main_port_id': 28277898, 'sub_port_id': 28277947, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135813, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'Carton_gris': {'main_port_id': 28277898, 'sub_port_id': 28277948, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135814, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'metal': {'main_port_id': 28277898, 'sub_port_id': 28277949, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135815, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 28277898, 'sub_port_id': 28277950, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135816, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'flou': {'main_port_id': 28277898, 'sub_port_id': 28277951, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135817, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'papier': {'main_port_id': 28277898, 'sub_port_id': 28277952, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135818, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'autre_refus': {'main_port_id': 28277898, 'sub_port_id': 28277953, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135819, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}, 'cartonnette': {'main_port_id': 28277898, 'sub_port_id': 28277954, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19135820, 'last_updated_at': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 11, 6, 22, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 11, 6, 22, 19, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277943,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277930 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277944,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277931 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277945,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277932 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277946,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277933 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277947,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277934 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277948,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277935 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277949,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277936 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277950,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277937 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277951,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277938 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277952,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277939 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277953,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277940 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28277954,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28277941 lien utilise dans velours : https://marlene.fotonower.com/velours/28277943,28277944,28277945,28277946,28277947,28277948,28277949,28277950,28277951,28277952,28277953,28277954?tags=kraft,mal_croppe,environnement,plastique,Carton_brun,Carton_gris,metal,Teint_Dans_La_Masse,flou,papier,autre_refus,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28277898]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] map_info['map_portfolio_photo'] : {28277898: [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528]} final : False mtd_id 4302 list_pids : [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] Looping around the photos to save general results len do output : 1 /28277898. 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, '4012257') ('4302', '28277898', '1393016679', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016677', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016675', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016602', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016587', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016582', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016578', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016575', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016572', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016538', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016536', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016533', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016531', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016528', None, None, None, None, None, '4012257') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '28277898', "{'kraft': 28277930, 'mal_croppe': 28277931, 'environnement': 28277932, 'plastique': 28277933, 'Carton_brun': 28277934, 'Carton_gris': 28277935, 'metal': 28277936, 'Teint_Dans_La_Masse': 28277937, 'flou': 28277938, 'papier': 28277939, 'autre_refus': 28277940, 'cartonnette': 28277941}", None, None, None, None, '4012257'), ('4302', '28277898', '1393016679', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016677', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016675', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016602', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016587', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016582', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016578', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016575', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016572', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016538', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016536', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016533', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016531', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016528', None, None, None, None, None, '4012257')] time used for this insertion : 0.016599655151367188 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.2109432220458984 time spend to save output : 0.016983747482299805 total time spend for step 1 : 2.2279269695281982 step2:final Thu Nov 6 22:19:30 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 (28277898) 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 28277898 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1393016538,1393016536,1393016533,1393016531,1393016528,1393016602,1393016587,1393016582,1393016578,1393016575,1393016572,1393016679,1393016677,1393016675); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28277898]) Inside saveOutput : final : False verbose : True original output for save of step final : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} new output for save of step final : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] map_info['map_portfolio_photo'] : {28277898: [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528]} final : False mtd_id 4302 list_pids : [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] Looping around the photos to save general results len do output : 14 /1393016679.Didn't retrieve data . /1393016677.Didn't retrieve data . /1393016675.Didn't retrieve data . /1393016602.Didn't retrieve data . /1393016587.Didn't retrieve data . /1393016582.Didn't retrieve data . /1393016578.Didn't retrieve data . /1393016575.Didn't retrieve data . /1393016572.Didn't retrieve data . /1393016538.Didn't retrieve data . /1393016536.Didn't retrieve data . /1393016533.Didn't retrieve data . /1393016531.Didn't retrieve data . /1393016528.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, '4012257') ('4302', '28277898', '1393016679', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016677', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016675', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016602', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016587', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016582', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016578', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016575', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016572', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016538', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016536', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016533', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016531', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016528', None, None, None, None, None, '4012257') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '28277898', '1393016679', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016677', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016675', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016602', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016587', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016582', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016578', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016575', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016572', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016538', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016536', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016533', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016531', '0.0', None, None, None, None, '4012257'), ('4302', '28277898', '1393016528', '0.0', None, None, None, None, '4012257')] time used for this insertion : 0.01493215560913086 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.014384031295776367 time spend to save output : 0.015669584274291992 total time spend for step 2 : 0.03005361557006836 step3:velours_tree Thu Nov 6 22:19:30 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 : {28277898: [{'kraft': 28277930, 'mal_croppe': 28277931, 'environnement': 28277932, 'plastique': 28277933, 'Carton_brun': 28277934, 'Carton_gris': 28277935, 'metal': 28277936, 'Teint_Dans_La_Masse': 28277937, 'flou': 28277938, 'papier': 28277939, 'autre_refus': 28277940, 'cartonnette': 28277941}]} input_args_next_step : {28277898: ()} output_args : {28277898: [{'kraft': 28277930, 'mal_croppe': 28277931, 'environnement': 28277932, 'plastique': 28277933, 'Carton_brun': 28277934, 'Carton_gris': 28277935, 'metal': 28277936, 'Teint_Dans_La_Masse': 28277937, 'flou': 28277938, 'papier': 28277939, 'autre_refus': 28277940, 'cartonnette': 28277941}]} args : 28277898 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 : ({'kraft': 28277930, 'mal_croppe': 28277931, 'environnement': 28277932, 'plastique': 28277933, 'Carton_brun': 28277934, 'Carton_gris': 28277935, 'metal': 28277936, 'Teint_Dans_La_Masse': 28277937, 'flou': 28277938, 'papier': 28277939, 'autre_refus': 28277940, 'cartonnette': 28277941},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28277898) 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([28277898]) 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.3212146759033203 time spend to save output : 6.532669067382812e-05 total time spend for step 3 : 0.32128000259399414 step4:send_mail_cod Thu Nov 6 22:19:30 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 : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} input_args_next_step : {1393016679: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016679 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016677 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016675 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016602 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016587 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016582 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016578 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016575 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016572 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016538 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016536 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016533 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016531 depend.output_id : 0 input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ()} output_args : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',)} args : 1393016528 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 : {28277898: [{'kraft': 28277930, 'mal_croppe': 28277931, 'environnement': 28277932, 'plastique': 28277933, 'Carton_brun': 28277934, 'Carton_gris': 28277935, 'metal': 28277936, 'Teint_Dans_La_Masse': 28277937, 'flou': 28277938, 'papier': 28277939, 'autre_refus': 28277940, 'cartonnette': 28277941}]} input_args_next_step : {1393016679: ('0.0',), 1393016677: ('0.0',), 1393016675: ('0.0',), 1393016602: ('0.0',), 1393016587: ('0.0',), 1393016582: ('0.0',), 1393016578: ('0.0',), 1393016575: ('0.0',), 1393016572: ('0.0',), 1393016538: ('0.0',), 1393016536: ('0.0',), 1393016533: ('0.0',), 1393016531: ('0.0',), 1393016528: ('0.0',), 28277898: ()} output_args : {28277898: [{'kraft': 28277930, 'mal_croppe': 28277931, 'environnement': 28277932, 'plastique': 28277933, 'Carton_brun': 28277934, 'Carton_gris': 28277935, 'metal': 28277936, 'Teint_Dans_La_Masse': 28277937, 'flou': 28277938, 'papier': 28277939, 'autre_refus': 28277940, 'cartonnette': 28277941}]} args : 28277898 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 :15, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28277898) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1393016679,1393016677,1393016675,1393016602,1393016587,1393016582,1393016578,1393016575,1393016572,1393016538,1393016536,1393016533,1393016531,1393016528) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1393016528 begin to download photo : 1393016536 begin to download photo : 1393016575 begin to download photo : 1393016587 begin to download photo : 1393016677 download finish for photo 1393016528 begin to download photo : 1393016531 download finish for photo 1393016677 begin to download photo : 1393016679 download finish for photo 1393016536 begin to download photo : 1393016538 download finish for photo 1393016587 begin to download photo : 1393016602 download finish for photo 1393016575 begin to download photo : 1393016578 download finish for photo 1393016531 begin to download photo : 1393016533 download finish for photo 1393016538 begin to download photo : 1393016572 download finish for photo 1393016602 begin to download photo : 1393016675 download finish for photo 1393016679 download finish for photo 1393016578 begin to download photo : 1393016582 download finish for photo 1393016533 download finish for photo 1393016675 download finish for photo 1393016572 download finish for photo 1393016582 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette282779301762463970/ imagette282779311762463970/ imagette282779331762463970/ imagette282779361762463970/ imagette282779381762463971/ imagette282779401762463971/ imagette282779411762463971/ imagette282779341762463971/ imagette282779351762463971/ imagette282779371762463971/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P28277898_06-11-2025_22_19_30.pdf 28277930 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277930 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779301762463970 28277931 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277931 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779311762463970 28277933 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277933 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779331762463970 28277936 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277936 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779361762463970 28277938 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277938 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779381762463971 28277940 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277940 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779401762463971 28277941 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277941 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779411762463971 28277934 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277934 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779341762463971 28277935 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277935 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779351762463971 28277937 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277937 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette282779371762463971 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28277898 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28277943,28277944,28277945,28277946,28277947,28277948,28277949,28277950,28277951,28277952,28277953,28277954?tags=kraft,mal_croppe,environnement,plastique,Carton_brun,Carton_gris,metal,Teint_Dans_La_Masse,flou,papier,autre_refus,cartonnette your option no_mail is active, we will not send the real mail to your client args[1393016679] : ('0.0',) no score found for photo 1393016679 We are sending mail with results at report@fotonower.com args[1393016677] : ('0.0',) no score found for photo 1393016677 We are sending mail with results at report@fotonower.com args[1393016675] : ('0.0',) no score found for photo 1393016675 We are sending mail with results at report@fotonower.com args[1393016602] : ('0.0',) no score found for photo 1393016602 We are sending mail with results at report@fotonower.com args[1393016587] : ('0.0',) no score found for photo 1393016587 We are sending mail with results at report@fotonower.com args[1393016582] : ('0.0',) no score found for photo 1393016582 We are sending mail with results at report@fotonower.com args[1393016578] : ('0.0',) no score found for photo 1393016578 We are sending mail with results at report@fotonower.com args[1393016575] : ('0.0',) no score found for photo 1393016575 We are sending mail with results at report@fotonower.com args[1393016572] : ('0.0',) no score found for photo 1393016572 We are sending mail with results at report@fotonower.com args[1393016538] : ('0.0',) no score found for photo 1393016538 We are sending mail with results at report@fotonower.com args[1393016536] : ('0.0',) no score found for photo 1393016536 We are sending mail with results at report@fotonower.com args[1393016533] : ('0.0',) no score found for photo 1393016533 We are sending mail with results at report@fotonower.com args[1393016531] : ('0.0',) no score found for photo 1393016531 We are sending mail with results at report@fotonower.com args[1393016528] : ('0.0',) no score found for photo 1393016528 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277898 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_P28277898_06-11-2025_22_19_30.pdf results_Auto_P28277898_06-11-2025_22_19_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28277898_06-11-2025_22_19_30.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','28277898','results_Auto_P28277898_06-11-2025_22_19_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28277898_06-11-2025_22_19_30.pdf','pdf','','0.13','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28277898]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] map_info['map_portfolio_photo'] : {28277898: [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528]} final : False mtd_id 4302 list_pids : [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] 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, '4012257') ('4302', '28277898', '1393016679', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016677', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016675', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016602', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016587', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016582', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016578', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016575', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016572', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016538', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016536', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016533', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016531', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016528', None, None, None, None, None, '4012257') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '28277898', '1393016679', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016677', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016675', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016602', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016587', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016582', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016578', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016575', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016572', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016538', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016536', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016533', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016531', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016528', None, None, None, None, None, '4012257')] time used for this insertion : 0.017309904098510742 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7238287925720215 time spend to save output : 0.017664432525634766 total time spend for step 4 : 1.7414932250976562 step5:split_time_score Thu Nov 6 22:19:32 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 : ['28277898'] 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 : [('28277898',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28277898) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1393016677: {'path': 'temp/1762463970_2490870_1393016677_bd48c1d9e6543d90e579ac220747573f.jpg', 'extension': 'jpg'}, 1393016679: {'path': 'temp/1762463970_2490870_1393016679_c15b922886a2aaa118aa5b0c68527972.jpg', 'extension': 'jpg'}, 1393016528: {'path': 'temp/1762463970_2490870_1393016528_b44680dd528ada852a6812027393d3cb.jpg', 'extension': 'jpg'}, 1393016531: {'path': 'temp/1762463970_2490870_1393016531_39e06c5235269fd5b8389fc9e9bb2b43.jpg', 'extension': 'jpg'}, 1393016533: {'path': 'temp/1762463970_2490870_1393016533_6dbac7ee148b671ad26590bc80fac955.jpg', 'extension': 'jpg'}, 1393016587: {'path': 'temp/1762463970_2490870_1393016587_08436c1211743c62d890aa3ad802711b.jpg', 'extension': 'jpg'}, 1393016602: {'path': 'temp/1762463970_2490870_1393016602_f157f6073c3beca1163d685ac9157f18.jpg', 'extension': 'jpg'}, 1393016675: {'path': 'temp/1762463970_2490870_1393016675_c2e3d6bdb1e2f89d9d452d69e94f6342.jpg', 'extension': 'jpg'}, 1393016536: {'path': 'temp/1762463970_2490870_1393016536_b4220cc8ea960be808276455e6749433.jpg', 'extension': 'jpg'}, 1393016538: {'path': 'temp/1762463970_2490870_1393016538_7b265488d07414ae3f84134de13ab2a2.jpg', 'extension': 'jpg'}, 1393016572: {'path': 'temp/1762463970_2490870_1393016572_11609220d20e0f86d52db0c4be08b0a0.jpg', 'extension': 'jpg'}, 1393016575: {'path': 'temp/1762463970_2490870_1393016575_6ef79a59219d45bdcab256797007969f.jpg', 'extension': 'jpg'}, 1393016578: {'path': 'temp/1762463970_2490870_1393016578_a9122a62a18396394e91b039a5040cbc.jpg', 'extension': 'jpg'}, 1393016582: {'path': 'temp/1762463970_2490870_1393016582_401f9e939a19a72ef532d6759f4e0f36.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 = 28277898; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28277898 group by h (('22', 14),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28277898 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 (28277898) 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 (28277898) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 06112025 28277898 Nombre de photos uploadées : 14 / 23040 (0%) 06112025 28277898 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 06112025 28277898 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1393016538, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/7b265488d07414ae3f84134de13ab2a2.jpg', 'username': None, 'uploaded_at': 1762463767, 'text': 'image_06112025_22_15_04_10157.jpg'}, {'photo_id': 1393016536, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/b4220cc8ea960be808276455e6749433.jpg', 'username': None, 'uploaded_at': 1762463767, 'text': 'image_06112025_22_15_14_10133.jpg'}, {'photo_id': 1393016533, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/6dbac7ee148b671ad26590bc80fac955.jpg', 'username': None, 'uploaded_at': 1762463767, 'text': 'image_06112025_22_15_24_10134.jpg'}, {'photo_id': 1393016531, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/6/39e06c5235269fd5b8389fc9e9bb2b43.jpg', 'username': None, 'uploaded_at': 1762463767, 'text': 'image_06112025_22_15_35_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 8.106231689453125e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009024143218994141 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 28277898, '2025-11-06' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-11-06' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2521261,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.23636484146118164 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= 2521261 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2521261, 'dashboard_run_id': 2536876, 'mtr_portfolio_id': 28276074, 'dashboard_result_id': 16945414, '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_P28276074_06-11-2025_21_48_57.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28276087, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28276088, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28276089, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28276090, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28276091, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28276092, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28276093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28276094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28276095, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28276096, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28276097, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28276098, 'pht': 3726}}"}, {'dashboat_entry_day': 2521261, 'dashboard_run_id': 2536876, 'mtr_portfolio_id': 28276638, 'dashboard_result_id': 16945415, '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_P28276638_06-11-2025_22_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28276657, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28276658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28276660, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28276661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28276662, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28276664, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28276665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28276666, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28276667, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28276668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28276669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28276670, 'pht': 3726}}"}, {'dashboat_entry_day': 2521261, 'dashboard_run_id': 2536876, 'mtr_portfolio_id': 28277211, 'dashboard_result_id': 16945416, '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_P28277211_06-11-2025_22_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28277260, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28277261, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28277262, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28277263, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28277264, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28277265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28277266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28277267, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28277268, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28277269, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28277270, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28277271, 'pht': 3726}}"}, {'dashboat_entry_day': 2521261, 'dashboard_run_id': 2536876, 'mtr_portfolio_id': 28277898, 'dashboard_result_id': 16945417, '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 = 28276074 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': 4011970, 'mtr_portfolio_id': 28276074, 'created_at': datetime.datetime(2025, 11, 6, 21, 48, 57), 'result': '0.03483331679015249', 'result_long': None, 'result_double': None}] Qualite : 0.03483331679015249 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28276074 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28276074_06-11-2025_21_48_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28276074 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_P28276074_06-11-2025_21_48_57.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28276087, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28276088, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28276089, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28276090, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28276091, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28276092, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28276093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28276094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28276095, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28276096, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28276097, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28276098, 'pht': 3726}}" where mtr_portfolio_id = 28276074 and dashboard_run_id = 2536876 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`=28276074 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16945414, 0.03483331679015249, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28276074_06-11-2025_21_48_57.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 28276087, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28276088, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28276089, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28276090, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28276091, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28276092, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28276093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28276094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28276095, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28276096, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28276097, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28276098, '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 = 28276638 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': 4012047, 'mtr_portfolio_id': 28276638, 'created_at': datetime.datetime(2025, 11, 6, 22, 3), 'result': '0.04646444482981485', 'result_long': None, 'result_double': None}] Qualite : 0.04646444482981485 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28276638 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28276638_06-11-2025_22_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28276638 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_P28276638_06-11-2025_22_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28276657, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28276658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28276660, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28276661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28276662, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28276664, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28276665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28276666, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28276667, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28276668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28276669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28276670, 'pht': 3726}}" where mtr_portfolio_id = 28276638 and dashboard_run_id = 2536876 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`=28276638 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16945415, 0.04646444482981485, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28276638_06-11-2025_22_03_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28276657, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28276658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28276660, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28276661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28276662, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28276664, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28276665, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28276666, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28276667, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28276668, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28276669, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28276670, '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 = 28277211 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': 4012157, 'mtr_portfolio_id': 28277211, 'created_at': datetime.datetime(2025, 11, 6, 22, 18, 59), 'result': '0.044610808471486914', 'result_long': None, 'result_double': None}] Qualite : 0.044610808471486914 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28277211 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28277211_06-11-2025_22_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28277211 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_P28277211_06-11-2025_22_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28277260, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28277261, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28277262, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28277263, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28277264, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28277265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28277266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28277267, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28277268, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28277269, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28277270, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28277271, 'pht': 3726}}" where mtr_portfolio_id = 28277211 and dashboard_run_id = 2536876 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`=28277211 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16945416, 0.044610808471486914, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28277211_06-11-2025_22_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28277260, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28277261, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28277262, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28277263, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28277264, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28277265, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28277266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28277267, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28277268, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28277269, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28277270, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28277271, '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 = 28277898 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 = 28277898 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 = 28277898 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28277898 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 = 28277898 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 = 28277898 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28277898_06-11-2025_22_19_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28277898 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_P28277898_06-11-2025_22_19_30.pdf'}" where mtr_portfolio_id = 28277898 and dashboard_run_id = 2536876 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28276074,28276638,28277211,28277898) result : ((1393013538,), (1393013540,), (1393013543,), (1393013548,), (1393013598,), (1393013600,), (1393013604,), (1393013608,), (1393013619,), (1393013668,), (1393013670,), (1393013671,), (1393013672,), (1393013710,), (1393013711,), (1393013712,), (1393013715,), (1393013718,), (1393013721,), (1393013738,), (1393013746,), (1393013749,), (1393013754,), (1393013814,), (1393013818,), (1393013821,), (1393013875,), (1393013878,), (1393013880,), (1393013883,), (1393013923,), (1393013924,), (1393013925,), (1393013926,), (1393013954,), (1393013956,), (1393014011,), (1393014013,), (1393014015,), (1393014018,), (1393014021,), (1393014089,), (1393014092,), (1393014168,), (1393014171,), (1393014172,), (1393014174,), (1393014178,), (1393014244,), (1393014246,), (1393014247,), (1393014250,), (1393014254,), (1393014347,), (1393014370,), (1393014373,), (1393014377,), (1393014380,), (1393014392,), (1393014393,), (1393014395,), (1393014397,), (1393014479,), (1393014470,), (1393014472,), (1393014473,), (1393014475,), (1393014519,), (1393014532,), (1393014540,), (1393014546,), (1393014584,), (1393014586,), (1393014588,), (1393014591,), (1393014596,), (1393014642,), (1393014644,), (1393014645,), (1393014699,), (1393014701,), (1393014713,), (1393014768,), (1393014769,), (1393014770,), (1393014771,), (1393014774,), (1393014828,), (1393014831,), (1393014833,), (1393014835,), (1393014838,), (1393014899,), (1393014900,), (1393014903,), (1393014907,), (1393014916,), (1393014923,), (1393014947,), (1393014948,), (1393014949,), (1393014954,), (1393014957,), (1393014960,), (1393014964,), (1393014968,), (1393014969,), (1393015007,), (1393015009,), (1393015013,), (1393015025,), (1393015029,), (1393015032,), (1393015071,), (1393015073,), (1393015075,), (1393015077,), (1393015098,), (1393015101,), (1393015102,), (1393015103,), (1393015109,), (1393015112,), (1393015158,), (1393015161,), (1393015164,), (1393015168,), (1393015174,), (1393015180,), (1393015292,), (1393015297,), (1393015302,), (1393015373,), (1393015364,), (1393015365,), (1393015366,), (1393015368,), (1393015431,), (1393015439,), (1393015440,), (1393015441,), (1393015465,), (1393015492,), (1393015494,), (1393015497,), (1393015500,), (1393015504,), (1393015507,), (1393015548,), (1393015550,), (1393015551,), (1393015552,), (1393015554,), (1393015557,), (1393015598,), (1393015600,), (1393015602,), (1393015604,), (1393015665,), (1393015667,), (1393015669,), (1393015673,), (1393015701,), (1393015738,), (1393015800,), (1393015803,), (1393015804,), (1393015806,), (1393015869,), (1393015877,), (1393015879,), (1393015882,), (1393015886,), (1393015937,), (1393015938,), (1393015939,), (1393015941,), (1393015945,), (1393015949,), (1393015999,), (1393016001,), (1393016003,), (1393016064,), (1393016078,), (1393016085,), (1393016088,), (1393016092,), (1393016096,), (1393016116,), (1393016134,), (1393016136,), (1393016148,), (1393016151,), (1393016193,), (1393016199,), (1393016201,), (1393016255,), (1393016258,), (1393016260,), (1393016263,), (1393016268,), (1393016282,), (1393016321,), (1393016323,), (1393016325,), (1393016329,), (1393016539,), (1393016528,), (1393016531,), (1393016533,), (1393016536,), (1393016538,), (1393016572,), (1393016575,), (1393016578,), (1393016582,), (1393016587,), (1393016602,), (1393016675,), (1393016677,), (1393016679,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'06112025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28277898]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] map_info['map_portfolio_photo'] : {28277898: [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528]} final : True mtd_id 4302 list_pids : [1393016679, 1393016677, 1393016675, 1393016602, 1393016587, 1393016582, 1393016578, 1393016575, 1393016572, 1393016538, 1393016536, 1393016533, 1393016531, 1393016528] Looping around the photos to save general results len do output : 1 /28277898Didn'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, '4012257') ('4302', '28277898', '1393016679', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016677', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016675', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016602', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016587', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016582', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016578', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016575', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016572', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016538', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016536', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016533', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016531', None, None, None, None, None, '4012257') ('4302', None, None, None, None, None, None, None, '4012257') ('4302', '28277898', '1393016528', None, None, None, None, None, '4012257') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '28277898', 'None', None, None, None, None, '4012257'), ('4302', '28277898', '1393016679', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016677', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016675', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016602', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016587', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016582', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016578', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016575', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016572', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016538', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016536', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016533', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016531', None, None, None, None, None, '4012257'), ('4302', '28277898', '1393016528', None, None, None, None, None, '4012257')] time used for this insertion : 0.026587724685668945 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5466351509094238 time spend to save output : 0.026857852935791016 total time spend for step 5 : 0.5734930038452148 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 (4012257) 2.09user 2.00system 0:07.11elapsed 57%CPU (0avgtext+0avgdata 159832maxresident)k 120inputs+8384outputs (3major+64441minor)pagefaults 0swaps