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 : 970607 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 (3264061) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3264061) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788046 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3264061'] with mtr_portfolio_ids : ['24788046'] and first list_photo_ids : [] new path : /proc/970607/ Name: python3 Umask: 0002 State: R (running) Tgid: 970607 Ngid: 0 Pid: 970607 PPid: 970606 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 970607 NSpid: 970607 NSpgid: 969277 NSsid: 969277 VmPeak: 1106864 kB VmSize: 1106864 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99708 kB VmRSS: 99708 kB RssAnon: 59816 kB RssFile: 39892 kB RssShmem: 0 kB VmData: 865616 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 45 nonvoluntary_ctxt_switches: 86 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '970607', 'Ngid': '0', 'Pid': '970607', 'PPid': '970606', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '970607', 'NSpid': '970607', 'NSpgid': '969277', 'NSsid': '969277', 'VmPeak': '1106864 kB', 'VmSize': '1106864 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99708 kB', 'VmRSS': '99708 kB', 'RssAnon': '59816 kB', 'RssFile': '39892 kB', 'RssShmem': '0 kB', 'VmData': '865616 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '45', 'nonvoluntary_ctxt_switches': '86'} ('datou_batch_current', '970607', '1106864', '0', '1106864', '865616', '99708', b'', 'marlene', '3264061') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (24788046) 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 (3264061 ) ) 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 (24788046) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1371480608, 'portfolio_id': 24788046}, {'photo_id': 1371480606, 'portfolio_id': 24788046}, {'photo_id': 1371480604, 'portfolio_id': 24788046}, {'photo_id': 1371480603, 'portfolio_id': 24788046}, {'photo_id': 1371480601, 'portfolio_id': 24788046}, {'photo_id': 1371480600, 'portfolio_id': 24788046}, {'photo_id': 1371480585, 'portfolio_id': 24788046}, {'photo_id': 1371480583, 'portfolio_id': 24788046}, {'photo_id': 1371480580, 'portfolio_id': 24788046}, {'photo_id': 1371480573, 'portfolio_id': 24788046}, {'photo_id': 1371480571, 'portfolio_id': 24788046}, {'photo_id': 1371480570, 'portfolio_id': 24788046}] map_portfolio_id_photo_id: {24788046: [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570]} ##### 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.014797449111938477 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Jul 10 07:18:57 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 (24788046) 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 : 24788046 get user id for portfolio 24788046 get sub ptf for main ptf 24788046, type 3726 and hashtags ['papier', 'kraft', 'Carton_brun', 'mal_croppe', 'cartonnette', 'metal', 'plastique', 'autre_refus', 'Carton_gris', 'flou', 'Teint_Dans_La_Masse', 'environnement'] 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`=24788046 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) 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`=24788046 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_3726_environnement_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)[[24788046, 24788065, 3726, 0.5, 492668766, 979], [24788046, 24788066, 3726, 0.5, 493202403, 979], [24788046, 24788067, 3726, 0.5, 2107753024, 979], [24788046, 24788068, 3726, 0.5, 2107755527, 979], [24788046, 24788069, 3726, 0.5, 702398920, 979], [24788046, 24788070, 3726, 0.5, 492628673, 979], [24788046, 24788071, 3726, 0.5, 492725882, 979], [24788046, 24788072, 3726, 0.5, 2107752406, 979], [24788046, 24788073, 3726, 0.5, 2107753020, 979], [24788046, 24788074, 3726, 0.5, 492777938, 979], [24788046, 24788075, 3726, 0.5, 2107752385, 979], [24788046, 24788076, 3726, 0.5, 493012381, 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`=24788046 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) 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`=24788046 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 24788046, 'sub_port_id': 24788065, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671158, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'kraft': {'main_port_id': 24788046, 'sub_port_id': 24788066, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671159, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'Carton_brun': {'main_port_id': 24788046, 'sub_port_id': 24788067, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671160, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'mal_croppe': {'main_port_id': 24788046, 'sub_port_id': 24788068, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671161, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'cartonnette': {'main_port_id': 24788046, 'sub_port_id': 24788069, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671162, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'metal': {'main_port_id': 24788046, 'sub_port_id': 24788070, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671163, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'plastique': {'main_port_id': 24788046, 'sub_port_id': 24788071, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671164, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'autre_refus': {'main_port_id': 24788046, 'sub_port_id': 24788072, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671165, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'Carton_gris': {'main_port_id': 24788046, 'sub_port_id': 24788073, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671166, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'flou': {'main_port_id': 24788046, 'sub_port_id': 24788074, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671167, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 24788046, 'sub_port_id': 24788075, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671168, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}, 'environnement': {'main_port_id': 24788046, 'sub_port_id': 24788076, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671169, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788065 , 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=24788046 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 (24788065) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788066 , 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=24788046 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 (24788066) result : ((1371480618,), (1371480619,), (1371480620,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788067 , 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=24788046 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 (24788067) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788068 , 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=24788046 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 (24788068) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788069 , 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=24788046 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 (24788069) result : ((1371480617,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788070 , 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=24788046 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 (24788070) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788071 , 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=24788046 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 (24788071) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788072 , 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=24788046 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 (24788072) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788073 , 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=24788046 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 (24788073) result : ((1371480616,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788074 , 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=24788046 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 (24788074) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788075 , 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=24788046 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 (24788075) result : ((1371480614,), (1371480615,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24788076 , 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=24788046 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 (24788076) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24788046) result : ((1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) 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 (1371480600) and cspi.crop_hashtag_id = chi.id; 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`=24788046 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) 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`=24788046 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_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__10072025_07_15_03_10156_4417_environnement_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)[[24788046, 24788077, 4417, 0.5, 492668766, 979], [24788046, 24788078, 4417, 0.5, 493202403, 979], [24788046, 24788079, 4417, 0.5, 2107753024, 979], [24788046, 24788080, 4417, 0.5, 2107755527, 979], [24788046, 24788081, 4417, 0.5, 702398920, 979], [24788046, 24788082, 4417, 0.5, 492628673, 979], [24788046, 24788083, 4417, 0.5, 492725882, 979], [24788046, 24788084, 4417, 0.5, 2107752406, 979], [24788046, 24788085, 4417, 0.5, 2107753020, 979], [24788046, 24788086, 4417, 0.5, 492777938, 979], [24788046, 24788087, 4417, 0.5, 2107752385, 979], [24788046, 24788088, 4417, 0.5, 493012381, 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`=24788046 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) 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`=24788046 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_brun','mal_croppe','cartonnette','metal','plastique','autre_refus','Carton_gris','flou','Teint_Dans_La_Masse','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 24788046, 'sub_port_id': 24788077, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671170, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'kraft': {'main_port_id': 24788046, 'sub_port_id': 24788078, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671171, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'Carton_brun': {'main_port_id': 24788046, 'sub_port_id': 24788079, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671172, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'mal_croppe': {'main_port_id': 24788046, 'sub_port_id': 24788080, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671173, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'cartonnette': {'main_port_id': 24788046, 'sub_port_id': 24788081, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671174, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'metal': {'main_port_id': 24788046, 'sub_port_id': 24788082, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671175, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'plastique': {'main_port_id': 24788046, 'sub_port_id': 24788083, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671176, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'autre_refus': {'main_port_id': 24788046, 'sub_port_id': 24788084, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671177, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'Carton_gris': {'main_port_id': 24788046, 'sub_port_id': 24788085, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671178, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'flou': {'main_port_id': 24788046, 'sub_port_id': 24788086, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671179, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 24788046, 'sub_port_id': 24788087, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671180, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}, 'environnement': {'main_port_id': 24788046, 'sub_port_id': 24788088, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16671181, 'last_updated_at': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 10, 7, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 10, 7, 18, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788077,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788065 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788078,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788066 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788079,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788067 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788080,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788068 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788081,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788069 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788082,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788070 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788083,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788071 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788084,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788072 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788085,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788073 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788086,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788074 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788087,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788075 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24788088,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24788076 lien utilise dans velours : https://www.fotonower.com/velours/24788077,24788078,24788079,24788080,24788081,24788082,24788083,24788084,24788085,24788086,24788087,24788088?tags=papier,kraft,Carton_brun,mal_croppe,cartonnette,metal,plastique,autre_refus,Carton_gris,flou,Teint_Dans_La_Masse,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24788046]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] map_info['map_portfolio_photo'] : {24788046: [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570]} final : False mtd_id 4302 list_pids : [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] Looping around the photos to save general results len do output : 1 /24788046. 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, '3264061') ('4302', '24788046', '1371480608', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480606', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480604', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480603', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480601', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480600', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480585', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480583', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480580', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480573', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480571', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480570', None, None, None, None, None, '3264061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24788046', "{'papier': 24788065, 'kraft': 24788066, 'Carton_brun': 24788067, 'mal_croppe': 24788068, 'cartonnette': 24788069, 'metal': 24788070, 'plastique': 24788071, 'autre_refus': 24788072, 'Carton_gris': 24788073, 'flou': 24788074, 'Teint_Dans_La_Masse': 24788075, 'environnement': 24788076}", None, None, None, None, '3264061'), ('4302', '24788046', '1371480608', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480606', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480604', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480603', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480601', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480600', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480585', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480583', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480580', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480573', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480571', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480570', None, None, None, None, None, '3264061')] time used for this insertion : 0.21378374099731445 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4153802394866943 time spend to save output : 0.2140369415283203 total time spend for step 1 : 1.6294171810150146 step2:final Thu Jul 10 07:18:59 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 (24788046) 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 24788046 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1371480585,1371480583,1371480580,1371480573,1371480571,1371480570,1371480608,1371480606,1371480604,1371480603,1371480601,1371480600); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24788046]) Inside saveOutput : final : False verbose : True original output for save of step final : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} new output for save of step final : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] map_info['map_portfolio_photo'] : {24788046: [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570]} final : False mtd_id 4302 list_pids : [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] Looping around the photos to save general results len do output : 12 /1371480608.Didn't retrieve data . /1371480606.Didn't retrieve data . /1371480604.Didn't retrieve data . /1371480603.Didn't retrieve data . /1371480601.Didn't retrieve data . /1371480600.Didn't retrieve data . /1371480585.Didn't retrieve data . /1371480583.Didn't retrieve data . /1371480580.Didn't retrieve data . /1371480573.Didn't retrieve data . /1371480571.Didn't retrieve data . /1371480570.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, '3264061') ('4302', '24788046', '1371480608', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480606', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480604', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480603', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480601', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480600', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480585', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480583', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480580', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480573', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480571', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480570', None, None, None, None, None, '3264061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24788046', '1371480608', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480606', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480604', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480603', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480601', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480600', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480585', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480583', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480580', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480573', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480571', '0.019899401868947363', None, None, None, None, '3264061'), ('4302', '24788046', '1371480570', '0.019899401868947363', None, None, None, None, '3264061')] time used for this insertion : 0.12349414825439453 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.13797664642333984 time spend to save output : 0.12406444549560547 total time spend for step 2 : 0.2620410919189453 step3:velours_tree Thu Jul 10 07:18:59 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 : {24788046: [{'papier': 24788065, 'kraft': 24788066, 'Carton_brun': 24788067, 'mal_croppe': 24788068, 'cartonnette': 24788069, 'metal': 24788070, 'plastique': 24788071, 'autre_refus': 24788072, 'Carton_gris': 24788073, 'flou': 24788074, 'Teint_Dans_La_Masse': 24788075, 'environnement': 24788076}]} input_args_next_step : {24788046: ()} output_args : {24788046: [{'papier': 24788065, 'kraft': 24788066, 'Carton_brun': 24788067, 'mal_croppe': 24788068, 'cartonnette': 24788069, 'metal': 24788070, 'plastique': 24788071, 'autre_refus': 24788072, 'Carton_gris': 24788073, 'flou': 24788074, 'Teint_Dans_La_Masse': 24788075, 'environnement': 24788076}]} args : 24788046 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 : ({'papier': 24788065, 'kraft': 24788066, 'Carton_brun': 24788067, 'mal_croppe': 24788068, 'cartonnette': 24788069, 'metal': 24788070, 'plastique': 24788071, 'autre_refus': 24788072, 'Carton_gris': 24788073, 'flou': 24788074, 'Teint_Dans_La_Masse': 24788075, 'environnement': 24788076},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24788046) 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([24788046]) 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.30026888847351074 time spend to save output : 5.412101745605469e-05 total time spend for step 3 : 0.3003230094909668 step4:send_mail_cod Thu Jul 10 07:18:59 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 : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} input_args_next_step : {1371480608: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480608 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480606 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480604 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480603 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480601 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480600 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480585 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480583 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480580 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480573 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480571 depend.output_id : 0 input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ()} output_args : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',)} args : 1371480570 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 : {24788046: [{'papier': 24788065, 'kraft': 24788066, 'Carton_brun': 24788067, 'mal_croppe': 24788068, 'cartonnette': 24788069, 'metal': 24788070, 'plastique': 24788071, 'autre_refus': 24788072, 'Carton_gris': 24788073, 'flou': 24788074, 'Teint_Dans_La_Masse': 24788075, 'environnement': 24788076}]} input_args_next_step : {1371480608: ('0.019899401868947363',), 1371480606: ('0.019899401868947363',), 1371480604: ('0.019899401868947363',), 1371480603: ('0.019899401868947363',), 1371480601: ('0.019899401868947363',), 1371480600: ('0.019899401868947363',), 1371480585: ('0.019899401868947363',), 1371480583: ('0.019899401868947363',), 1371480580: ('0.019899401868947363',), 1371480573: ('0.019899401868947363',), 1371480571: ('0.019899401868947363',), 1371480570: ('0.019899401868947363',), 24788046: ()} output_args : {24788046: [{'papier': 24788065, 'kraft': 24788066, 'Carton_brun': 24788067, 'mal_croppe': 24788068, 'cartonnette': 24788069, 'metal': 24788070, 'plastique': 24788071, 'autre_refus': 24788072, 'Carton_gris': 24788073, 'flou': 24788074, 'Teint_Dans_La_Masse': 24788075, 'environnement': 24788076}]} args : 24788046 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.019899401868947363',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24788046) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1371480608,1371480606,1371480604,1371480603,1371480601,1371480600,1371480585,1371480583,1371480580,1371480573,1371480571,1371480570) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1371480570 begin to download photo : 1371480580 begin to download photo : 1371480600 begin to download photo : 1371480604 download finish for photo 1371480570 begin to download photo : 1371480571 download finish for photo 1371480604 begin to download photo : 1371480606 download finish for photo 1371480580 begin to download photo : 1371480583 download finish for photo 1371480600 begin to download photo : 1371480601 download finish for photo 1371480571 begin to download photo : 1371480573 download finish for photo 1371480601 begin to download photo : 1371480603 download finish for photo 1371480583 begin to download photo : 1371480585 download finish for photo 1371480606 begin to download photo : 1371480608 download finish for photo 1371480573 download finish for photo 1371480608 download finish for photo 1371480603 download finish for photo 1371480585 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24788046_10-07-2025_07_19_00.pdf 24788066 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788066 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371480618: '1752124645_2764848_1371480573_6f212a3041f0425cfb44a704f93823f3_rle_crop_3877923323_0.png', 1371480619: '1752124645_2764848_1371480571_3a3d8301bc0f845df7927fbd9f2bb37a_rle_crop_3877923337_0.png', 1371480620: '1752124645_2764848_1371480570_5328c518eb093e4ed70c4d69c8e923a4_rle_crop_3877923353_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/d577e989c3e0e7dc3c5ca2b9f88ed209_4966364.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/55ea70a39f5e079293cb9701074e47d5_42107605.png change filename to text .imagette247880661752124740/ imagette247880661752124740/1752124645_2764848_1371480571_3a3d8301bc0f845df7927fbd9f2bb37a_rle_crop_3877923337_0.png.png imagette247880661752124740/1752124645_2764848_1371480570_5328c518eb093e4ed70c4d69c8e923a4_rle_crop_3877923353_0.png.png imagette247880661752124740/1752124645_2764848_1371480573_6f212a3041f0425cfb44a704f93823f3_rle_crop_3877923323_0.png.png imagette247880681752124740/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/98aca09033965599d44d2669dfb21a5f_23448613.png imagette247880661752124740 24788068 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788068 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247880681752124740 24788069 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788069 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371480617: '1752124645_2764848_1371480570_5328c518eb093e4ed70c4d69c8e923a4_rle_crop_3877923352_0.png'} change filename to text .imagette247880691752124740/ imagette247880691752124740/1752124645_2764848_1371480570_5328c518eb093e4ed70c4d69c8e923a4_rle_crop_3877923352_0.png.png imagette247880701752124740/ imagette247880711752124740/ imagette247880721752124740/ imagette247880741752124740/ imagette247880671752124740/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/59c8e2d9be4ce8ac81b477c3b924d9ff_23599512.png imagette247880691752124740 24788070 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788070 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247880701752124740 24788071 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788071 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247880711752124740 24788072 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788072 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247880721752124740 24788074 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788074 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247880741752124740 24788067 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788067 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette247880671752124740 24788073 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788073 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371480616: '1752124645_2764848_1371480571_3a3d8301bc0f845df7927fbd9f2bb37a_rle_crop_3877923336_0.png'} change filename to text .imagette247880731752124740/ imagette247880731752124740/1752124645_2764848_1371480571_3a3d8301bc0f845df7927fbd9f2bb37a_rle_crop_3877923336_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/578e10be3ae4f136c95f3780e4d9a10a_79016481.png imagette247880731752124740 24788075 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788075 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1371480614: '1752124645_2764848_1371480573_6f212a3041f0425cfb44a704f93823f3_rle_crop_3877923329_0.png', 1371480615: '1752124645_2764848_1371480571_3a3d8301bc0f845df7927fbd9f2bb37a_rle_crop_3877923339_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/609e897bd63f417717af2d41989bec3e_4137163.png change filename to text .imagette247880751752124740/ imagette247880751752124740/1752124645_2764848_1371480571_3a3d8301bc0f845df7927fbd9f2bb37a_rle_crop_3877923339_0.png.png imagette247880751752124740/1752124645_2764848_1371480573_6f212a3041f0425cfb44a704f93823f3_rle_crop_3877923329_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/6aecfc92b42acec7f917fac00e88a93a_10776595.png imagette247880751752124740 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24788046 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24788077,24788078,24788079,24788080,24788081,24788082,24788083,24788084,24788085,24788086,24788087,24788088?tags=papier,kraft,Carton_brun,mal_croppe,cartonnette,metal,plastique,autre_refus,Carton_gris,flou,Teint_Dans_La_Masse,environnement your option no_mail is active, we will not send the real mail to your client args[1371480608] : ('0.019899401868947363',) no score found for photo 1371480608 We are sending mail with results at report@fotonower.com args[1371480606] : ('0.019899401868947363',) no score found for photo 1371480606 We are sending mail with results at report@fotonower.com args[1371480604] : ('0.019899401868947363',) no score found for photo 1371480604 We are sending mail with results at report@fotonower.com args[1371480603] : ('0.019899401868947363',) no score found for photo 1371480603 We are sending mail with results at report@fotonower.com args[1371480601] : ('0.019899401868947363',) no score found for photo 1371480601 We are sending mail with results at report@fotonower.com args[1371480600] : ('0.019899401868947363',) no score found for photo 1371480600 We are sending mail with results at report@fotonower.com args[1371480585] : ('0.019899401868947363',) no score found for photo 1371480585 We are sending mail with results at report@fotonower.com args[1371480583] : ('0.019899401868947363',) no score found for photo 1371480583 We are sending mail with results at report@fotonower.com args[1371480580] : ('0.019899401868947363',) no score found for photo 1371480580 We are sending mail with results at report@fotonower.com args[1371480573] : ('0.019899401868947363',) no score found for photo 1371480573 We are sending mail with results at report@fotonower.com args[1371480571] : ('0.019899401868947363',) no score found for photo 1371480571 We are sending mail with results at report@fotonower.com args[1371480570] : ('0.019899401868947363',) no score found for photo 1371480570 We are sending mail with results at report@fotonower.com refus_total : 0.019899401868947363 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788046 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_P24788046_10-07-2025_07_19_00.pdf results_Auto_P24788046_10-07-2025_07_19_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24788046_10-07-2025_07_19_00.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','24788046','results_Auto_P24788046_10-07-2025_07_19_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24788046_10-07-2025_07_19_00.pdf','pdf','','0.12','0.019899401868947363') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24788046]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] map_info['map_portfolio_photo'] : {24788046: [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570]} final : False mtd_id 4302 list_pids : [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] 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, '3264061') ('4302', '24788046', '1371480608', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480606', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480604', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480603', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480601', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480600', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480585', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480583', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480580', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480573', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480571', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480570', None, None, None, None, None, '3264061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24788046', '1371480608', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480606', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480604', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480603', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480601', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480600', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480585', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480583', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480580', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480573', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480571', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480570', None, None, None, None, None, '3264061')] time used for this insertion : 0.06557679176330566 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8468527793884277 time spend to save output : 0.06583166122436523 total time spend for step 4 : 1.912684440612793 step5:split_time_score Thu Jul 10 07:19:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24788046'] 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 : [('24788046',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24788046) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1371480570: {'path': 'temp/1752124739_970607_1371480570_5328c518eb093e4ed70c4d69c8e923a4.jpg', 'extension': 'jpg'}, 1371480571: {'path': 'temp/1752124739_970607_1371480571_3a3d8301bc0f845df7927fbd9f2bb37a.jpg', 'extension': 'jpg'}, 1371480573: {'path': 'temp/1752124739_970607_1371480573_6f212a3041f0425cfb44a704f93823f3.jpg', 'extension': 'jpg'}, 1371480604: {'path': 'temp/1752124739_970607_1371480604_41c5caab1ccb0f0edc6b601db570db22.jpg', 'extension': 'jpg'}, 1371480606: {'path': 'temp/1752124739_970607_1371480606_5cbb4daa029026111bbc313f223e30c1.jpg', 'extension': 'jpg'}, 1371480608: {'path': 'temp/1752124739_970607_1371480608_722ce1d1f07ac04fdd73c23f1b42f615.jpg', 'extension': 'jpg'}, 1371480600: {'path': 'temp/1752124739_970607_1371480600_fbd0299d21a85f73a22bea06b0748346.jpg', 'extension': 'jpg'}, 1371480601: {'path': 'temp/1752124739_970607_1371480601_f3e921a0d082a4d4b0f03b57c9f1f9c5.jpg', 'extension': 'jpg'}, 1371480603: {'path': 'temp/1752124739_970607_1371480603_8d188700886255a203d21f5d07ab6d4a.jpg', 'extension': 'jpg'}, 1371480580: {'path': 'temp/1752124739_970607_1371480580_24db374900ed439ccffdda60839c025e.jpg', 'extension': 'jpg'}, 1371480583: {'path': 'temp/1752124739_970607_1371480583_90df48c84facd2a3e3597d41ba501691.jpg', 'extension': 'jpg'}, 1371480585: {'path': 'temp/1752124739_970607_1371480585_e265b46d8820ce9e087fbf77a029e116.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 = 24788046; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 24788046 group by h (('07', 12),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24788046 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 (24788046) 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 (24788046) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 10072025 24788046 Nombre de photos uploadées : 12 / 23040 (0%) 10072025 24788046 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 10072025 24788046 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1371480585, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/e265b46d8820ce9e087fbf77a029e116.jpg', 'username': None, 'uploaded_at': 1752124563, 'text': 'image_10072025_07_15_03_10155.jpg'}, {'photo_id': 1371480583, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/90df48c84facd2a3e3597d41ba501691.jpg', 'username': None, 'uploaded_at': 1752124563, 'text': 'image_10072025_07_15_13_10141.jpg'}, {'photo_id': 1371480580, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/24db374900ed439ccffdda60839c025e.jpg', 'username': None, 'uploaded_at': 1752124563, 'text': 'image_10072025_07_15_23_10136.jpg'}, {'photo_id': 1371480573, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/10/6f212a3041f0425cfb44a704f93823f3.jpg', 'username': None, 'uploaded_at': 1752124563, 'text': 'image_10072025_07_15_34_10133.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005908012390136719 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24788046, '2025-07-10' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1965220,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.031166553497314453 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= 1965220 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1965220, 'dashboard_run_id': 1973722, 'mtr_portfolio_id': 24786423, 'dashboard_result_id': 12350163, '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_P24786423_10-07-2025_06_46_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24786441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24786442, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24786443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24786444, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24786445, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24786446, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24786447, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24786448, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24786449, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24786450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24786451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24786452, 'pht': 3726}}"}, {'dashboat_entry_day': 1965220, 'dashboard_run_id': 1973722, 'mtr_portfolio_id': 24787091, 'dashboard_result_id': 12350164, '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_P24787091_10-07-2025_07_02_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24787121, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24787122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24787123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24787124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24787125, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24787126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24787127, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24787128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24787129, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24787130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24787131, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24787132, 'pht': 3726}}"}, {'dashboat_entry_day': 1965220, 'dashboard_run_id': 1973722, 'mtr_portfolio_id': 24787575, 'dashboard_result_id': 12350165, '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_P24787575_10-07-2025_07_16_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24787607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24787608, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24787609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24787610, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24787611, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24787612, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24787613, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24787614, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24787615, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24787616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24787617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24787618, 'pht': 3726}}"}, {'dashboat_entry_day': 1965220, 'dashboard_run_id': 1973722, 'mtr_portfolio_id': 24788046, 'dashboard_result_id': 12350166, '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 = 24786423 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': 3263812, 'mtr_portfolio_id': 24786423, 'created_at': datetime.datetime(2025, 7, 10, 6, 46, 28), 'result': '0.049217607787446764', 'result_long': None, 'result_double': None}] Qualite : 0.049217607787446764 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24786423 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24786423_10-07-2025_06_46_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24786423 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_P24786423_10-07-2025_06_46_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24786441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24786442, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24786443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24786444, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24786445, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24786446, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24786447, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24786448, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24786449, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24786450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24786451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24786452, 'pht': 3726}}" where mtr_portfolio_id = 24786423 and dashboard_run_id = 1973722 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`=24786423 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12350163, 0.049217607787446764, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24786423_10-07-2025_06_46_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24786441, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24786442, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24786443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24786444, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24786445, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24786446, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24786447, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24786448, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24786449, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24786450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24786451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24786452, '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 = 24787091 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': 3263929, 'mtr_portfolio_id': 24787091, 'created_at': datetime.datetime(2025, 7, 10, 7, 2, 59), 'result': '0.02206924619089305', 'result_long': None, 'result_double': None}] Qualite : 0.02206924619089305 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24787091 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24787091_10-07-2025_07_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24787091 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_P24787091_10-07-2025_07_02_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24787121, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24787122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24787123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24787124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24787125, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24787126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24787127, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24787128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24787129, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24787130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24787131, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24787132, 'pht': 3726}}" where mtr_portfolio_id = 24787091 and dashboard_run_id = 1973722 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`=24787091 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12350164, 0.02206924619089305, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24787091_10-07-2025_07_02_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24787121, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24787122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24787123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24787124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24787125, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24787126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24787127, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24787128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24787129, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24787130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24787131, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24787132, '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 = 24787575 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': 3264005, 'mtr_portfolio_id': 24787575, 'created_at': datetime.datetime(2025, 7, 10, 7, 16, 58), 'result': '0.022962881906801427', 'result_long': None, 'result_double': None}] Qualite : 0.022962881906801427 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24787575 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24787575_10-07-2025_07_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24787575 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_P24787575_10-07-2025_07_16_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24787607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24787608, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24787609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24787610, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24787611, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24787612, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24787613, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24787614, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24787615, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24787616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24787617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24787618, 'pht': 3726}}" where mtr_portfolio_id = 24787575 and dashboard_run_id = 1973722 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`=24787575 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12350165, 0.022962881906801427, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24787575_10-07-2025_07_16_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24787607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24787608, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24787609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24787610, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24787611, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24787612, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24787613, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24787614, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24787615, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24787616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24787617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24787618, '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 = 24788046 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': 3264061, 'mtr_portfolio_id': 24788046, 'created_at': datetime.datetime(2025, 7, 10, 7, 18, 59), 'result': '0.019899401868947363', 'result_long': None, 'result_double': None}] Qualite : 0.019899401868947363 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24788046 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24788046_10-07-2025_07_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24788046 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_P24788046_10-07-2025_07_19_00.pdf'}" where mtr_portfolio_id = 24788046 and dashboard_run_id = 1973722 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`=24788046 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12350166, 0.019899401868947363, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24788046_10-07-2025_07_19_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24788065, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24788066, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24788067, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24788068, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24788069, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24788070, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24788071, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24788072, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24788073, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24788074, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24788075, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24788076, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24786423,24787091,24787575,24788046) result : ((1371479528,), (1371479529,), (1371479532,), (1371479536,), (1371479538,), (1371479540,), (1371479551,), (1371479552,), (1371479554,), (1371479555,), (1371479557,), (1371479559,), (1371479581,), (1371479584,), (1371479585,), (1371479586,), (1371479588,), (1371479590,), (1371479607,), (1371479609,), (1371479611,), (1371479612,), (1371479614,), (1371479616,), (1371479645,), (1371479648,), (1371479649,), (1371479650,), (1371479653,), (1371479654,), (1371479667,), (1371479669,), (1371479671,), (1371479672,), (1371479674,), (1371479676,), (1371479692,), (1371479693,), (1371479695,), (1371479696,), (1371479698,), (1371479699,), (1371479712,), (1371479717,), (1371479719,), (1371479720,), (1371479721,), (1371479723,), (1371479736,), (1371479738,), (1371479739,), (1371479740,), (1371479741,), (1371479743,), (1371479749,), (1371479750,), (1371479752,), (1371479753,), (1371479754,), (1371479756,), (1371479771,), (1371479772,), (1371479774,), (1371479775,), (1371479777,), (1371479779,), (1371479797,), (1371479798,), (1371479800,), (1371479801,), (1371479803,), (1371479805,), (1371479822,), (1371479826,), (1371479828,), (1371479829,), (1371479830,), (1371479832,), (1371479843,), (1371479844,), (1371479845,), (1371479846,), (1371479847,), (1371479850,), (1371479868,), (1371479869,), (1371479870,), (1371479871,), (1371479873,), (1371479875,), (1371479884,), (1371479885,), (1371479888,), (1371479891,), (1371479893,), (1371479895,), (1371479909,), (1371479911,), (1371479912,), (1371479914,), (1371479916,), (1371479918,), (1371479926,), (1371479927,), (1371479929,), (1371479930,), (1371479931,), (1371479933,), (1371479947,), (1371479949,), (1371479950,), (1371479951,), (1371479953,), (1371479955,), (1371479963,), (1371479965,), (1371479967,), (1371479968,), (1371479970,), (1371479972,), (1371479995,), (1371479996,), (1371479998,), (1371479999,), (1371480001,), (1371480003,), (1371480016,), (1371480018,), (1371480020,), (1371480021,), (1371480022,), (1371480024,), (1371480033,), (1371480034,), (1371480036,), (1371480037,), (1371480039,), (1371480041,), (1371480045,), (1371480046,), (1371480048,), (1371480049,), (1371480051,), (1371480052,), (1371480068,), (1371480070,), (1371480072,), (1371480073,), (1371480074,), (1371480076,), (1371480093,), (1371480095,), (1371480097,), (1371480098,), (1371480100,), (1371480102,), (1371480112,), (1371480113,), (1371480116,), (1371480117,), (1371480118,), (1371480120,), (1371480132,), (1371480133,), (1371480135,), (1371480136,), (1371480137,), (1371480139,), (1371480156,), (1371480159,), (1371480162,), (1371480164,), (1371480168,), (1371480171,), (1371480173,), (1371480174,), (1371480182,), (1371480229,), (1371480231,), (1371480237,), (1371480241,), (1371480243,), (1371480257,), (1371480258,), (1371480260,), (1371480261,), (1371480263,), (1371480265,), (1371480278,), (1371480279,), (1371480280,), (1371480281,), (1371480282,), (1371480284,), (1371480291,), (1371480292,), (1371480294,), (1371480295,), (1371480297,), (1371480299,), (1371480309,), (1371480310,), (1371480311,), (1371480312,), (1371480313,), (1371480315,), (1371480325,), (1371480326,), (1371480328,), (1371480329,), (1371480331,), (1371480333,), (1371480353,), (1371480354,), (1371480356,), (1371480357,), (1371480359,), (1371480361,), (1371480376,), (1371480378,), (1371480380,), (1371480381,), (1371480383,), (1371480385,), (1371480396,), (1371480397,), (1371480399,), (1371480400,), (1371480401,), (1371480403,), (1371480417,), (1371480418,), (1371480420,), (1371480421,), (1371480423,), (1371480425,), (1371480475,), (1371480476,), (1371480477,), (1371480478,), (1371480479,), (1371480481,), (1371480493,), (1371480494,), (1371480496,), (1371480497,), (1371480499,), (1371480501,), (1371480514,), (1371480515,), (1371480516,), (1371480517,), (1371480518,), (1371480520,), (1371480530,), (1371480531,), (1371480533,), (1371480534,), (1371480536,), (1371480538,), (1371480548,), (1371480550,), (1371480552,), (1371480553,), (1371480555,), (1371480557,), (1371480570,), (1371480571,), (1371480573,), (1371480580,), (1371480583,), (1371480585,), (1371480600,), (1371480601,), (1371480603,), (1371480604,), (1371480606,), (1371480608,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'10072025': {'nb_upload': 12, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24788046]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] map_info['map_portfolio_photo'] : {24788046: [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570]} final : True mtd_id 4302 list_pids : [1371480608, 1371480606, 1371480604, 1371480603, 1371480601, 1371480600, 1371480585, 1371480583, 1371480580, 1371480573, 1371480571, 1371480570] Looping around the photos to save general results len do output : 1 /24788046Didn'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, '3264061') ('4302', '24788046', '1371480608', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480606', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480604', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480603', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480601', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480600', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480585', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480583', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480580', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480573', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480571', None, None, None, None, None, '3264061') ('4302', None, None, None, None, None, None, None, '3264061') ('4302', '24788046', '1371480570', None, None, None, None, None, '3264061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24788046', 'None', None, None, None, None, '3264061'), ('4302', '24788046', '1371480608', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480606', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480604', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480603', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480601', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480600', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480585', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480583', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480580', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480573', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480571', None, None, None, None, None, '3264061'), ('4302', '24788046', '1371480570', None, None, None, None, None, '3264061')] time used for this insertion : 0.05408740043640137 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3937404155731201 time spend to save output : 0.05431699752807617 total time spend for step 5 : 0.4480574131011963 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 (3264061) 1.98user 2.41system 0:06.27elapsed 70%CPU (0avgtext+0avgdata 161408maxresident)k 112inputs+7056outputs (8major+64372minor)pagefaults 0swaps