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 (2745163) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2745163) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282511 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2745163'] with mtr_portfolio_ids : ['22282511'] and first list_photo_ids : [] new path : /proc/570697/ Name: python3 Umask: 0002 State: R (running) Tgid: 570697 Ngid: 0 Pid: 570697 PPid: 570696 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 570697 NSpid: 570697 NSpgid: 566544 NSsid: 566544 VmPeak: 1106932 kB VmSize: 1106932 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97720 kB VmRSS: 97720 kB RssAnon: 59796 kB RssFile: 37924 kB RssShmem: 0 kB VmData: 865680 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 46 nonvoluntary_ctxt_switches: 106 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '570697', 'Ngid': '0', 'Pid': '570697', 'PPid': '570696', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '570697', 'NSpid': '570697', 'NSpgid': '566544', 'NSsid': '566544', 'VmPeak': '1106932 kB', 'VmSize': '1106932 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97720 kB', 'VmRSS': '97720 kB', 'RssAnon': '59796 kB', 'RssFile': '37924 kB', 'RssShmem': '0 kB', 'VmData': '865680 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '46', 'nonvoluntary_ctxt_switches': '106'} ('datou_batch_current', '570697', '1106932', '0', '1106932', '865680', '97720', b'', 'marlene', '2745163') 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 (22282511) 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 (2745163 ) ) 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 (22282511) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1351728912, 'portfolio_id': 22282511}, {'photo_id': 1351728885, 'portfolio_id': 22282511}, {'photo_id': 1351728880, 'portfolio_id': 22282511}, {'photo_id': 1351728876, 'portfolio_id': 22282511}, {'photo_id': 1351728873, 'portfolio_id': 22282511}, {'photo_id': 1351728578, 'portfolio_id': 22282511}, {'photo_id': 1351728539, 'portfolio_id': 22282511}, {'photo_id': 1351728453, 'portfolio_id': 22282511}, {'photo_id': 1351728423, 'portfolio_id': 22282511}, {'photo_id': 1351728106, 'portfolio_id': 22282511}, {'photo_id': 1351727928, 'portfolio_id': 22282511}, {'photo_id': 1351727898, 'portfolio_id': 22282511}, {'photo_id': 1351727882, 'portfolio_id': 22282511}, {'photo_id': 1351727662, 'portfolio_id': 22282511}, {'photo_id': 1351727625, 'portfolio_id': 22282511}, {'photo_id': 1351727582, 'portfolio_id': 22282511}, {'photo_id': 1351727527, 'portfolio_id': 22282511}, {'photo_id': 1351727480, 'portfolio_id': 22282511}, {'photo_id': 1351727310, 'portfolio_id': 22282511}, {'photo_id': 1351726725, 'portfolio_id': 22282511}, {'photo_id': 1351726519, 'portfolio_id': 22282511}, {'photo_id': 1351726345, 'portfolio_id': 22282511}] map_portfolio_id_photo_id: {22282511: [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} ##### 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.016410112380981445 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Apr 11 15:50: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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22282511) 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 : 22282511 get user id for portfolio 22282511 get sub ptf for main ptf 22282511, type 3726 and hashtags ['Teint_Dans_La_Masse', 'flou', 'autre_refus', 'Carton_gris', 'kraft', 'Carton_brun', 'papier', 'mal_croppe', 'cartonnette', 'metal', 'environnement', 'plastique'] 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`=22282511 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','autre_refus','Carton_gris','kraft','Carton_brun','papier','mal_croppe','cartonnette','metal','environnement','plastique')) 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`=22282511 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','autre_refus','Carton_gris','kraft','Carton_brun','papier','mal_croppe','cartonnette','metal','environnement','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 22282511, 'sub_port_id': 22282636, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748014, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'kraft': {'main_port_id': 22282511, 'sub_port_id': 22282637, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748015, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 22282511, 'sub_port_id': 22282638, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748016, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'papier': {'main_port_id': 22282511, 'sub_port_id': 22282639, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748017, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'environnement': {'main_port_id': 22282511, 'sub_port_id': 22282640, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748018, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'cartonnette': {'main_port_id': 22282511, 'sub_port_id': 22282641, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748019, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'flou': {'main_port_id': 22282511, 'sub_port_id': 22282642, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748020, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'plastique': {'main_port_id': 22282511, 'sub_port_id': 22282643, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748021, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'metal': {'main_port_id': 22282511, 'sub_port_id': 22282644, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748022, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'mal_croppe': {'main_port_id': 22282511, 'sub_port_id': 22282645, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748023, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'Carton_gris': {'main_port_id': 22282511, 'sub_port_id': 22282646, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748024, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}, 'Carton_brun': {'main_port_id': 22282511, 'sub_port_id': 22282647, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748025, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282636 , 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=22282511 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 (22282636) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282637 , 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=22282511 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 (22282637) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282638 , 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=22282511 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 (22282638) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282639 , 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=22282511 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 (22282639) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282640 , 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=22282511 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 (22282640) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282641 , 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=22282511 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 (22282641) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282642 , 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=22282511 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 (22282642) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282643 , 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=22282511 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 (22282643) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282644 , 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=22282511 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 (22282644) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282645 , 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=22282511 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 (22282645) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282646 , 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=22282511 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 (22282646) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22282647 , 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=22282511 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 (22282647) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22282511) result : ((1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22282511 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','autre_refus','Carton_gris','kraft','Carton_brun','papier','mal_croppe','cartonnette','metal','environnement','plastique')) 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`=22282511 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','autre_refus','Carton_gris','kraft','Carton_brun','papier','mal_croppe','cartonnette','metal','environnement','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 22282511, 'sub_port_id': 22282648, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748026, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'kraft': {'main_port_id': 22282511, 'sub_port_id': 22282649, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748027, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 22282511, 'sub_port_id': 22282650, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748028, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'papier': {'main_port_id': 22282511, 'sub_port_id': 22282651, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748029, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'environnement': {'main_port_id': 22282511, 'sub_port_id': 22282652, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748030, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'cartonnette': {'main_port_id': 22282511, 'sub_port_id': 22282653, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748031, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'flou': {'main_port_id': 22282511, 'sub_port_id': 22282654, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748032, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'plastique': {'main_port_id': 22282511, 'sub_port_id': 22282655, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748033, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'metal': {'main_port_id': 22282511, 'sub_port_id': 22282656, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748034, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'mal_croppe': {'main_port_id': 22282511, 'sub_port_id': 22282657, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748035, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'Carton_gris': {'main_port_id': 22282511, 'sub_port_id': 22282658, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748036, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}, 'Carton_brun': {'main_port_id': 22282511, 'sub_port_id': 22282659, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14748037, 'last_updated_at': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_desc': datetime.datetime(2025, 4, 11, 15, 49, 31), 'last_updated_at_asc': datetime.datetime(2025, 4, 11, 15, 49, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282648,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282636 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282649,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282637 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282650,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282638 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282651,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282639 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282652,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282640 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282653,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282641 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282654,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282642 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282655,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282643 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282656,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282644 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282657,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282645 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282658,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282646 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22282659,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22282647 lien utilise dans velours : https://www.fotonower.com/velours/22282648,22282649,22282650,22282651,22282652,22282653,22282654,22282655,22282656,22282657,22282658,22282659?tags=autre_refus,kraft,Teint_Dans_La_Masse,papier,environnement,cartonnette,flou,plastique,metal,mal_croppe,Carton_gris,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22282511]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] map_info['map_portfolio_photo'] : {22282511: [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : False mtd_id 4302 list_pids : [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] Looping around the photos to save general results len do output : 1 /22282511. 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, '2745163') ('4302', '22282511', '1351728912', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728885', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728880', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728876', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728873', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728578', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728539', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728453', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728423', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728106', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727928', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727898', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727882', None, None, None, None, None, '2745163') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22282511', "{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}", None, None, None, None, '2745163'), ('4302', '22282511', '1351728912', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728885', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728880', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728876', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728873', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728578', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728539', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728453', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728423', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728106', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727928', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727898', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727882', None, None, None, None, None, '2745163')] time used for this insertion : 0.015705585479736328 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6146824359893799 time spend to save output : 0.0160524845123291 total time spend for step 1 : 1.630734920501709 step2:final Fri Apr 11 15:51:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (22282511) 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 22282511 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1351726725,1351726519,1351726345,1351727662,1351727625,1351727582,1351727527,1351727480,1351727310,1351728453,1351728423,1351728106,1351727928,1351727898,1351727882,1351728578,1351728539,1351728912,1351728885,1351728880,1351728876,1351728873); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22282511]) Inside saveOutput : final : False verbose : True original output for save of step final : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} new output for save of step final : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] map_info['map_portfolio_photo'] : {22282511: [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : False mtd_id 4302 list_pids : [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] Looping around the photos to save general results len do output : 13 /1351728912.Didn't retrieve data . /1351728885.Didn't retrieve data . /1351728880.Didn't retrieve data . /1351728876.Didn't retrieve data . /1351728873.Didn't retrieve data . /1351728578.Didn't retrieve data . /1351728539.Didn't retrieve data . /1351728453.Didn't retrieve data . /1351728423.Didn't retrieve data . /1351728106.Didn't retrieve data . /1351727928.Didn't retrieve data . /1351727898.Didn't retrieve data . /1351727882.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, '2745163') ('4302', '22282511', '1351728912', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728885', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728880', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728876', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728873', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728578', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728539', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728453', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728423', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728106', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727928', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727898', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727882', None, None, None, None, None, '2745163') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 39 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22282511', '1351728912', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728885', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728880', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728876', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728873', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728578', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728539', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728453', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728423', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351728106', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351727928', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351727898', '0.0', None, None, None, None, '2745163'), ('4302', '22282511', '1351727882', '0.0', None, None, None, None, '2745163')] time used for this insertion : 0.11207723617553711 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05393671989440918 time spend to save output : 0.11278510093688965 total time spend for step 2 : 0.16672182083129883 step3:velours_tree Fri Apr 11 15:51: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 : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} input_args_next_step : {22282511: ()} output_args : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} args : 22282511 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 : ({'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22282511) 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([22282511]) 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.3183913230895996 time spend to save output : 7.152557373046875e-05 total time spend for step 3 : 0.3184628486633301 step4:send_mail_cod Fri Apr 11 15:51:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} input_args_next_step : {1351728912: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728912 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728885 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728880 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728876 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728873 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728578 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728539 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728453 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728423 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351728106 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351727928 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351727898 depend.output_id : 0 input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ()} output_args : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',)} args : 1351727882 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 : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} input_args_next_step : {1351728912: ('0.0',), 1351728885: ('0.0',), 1351728880: ('0.0',), 1351728876: ('0.0',), 1351728873: ('0.0',), 1351728578: ('0.0',), 1351728539: ('0.0',), 1351728453: ('0.0',), 1351728423: ('0.0',), 1351728106: ('0.0',), 1351727928: ('0.0',), 1351727898: ('0.0',), 1351727882: ('0.0',), 22282511: ()} output_args : {22282511: [{'autre_refus': 22282636, 'kraft': 22282637, 'Teint_Dans_La_Masse': 22282638, 'papier': 22282639, 'environnement': 22282640, 'cartonnette': 22282641, 'flou': 22282642, 'plastique': 22282643, 'metal': 22282644, 'mal_croppe': 22282645, 'Carton_gris': 22282646, 'Carton_brun': 22282647}]} args : 22282511 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :14, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22282511) 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 (1351728912,1351728885,1351728880,1351728876,1351728873,1351728578,1351728539,1351728453,1351728423,1351728106,1351727928,1351727898,1351727882) Found this number of photos: 13 ##### Call download_photos : nb_thread : 5 begin to download photo : 1351727882 begin to download photo : 1351728106 begin to download photo : 1351728539 begin to download photo : 1351728876 begin to download photo : 1351728912 download finish for photo 1351728539 begin to download photo : 1351728578 download finish for photo 1351728912 download finish for photo 1351728876 begin to download photo : 1351728880 download finish for photo 1351727882 begin to download photo : 1351727898 download finish for photo 1351728106 begin to download photo : 1351728423 download finish for photo 1351728578 begin to download photo : 1351728873 download finish for photo 1351728880 begin to download photo : 1351728885 download finish for photo 1351727898 begin to download photo : 1351727928 download finish for photo 1351728423 begin to download photo : 1351728453 download finish for photo 1351728873 download finish for photo 1351728885 download finish for photo 1351727928 download finish for photo 1351728453 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette222826361744379462/ imagette222826371744379462/ imagette222826411744379462/ imagette222826421744379462/ imagette222826431744379462/ imagette222826441744379462/ imagette222826451744379462/ imagette222826381744379462/ imagette222826461744379462/ imagette222826471744379462/ length of list_filenames : 13 ; length of list_pids : 13 ; length of list_args : 13 results_Auto_P22282511_11-04-2025_15_51_02.pdf 22282636 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=22282636 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826361744379462 22282637 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=22282637 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826371744379462 22282641 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=22282641 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826411744379462 22282642 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=22282642 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826421744379462 22282643 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=22282643 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826431744379462 22282644 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=22282644 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826441744379462 22282645 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=22282645 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826451744379462 22282638 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=22282638 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826381744379462 22282646 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=22282646 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826461744379462 22282647 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=22282647 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222826471744379462 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22282511 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22282648,22282649,22282650,22282651,22282652,22282653,22282654,22282655,22282656,22282657,22282658,22282659?tags=autre_refus,kraft,Teint_Dans_La_Masse,papier,environnement,cartonnette,flou,plastique,metal,mal_croppe,Carton_gris,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1351728912] : ('0.0',) no score found for photo 1351728912 We are sending mail with results at report@fotonower.com args[1351728885] : ('0.0',) no score found for photo 1351728885 We are sending mail with results at report@fotonower.com args[1351728880] : ('0.0',) no score found for photo 1351728880 We are sending mail with results at report@fotonower.com args[1351728876] : ('0.0',) no score found for photo 1351728876 We are sending mail with results at report@fotonower.com args[1351728873] : ('0.0',) no score found for photo 1351728873 We are sending mail with results at report@fotonower.com args[1351728578] : ('0.0',) no score found for photo 1351728578 We are sending mail with results at report@fotonower.com args[1351728539] : ('0.0',) no score found for photo 1351728539 We are sending mail with results at report@fotonower.com args[1351728453] : ('0.0',) no score found for photo 1351728453 We are sending mail with results at report@fotonower.com args[1351728423] : ('0.0',) no score found for photo 1351728423 We are sending mail with results at report@fotonower.com args[1351728106] : ('0.0',) no score found for photo 1351728106 We are sending mail with results at report@fotonower.com args[1351727928] : ('0.0',) no score found for photo 1351727928 We are sending mail with results at report@fotonower.com args[1351727898] : ('0.0',) no score found for photo 1351727898 We are sending mail with results at report@fotonower.com args[1351727882] : ('0.0',) no score found for photo 1351727882 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22282511 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_P22282511_11-04-2025_15_51_02.pdf results_Auto_P22282511_11-04-2025_15_51_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22282511_11-04-2025_15_51_02.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','22282511','results_Auto_P22282511_11-04-2025_15_51_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22282511_11-04-2025_15_51_02.pdf','pdf','','0.12','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22282511]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] map_info['map_portfolio_photo'] : {22282511: [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : False mtd_id 4302 list_pids : [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] 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, '2745163') ('4302', '22282511', '1351728912', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728885', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728880', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728876', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728873', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728578', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728539', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728453', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728423', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728106', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727928', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727898', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727882', None, None, None, None, None, '2745163') 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', '22282511', '1351728912', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728885', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728880', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728876', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728873', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728578', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728539', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728453', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728423', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728106', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727928', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727898', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727882', None, None, None, None, None, '2745163')] time used for this insertion : 0.01777362823486328 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5633015632629395 time spend to save output : 0.018038272857666016 total time spend for step 4 : 1.5813398361206055 step5:split_time_score Fri Apr 11 15:51:03 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 : ['22282511'] 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 : [('22282511',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22282511) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1351728912: {'path': 'temp/1744379461_570697_1351728912_9a904d93e5714726c88034ec84291466.jpg', 'extension': 'jpg'}, 1351728539: {'path': 'temp/1744379461_570697_1351728539_4f810aa6f391aff33312d0ee32bd1bf7.jpg', 'extension': 'jpg'}, 1351728578: {'path': 'temp/1744379461_570697_1351728578_a00c45f5b164f290fd4f97fa08fa544c.jpg', 'extension': 'jpg'}, 1351728873: {'path': 'temp/1744379461_570697_1351728873_cd3010e84fe8ea679ee96fa1cd85a426.jpg', 'extension': 'jpg'}, 1351728876: {'path': 'temp/1744379461_570697_1351728876_7806b3b3ebbc8404b5434f77e0fb02ed.jpg', 'extension': 'jpg'}, 1351728880: {'path': 'temp/1744379461_570697_1351728880_8d12d0c6a345c993b14909a17efcfc42.jpg', 'extension': 'jpg'}, 1351728885: {'path': 'temp/1744379461_570697_1351728885_f1f6e7ab20dd150e60cbe1cbef5a67d4.jpg', 'extension': 'jpg'}, 1351727882: {'path': 'temp/1744379461_570697_1351727882_7af174499e31d8cffeac57a6c29efd08.jpg', 'extension': 'jpg'}, 1351727898: {'path': 'temp/1744379461_570697_1351727898_726d25939e75bb8fecb0112812affbe9.jpg', 'extension': 'jpg'}, 1351727928: {'path': 'temp/1744379461_570697_1351727928_c241a1a9acdeff25c230ab2de1fc5893.jpg', 'extension': 'jpg'}, 1351728106: {'path': 'temp/1744379461_570697_1351728106_36707719a0197b9d73170b67ba33ae00.jpg', 'extension': 'jpg'}, 1351728423: {'path': 'temp/1744379461_570697_1351728423_a6ae38997b88bea636c9ae09d0bd9000.jpg', 'extension': 'jpg'}, 1351728453: {'path': 'temp/1744379461_570697_1351728453_c6b013bd6648c8fd1bdd2f7d70b106f9.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 = 22282511; (('arc_en_ciel_jrm',),) 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 = 22282511 group by h (('15', 22),) 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=22282511 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 (22282511) 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 (22282511) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 11042025 22282511 Nombre de photos uploadées : 22 / 23040 (0%) 11042025 22282511 Nombre de photos taguées (types de déchets): 0 / 22 (0%) 11042025 22282511 Nombre de photos taguées (volume) : 0 / 22 (0%) [{'photo_id': 1351726725, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/456113b9fba450cf200735974893b1ff.jpg', 'username': None, 'uploaded_at': 1744379168, 'text': 'image_11042025_15_45_24_10132.jpg'}, {'photo_id': 1351726519, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/c33435d400fb56eddfea136dd45d0ae3.jpg', 'username': None, 'uploaded_at': 1744379168, 'text': 'image_11042025_15_45_34_10150.jpg'}, {'photo_id': 1351726345, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/e79bc6e6bb90d7d4f483786ffce2726b.jpg', 'username': None, 'uploaded_at': 1744379168, 'text': 'image_11042025_15_45_44_10146.jpg'}, {'photo_id': 1351727662, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/832da583a1f42a40958db391b034e814.jpg', 'username': None, 'uploaded_at': 1744379228, 'text': 'image_11042025_15_45_54_10140.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 8.58306884765625e-06 ?????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0011632442474365234 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22282511, '2025-04-11' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1733453,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03075575828552246 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= 1733453 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743785, 'mtr_portfolio_id': 22279715, 'dashboard_result_id': 10027594, '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_P22279715_11-04-2025_15_17_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22279801, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22279802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22279803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22279804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22279805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22279806, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22279807, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22279808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22279809, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22279810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22279811, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22279812, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743785, 'mtr_portfolio_id': 22280602, 'dashboard_result_id': 10027595, '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_P22280602_11-04-2025_15_33_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22280664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22280665, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22280666, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22280667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22280668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22280669, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22280670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22280671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22280672, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22280673, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22280674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22280675, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743785, 'mtr_portfolio_id': 22281285, 'dashboard_result_id': 10027596, '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_P22281285_11-04-2025_15_47_46.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22281326, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22281327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22281328, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22281329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22281330, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22281331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22281332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22281333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22281334, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22281335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22281336, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22281337, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1743785, 'mtr_portfolio_id': 22282511, 'dashboard_result_id': 10027597, '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_P22282511_11-04-2025_15_49_33.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22282636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22282637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22282638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22282639, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22282640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22282641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22282642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22282643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22282644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22282645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22282646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22282647, 'pht': 3726}}"}] 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 = 22279715 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': 2744985, 'mtr_portfolio_id': 22279715, 'created_at': datetime.datetime(2025, 4, 11, 15, 17, 31), 'result': '0.03821175810453171', 'result_long': None, 'result_double': None}] Qualite : 0.03821175810453171 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22279715 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22279715_11-04-2025_15_17_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22279715 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_P22279715_11-04-2025_15_17_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22279801, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22279802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22279803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22279804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22279805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22279806, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22279807, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22279808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22279809, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22279810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22279811, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22279812, 'pht': 3726}}" where mtr_portfolio_id = 22279715 and dashboard_run_id = 1743785 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`=22279715 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10027594, 0.03821175810453171, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22279715_11-04-2025_15_17_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22279801, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22279802, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22279803, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22279804, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22279805, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22279806, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22279807, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22279808, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22279809, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22279810, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22279811, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22279812, '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 = 22280602 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': 2745057, 'mtr_portfolio_id': 22280602, 'created_at': datetime.datetime(2025, 4, 11, 15, 32, 59), 'result': '0.043907795476187256', 'result_long': None, 'result_double': None}] Qualite : 0.043907795476187256 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22280602 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22280602_11-04-2025_15_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22280602 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_P22280602_11-04-2025_15_33_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22280664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22280665, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22280666, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22280667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22280668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22280669, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22280670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22280671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22280672, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22280673, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22280674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22280675, 'pht': 3726}}" where mtr_portfolio_id = 22280602 and dashboard_run_id = 1743785 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`=22280602 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10027595, 0.043907795476187256, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22280602_11-04-2025_15_33_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22280664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22280665, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22280666, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22280667, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22280668, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22280669, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22280670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22280671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22280672, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22280673, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22280674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22280675, '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 = 22281285 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': 2745109, 'mtr_portfolio_id': 22281285, 'created_at': datetime.datetime(2025, 4, 11, 15, 47, 45), 'result': '0.0634537798837013', 'result_long': None, 'result_double': None}] Qualite : 0.0634537798837013 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22281285 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22281285_11-04-2025_15_47_46.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22281285 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_P22281285_11-04-2025_15_47_46.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22281326, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22281327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22281328, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22281329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22281330, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22281331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22281332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22281333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22281334, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22281335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22281336, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22281337, 'pht': 3726}}" where mtr_portfolio_id = 22281285 and dashboard_run_id = 1743785 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`=22281285 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10027596, 0.0634537798837013, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22281285_11-04-2025_15_47_46.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22281326, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22281327, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22281328, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22281329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22281330, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22281331, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22281332, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22281333, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22281334, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22281335, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22281336, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22281337, '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 = 22282511 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22282511 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 22282511 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22282511 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22282511 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22282511 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22282511_11-04-2025_15_51_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22282511 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_P22282511_11-04-2025_15_51_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22282636, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22282637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22282638, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22282639, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22282640, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22282641, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22282642, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22282643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22282644, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22282645, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22282646, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22282647, 'pht': 3726}}" where mtr_portfolio_id = 22282511 and dashboard_run_id = 1743785 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22279715,22280602,22281285,22282511) result : ((1351699255,), (1351699282,), (1351699288,), (1351699527,), (1351699613,), (1351699739,), (1351699836,), (1351699865,), (1351700243,), (1351700276,), (1351700296,), (1351700311,), (1351700333,), (1351700667,), (1351700718,), (1351700755,), (1351700799,), (1351700878,), (1351700921,), (1351701412,), (1351701464,), (1351701510,), (1351701559,), (1351701815,), (1351701862,), (1351701911,), (1351701958,), (1351702010,), (1351702064,), (1351702690,), (1351702797,), (1351702917,), (1351703016,), (1351703274,), (1351703382,), (1351703474,), (1351703560,), (1351703604,), (1351703681,), (1351703949,), (1351704012,), (1351704047,), (1351704058,), (1351704086,), (1351704139,), (1351704408,), (1351704448,), (1351704510,), (1351704554,), (1351704978,), (1351705056,), (1351705111,), (1351705205,), (1351705258,), (1351705282,), (1351705451,), (1351705495,), (1351705555,), (1351705609,), (1351705641,), (1351705952,), (1351705999,), (1351706016,), (1351706574,), (1351706652,), (1351706728,), (1351706809,), (1351707243,), (1351707319,), (1351707380,), (1351708081,), (1351707864,), (1351707898,), (1351707932,), (1351707966,), (1351708010,), (1351708341,), (1351708368,), (1351708398,), (1351708422,), (1351708694,), (1351708723,), (1351708737,), (1351708766,), (1351708992,), (1351709038,), (1351709155,), (1351709203,), (1351709269,), (1351709443,), (1351709495,), (1351709580,), (1351709668,), (1351710080,), (1351710128,), (1351710158,), (1351710211,), (1351710250,), (1351710571,), (1351710601,), (1351710651,), (1351710683,), (1351710735,), (1351711120,), (1351711148,), (1351711198,), (1351711227,), (1351711262,), (1351711294,), (1351711536,), (1351711563,), (1351711652,), (1351711940,), (1351711989,), (1351712051,), (1351712110,), (1351712178,), (1351712651,), (1351712703,), (1351712781,), (1351712820,), (1351712859,), (1351712903,), (1351713031,), (1351713056,), (1351713083,), (1351713512,), (1351713588,), (1351713783,), (1351713821,), (1351713878,), (1351713946,), (1351714218,), (1351714265,), (1351714324,), (1351714393,), (1351714815,), (1351714854,), (1351714885,), (1351714912,), (1351716314,), (1351716081,), (1351716122,), (1351716165,), (1351716198,), (1351716253,), (1351716368,), (1351716400,), (1351716424,), (1351717288,), (1351717316,), (1351717424,), (1351717487,), (1351717552,), (1351718008,), (1351718061,), (1351718122,), (1351718144,), (1351718735,), (1351718757,), (1351718844,), (1351718937,), (1351719019,), (1351719948,), (1351720014,), (1351720052,), (1351720641,), (1351720655,), (1351720795,), (1351720873,), (1351720959,), (1351721011,), (1351721340,), (1351721387,), (1351721424,), (1351721460,), (1351721674,), (1351721685,), (1351721694,), (1351721722,), (1351722192,), (1351722252,), (1351722341,), (1351722403,), (1351722501,), (1351722610,), (1351723262,), (1351723442,), (1351723477,), (1351723512,), (1351723571,), (1351723636,), (1351723951,), (1351724000,), (1351724080,), (1351724115,), (1351724167,), (1351724358,), (1351724378,), (1351724405,), (1351724442,), (1351724472,), (1351724517,), (1351724690,), (1351725732,), (1351725780,), (1351725807,), (1351726814,), (1351726345,), (1351726519,), (1351726725,), (1351727310,), (1351727480,), (1351727527,), (1351727582,), (1351727625,), (1351727662,), (1351727882,), (1351727898,), (1351727928,), (1351728106,), (1351728423,), (1351728453,), (1351728539,), (1351728578,), (1351728873,), (1351728876,), (1351728880,), (1351728885,), (1351728912,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'11042025': {'nb_upload': 22, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22282511]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] map_info['map_portfolio_photo'] : {22282511: [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882, 1351727662, 1351727625, 1351727582, 1351727527, 1351727480, 1351727310, 1351726725, 1351726519, 1351726345]} final : True mtd_id 4302 list_pids : [1351728912, 1351728885, 1351728880, 1351728876, 1351728873, 1351728578, 1351728539, 1351728453, 1351728423, 1351728106, 1351727928, 1351727898, 1351727882] Looping around the photos to save general results len do output : 1 /22282511Didn'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, '2745163') ('4302', '22282511', '1351728912', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728885', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728880', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728876', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728873', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728578', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728539', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728453', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728423', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351728106', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727928', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727898', None, None, None, None, None, '2745163') ('4302', None, None, None, None, None, None, None, '2745163') ('4302', '22282511', '1351727882', None, None, None, None, None, '2745163') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22282511', 'None', None, None, None, None, '2745163'), ('4302', '22282511', '1351728912', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728885', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728880', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728876', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728873', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728578', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728539', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728453', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728423', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351728106', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727928', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727898', None, None, None, None, None, '2745163'), ('4302', '22282511', '1351727882', None, None, None, None, None, '2745163')] time used for this insertion : 0.017491817474365234 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.32477760314941406 time spend to save output : 0.017832517623901367 total time spend for step 5 : 0.34261012077331543 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 (2745163) 2.18user 2.47system 0:08.35elapsed 55%CPU (0avgtext+0avgdata 160052maxresident)k 456inputs+7408outputs (10major+64349minor)pagefaults 0swaps