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 (2712075) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2712075) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939479 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2712075'] with mtr_portfolio_ids : ['21939479'] and first list_photo_ids : [] new path : /proc/3704242/ Name: python3 Umask: 0002 State: R (running) Tgid: 3704242 Ngid: 0 Pid: 3704242 PPid: 3704241 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3704242 NSpid: 3704242 NSpgid: 3701407 NSsid: 3701407 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97668 kB VmRSS: 97668 kB RssAnon: 59756 kB RssFile: 37912 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 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: 53 nonvoluntary_ctxt_switches: 50 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3704242', 'Ngid': '0', 'Pid': '3704242', 'PPid': '3704241', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3704242', 'NSpid': '3704242', 'NSpgid': '3701407', 'NSsid': '3701407', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97668 kB', 'VmRSS': '97668 kB', 'RssAnon': '59756 kB', 'RssFile': '37912 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 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': '53', 'nonvoluntary_ctxt_switches': '50'} ('datou_batch_current', '3704242', '1106928', '0', '1106928', '865676', '97668', b'', 'marlene', '2712075') 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 (21939479) 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 (2712075 ) ) 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 (21939479) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1349223586, 'portfolio_id': 21939479}, {'photo_id': 1349223551, 'portfolio_id': 21939479}, {'photo_id': 1349223521, 'portfolio_id': 21939479}, {'photo_id': 1349223497, 'portfolio_id': 21939479}, {'photo_id': 1349223465, 'portfolio_id': 21939479}, {'photo_id': 1349223432, 'portfolio_id': 21939479}, {'photo_id': 1349223198, 'portfolio_id': 21939479}, {'photo_id': 1349223168, 'portfolio_id': 21939479}, {'photo_id': 1349223137, 'portfolio_id': 21939479}, {'photo_id': 1349223115, 'portfolio_id': 21939479}, {'photo_id': 1349223108, 'portfolio_id': 21939479}, {'photo_id': 1349222998, 'portfolio_id': 21939479}, {'photo_id': 1349222965, 'portfolio_id': 21939479}, {'photo_id': 1349222956, 'portfolio_id': 21939479}, {'photo_id': 1349222947, 'portfolio_id': 21939479}, {'photo_id': 1349222936, 'portfolio_id': 21939479}, {'photo_id': 1349222908, 'portfolio_id': 21939479}, {'photo_id': 1349222647, 'portfolio_id': 21939479}, {'photo_id': 1349222632, 'portfolio_id': 21939479}, {'photo_id': 1349222617, 'portfolio_id': 21939479}, {'photo_id': 1349222612, 'portfolio_id': 21939479}, {'photo_id': 1349222603, 'portfolio_id': 21939479}, {'photo_id': 1349222594, 'portfolio_id': 21939479}, {'photo_id': 1349222311, 'portfolio_id': 21939479}, {'photo_id': 1349222277, 'portfolio_id': 21939479}] map_portfolio_id_photo_id: {21939479: [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108, 1349222998, 1349222965, 1349222956, 1349222947, 1349222936, 1349222908, 1349222647, 1349222632, 1349222617, 1349222612, 1349222603, 1349222594, 1349222311, 1349222277]} ##### 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.01491236686706543 #### 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 Tue Apr 1 08:06:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21939479) 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 : 21939479 get user id for portfolio 21939479 get sub ptf for main ptf 21939479, type 3726 and hashtags ['Teint_Dans_La_Masse', 'Carton_gris', 'papier', 'kraft', 'mal_croppe', 'metal', 'flou', 'cartonnette', 'Carton_brun', 'autre_refus', '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`=21939479 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','papier','kraft','mal_croppe','metal','flou','cartonnette','Carton_brun','autre_refus','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`=21939479 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','papier','kraft','mal_croppe','metal','flou','cartonnette','Carton_brun','autre_refus','environnement','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 21939479, 'sub_port_id': 21939482, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442926, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'Carton_gris': {'main_port_id': 21939479, 'sub_port_id': 21939483, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442927, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'flou': {'main_port_id': 21939479, 'sub_port_id': 21939484, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442928, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'environnement': {'main_port_id': 21939479, 'sub_port_id': 21939485, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442929, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'metal': {'main_port_id': 21939479, 'sub_port_id': 21939486, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442930, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'plastique': {'main_port_id': 21939479, 'sub_port_id': 21939487, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442931, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 21939479, 'sub_port_id': 21939488, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442932, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'autre_refus': {'main_port_id': 21939479, 'sub_port_id': 21939489, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442933, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'cartonnette': {'main_port_id': 21939479, 'sub_port_id': 21939490, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442934, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'Carton_brun': {'main_port_id': 21939479, 'sub_port_id': 21939491, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442935, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'kraft': {'main_port_id': 21939479, 'sub_port_id': 21939492, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442936, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}, 'mal_croppe': {'main_port_id': 21939479, 'sub_port_id': 21939493, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442937, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 57), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21939482 , 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=21939479 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 (21939482) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939483 , 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=21939479 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 (21939483) result : ((1349223903,), (1349223905,), (1349223906,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939484 , 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=21939479 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 (21939484) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939485 , 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=21939479 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 (21939485) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939486 , 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=21939479 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 (21939486) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939487 , 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=21939479 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 (21939487) result : ((1349223929,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939488 , 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=21939479 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 (21939488) result : ((1349223068,), (1349223888,), (1349223889,), (1349223890,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939489 , 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=21939479 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 (21939489) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939490 , 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=21939479 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 (21939490) result : ((1349223915,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939491 , 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=21939479 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 (21939491) result : ((1349223836,), (1349223922,), (1349223923,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939492 , 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=21939479 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 (21939492) result : ((1349223936,), (1349223937,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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 21939493 , 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=21939479 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 (21939493) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21939479) result : ((1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) 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`=21939479 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','papier','kraft','mal_croppe','metal','flou','cartonnette','Carton_brun','autre_refus','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`=21939479 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','papier','kraft','mal_croppe','metal','flou','cartonnette','Carton_brun','autre_refus','environnement','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 21939479, 'sub_port_id': 21939494, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442938, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'Carton_gris': {'main_port_id': 21939479, 'sub_port_id': 21939495, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442939, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'flou': {'main_port_id': 21939479, 'sub_port_id': 21939496, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442940, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'environnement': {'main_port_id': 21939479, 'sub_port_id': 21939497, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442941, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'metal': {'main_port_id': 21939479, 'sub_port_id': 21939498, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442942, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'plastique': {'main_port_id': 21939479, 'sub_port_id': 21939499, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442943, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 21939479, 'sub_port_id': 21939500, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442944, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'autre_refus': {'main_port_id': 21939479, 'sub_port_id': 21939501, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442945, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'cartonnette': {'main_port_id': 21939479, 'sub_port_id': 21939502, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442946, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'Carton_brun': {'main_port_id': 21939479, 'sub_port_id': 21939503, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442947, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'kraft': {'main_port_id': 21939479, 'sub_port_id': 21939504, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442948, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}, 'mal_croppe': {'main_port_id': 21939479, 'sub_port_id': 21939505, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14442949, 'last_updated_at': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 1, 8, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 1, 8, 4, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939494,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939482 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939495,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939483 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939496,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939484 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939497,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939485 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939498,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939486 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939499,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939487 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939500,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939488 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939501,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939489 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939502,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939490 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939503,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939491 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939504,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939492 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21939505,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21939493 lien utilise dans velours : https://www.fotonower.com/velours/21939494,21939495,21939496,21939497,21939498,21939499,21939500,21939501,21939502,21939503,21939504,21939505?tags=papier,Carton_gris,flou,environnement,metal,plastique,Teint_Dans_La_Masse,autre_refus,cartonnette,Carton_brun,kraft,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21939479]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] map_info['map_portfolio_photo'] : {21939479: [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108, 1349222998, 1349222965, 1349222956, 1349222947, 1349222936, 1349222908, 1349222647, 1349222632, 1349222617, 1349222612, 1349222603, 1349222594, 1349222311, 1349222277]} final : False mtd_id 4302 list_pids : [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] Looping around the photos to save general results len do output : 1 /21939479. 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, '2712075') ('4302', '21939479', '1349223586', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223551', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223521', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223497', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223465', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223432', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223198', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223168', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223137', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223115', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223108', None, None, None, None, None, '2712075') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21939479', "{'papier': 21939482, 'Carton_gris': 21939483, 'flou': 21939484, 'environnement': 21939485, 'metal': 21939486, 'plastique': 21939487, 'Teint_Dans_La_Masse': 21939488, 'autre_refus': 21939489, 'cartonnette': 21939490, 'Carton_brun': 21939491, 'kraft': 21939492, 'mal_croppe': 21939493}", None, None, None, None, '2712075'), ('4302', '21939479', '1349223586', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223551', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223521', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223497', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223465', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223432', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223198', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223168', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223137', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223115', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223108', None, None, None, None, None, '2712075')] time used for this insertion : 0.15869450569152832 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5035147666931152 time spend to save output : 0.15901470184326172 total time spend for step 1 : 1.662529468536377 step2:final Tue Apr 1 08:07:00 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 (21939479) 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 21939479 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349222311,1349222277,1349222647,1349222632,1349222617,1349222612,1349222603,1349222594,1349222998,1349222965,1349222956,1349222947,1349222936,1349222908,1349223198,1349223168,1349223137,1349223115,1349223108,1349223586,1349223551,1349223521,1349223497,1349223465,1349223432); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21939479]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} new output for save of step final : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] map_info['map_portfolio_photo'] : {21939479: [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108, 1349222998, 1349222965, 1349222956, 1349222947, 1349222936, 1349222908, 1349222647, 1349222632, 1349222617, 1349222612, 1349222603, 1349222594, 1349222311, 1349222277]} final : False mtd_id 4302 list_pids : [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] Looping around the photos to save general results len do output : 11 /1349223586.Didn't retrieve data . /1349223551.Didn't retrieve data . /1349223521.Didn't retrieve data . /1349223497.Didn't retrieve data . /1349223465.Didn't retrieve data . /1349223432.Didn't retrieve data . /1349223198.Didn't retrieve data . /1349223168.Didn't retrieve data . /1349223137.Didn't retrieve data . /1349223115.Didn't retrieve data . /1349223108.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, '2712075') ('4302', '21939479', '1349223586', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223551', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223521', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223497', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223465', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223432', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223198', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223168', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223137', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223115', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223108', None, None, None, None, None, '2712075') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '21939479', '1349223586', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223551', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223521', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223497', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223465', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223432', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223198', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223168', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223137', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223115', '0.08795730883587391', None, None, None, None, '2712075'), ('4302', '21939479', '1349223108', '0.08795730883587391', None, None, None, None, '2712075')] time used for this insertion : 0.013326168060302734 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06620407104492188 time spend to save output : 0.013844966888427734 total time spend for step 2 : 0.08004903793334961 step3:velours_tree Tue Apr 1 08:07:00 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 : {21939479: [{'papier': 21939482, 'Carton_gris': 21939483, 'flou': 21939484, 'environnement': 21939485, 'metal': 21939486, 'plastique': 21939487, 'Teint_Dans_La_Masse': 21939488, 'autre_refus': 21939489, 'cartonnette': 21939490, 'Carton_brun': 21939491, 'kraft': 21939492, 'mal_croppe': 21939493}]} input_args_next_step : {21939479: ()} output_args : {21939479: [{'papier': 21939482, 'Carton_gris': 21939483, 'flou': 21939484, 'environnement': 21939485, 'metal': 21939486, 'plastique': 21939487, 'Teint_Dans_La_Masse': 21939488, 'autre_refus': 21939489, 'cartonnette': 21939490, 'Carton_brun': 21939491, 'kraft': 21939492, 'mal_croppe': 21939493}]} args : 21939479 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 21939482, 'Carton_gris': 21939483, 'flou': 21939484, 'environnement': 21939485, 'metal': 21939486, 'plastique': 21939487, 'Teint_Dans_La_Masse': 21939488, 'autre_refus': 21939489, 'cartonnette': 21939490, 'Carton_brun': 21939491, 'kraft': 21939492, 'mal_croppe': 21939493},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21939479) 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([21939479]) 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.36101818084716797 time spend to save output : 5.0067901611328125e-05 total time spend for step 3 : 0.3610682487487793 step4:send_mail_cod Tue Apr 1 08:07:00 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 : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} input_args_next_step : {1349223586: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223586 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223551 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223521 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223497 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223465 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223432 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223198 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223168 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223137 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223115 depend.output_id : 0 input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ()} output_args : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',)} args : 1349223108 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 : {21939479: [{'papier': 21939482, 'Carton_gris': 21939483, 'flou': 21939484, 'environnement': 21939485, 'metal': 21939486, 'plastique': 21939487, 'Teint_Dans_La_Masse': 21939488, 'autre_refus': 21939489, 'cartonnette': 21939490, 'Carton_brun': 21939491, 'kraft': 21939492, 'mal_croppe': 21939493}]} input_args_next_step : {1349223586: ('0.08795730883587391',), 1349223551: ('0.08795730883587391',), 1349223521: ('0.08795730883587391',), 1349223497: ('0.08795730883587391',), 1349223465: ('0.08795730883587391',), 1349223432: ('0.08795730883587391',), 1349223198: ('0.08795730883587391',), 1349223168: ('0.08795730883587391',), 1349223137: ('0.08795730883587391',), 1349223115: ('0.08795730883587391',), 1349223108: ('0.08795730883587391',), 21939479: ()} output_args : {21939479: [{'papier': 21939482, 'Carton_gris': 21939483, 'flou': 21939484, 'environnement': 21939485, 'metal': 21939486, 'plastique': 21939487, 'Teint_Dans_La_Masse': 21939488, 'autre_refus': 21939489, 'cartonnette': 21939490, 'Carton_brun': 21939491, 'kraft': 21939492, 'mal_croppe': 21939493}]} args : 21939479 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 :12, first value : ('0.08795730883587391',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21939479) 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 (1349223586,1349223551,1349223521,1349223497,1349223465,1349223432,1349223198,1349223168,1349223137,1349223115,1349223108) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349223108 begin to download photo : 1349223168 begin to download photo : 1349223465 begin to download photo : 1349223551 download finish for photo 1349223168 begin to download photo : 1349223198 download finish for photo 1349223108 begin to download photo : 1349223115 download finish for photo 1349223551 begin to download photo : 1349223586 download finish for photo 1349223465 begin to download photo : 1349223497 download finish for photo 1349223115 begin to download photo : 1349223137 download finish for photo 1349223586 download finish for photo 1349223198 begin to download photo : 1349223432 download finish for photo 1349223497 begin to download photo : 1349223521 download finish for photo 1349223137 download finish for photo 1349223432 download finish for photo 1349223521 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette219394841743487620/ imagette219394861743487620/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P21939479_01-04-2025_08_07_00.pdf 21939484 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=21939484 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219394841743487620 21939486 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=21939486 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219394861743487620 21939487 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=21939487 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349223929: '1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418332_0.png'} change filename to text .imagette219394871743487620/ imagette219394871743487620/1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418332_0.png.png imagette219394891743487620/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/5ee38981f1c5a390c934034c977b9fee_14704350.png imagette219394871743487620 21939489 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=21939489 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219394891743487620 21939490 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=21939490 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349223915: '1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418308_0.png'} change filename to text .imagette219394901743487620/ imagette219394901743487620/1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418308_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/dd9eabcd307ab785248548012781eb3d_54998658.png imagette219394901743487620 21939492 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=21939492 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349223936: '1743487531_45364_1349222956_2e41cbd1eebdf78b1eaed159ab5ab510_rle_crop_3742418321_0.png', 1349223937: '1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418333_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/95887b389c921667c6ed3dd90f8b261b_76420990.png change filename to text .imagette219394921743487621/ imagette219394921743487621/1743487531_45364_1349222956_2e41cbd1eebdf78b1eaed159ab5ab510_rle_crop_3742418321_0.png.png imagette219394921743487621/1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418333_0.png.png imagette219394931743487621/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/40ade4ab5381aeaba46c275cadad1c22_98945429.png imagette219394921743487621 21939493 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=21939493 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219394931743487621 21939483 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=21939483 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349223903: '1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418309_0.png', 1349223905: '1743487531_45364_1349222956_2e41cbd1eebdf78b1eaed159ab5ab510_rle_crop_3742418324_0.png', 1349223906: '1743487531_45364_1349222936_683f5036d6b594131d0ca5da76f5e11d_rle_crop_3742418344_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/2dbec5bac2571b5384693239cff69a04_19294045.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/7a643f14815ac0df6a6892f45bb2338d_86321880.png change filename to text .imagette219394831743487621/ imagette219394831743487621/1743487531_45364_1349222956_2e41cbd1eebdf78b1eaed159ab5ab510_rle_crop_3742418324_0.png.png imagette219394831743487621/1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418309_0.png.png imagette219394831743487621/1743487531_45364_1349222936_683f5036d6b594131d0ca5da76f5e11d_rle_crop_3742418344_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/ec2ddc5304277c0a4d0cda2bcfffc648_97606861.png imagette219394831743487621 21939488 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=21939488 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349223068: '1743487391_43779_1349222277_f7bac7fb0aaeee0f72148f1fad35e989_rle_crop_3742417617_0.png', 1349223888: '1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418311_0.png', 1349223889: '1743487531_45364_1349222956_2e41cbd1eebdf78b1eaed159ab5ab510_rle_crop_3742418325_0.png', 1349223890: '1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418335_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/ddaeef2f31cfecf5a9480e0eb0463c74_48941324.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/baba3d510689553073a5c6288cd02259_56998608.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/9ee217a5f17e2da88996822d3ffd8434_12698784.png change filename to text .imagette219394881743487621/ imagette219394881743487621/1743487391_43779_1349222277_f7bac7fb0aaeee0f72148f1fad35e989_rle_crop_3742417617_0.png.png imagette219394881743487621/1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418311_0.png.png imagette219394881743487621/1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418335_0.png.png imagette219394881743487621/1743487531_45364_1349222956_2e41cbd1eebdf78b1eaed159ab5ab510_rle_crop_3742418325_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/2a22c02b5041d7652cefcf75cb75687a_97558604.png imagette219394881743487621 21939491 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=21939491 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349223836: '1743487551_45638_1349222647_8da662155be321064175b9bfeaaa2bcf_rle_crop_3742418295_0.png', 1349223922: '1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418312_0.png', 1349223923: '1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418334_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/29aabf8d422c1ab3dcc79ea99fd3535d_14899923.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/082f10a68b6f678b8ee5094ad6fb953d_97740427.png change filename to text .imagette219394911743487621/ imagette219394911743487621/1743487531_45364_1349222947_6b9c8748da18d702fa01fafe21251437_rle_crop_3742418334_0.png.png imagette219394911743487621/1743487531_45364_1349222965_10059a37282b527c57e4b26c367d514f_rle_crop_3742418312_0.png.png imagette219394911743487621/1743487551_45638_1349222647_8da662155be321064175b9bfeaaa2bcf_rle_crop_3742418295_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/6a840dfacd9d254e9d54fcbd405d7e68_32132701.png imagette219394911743487621 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21939479 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21939494,21939495,21939496,21939497,21939498,21939499,21939500,21939501,21939502,21939503,21939504,21939505?tags=papier,Carton_gris,flou,environnement,metal,plastique,Teint_Dans_La_Masse,autre_refus,cartonnette,Carton_brun,kraft,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1349223586] : ('0.08795730883587391',) no score found for photo 1349223586 We are sending mail with results at report@fotonower.com args[1349223551] : ('0.08795730883587391',) no score found for photo 1349223551 We are sending mail with results at report@fotonower.com args[1349223521] : ('0.08795730883587391',) no score found for photo 1349223521 We are sending mail with results at report@fotonower.com args[1349223497] : ('0.08795730883587391',) no score found for photo 1349223497 We are sending mail with results at report@fotonower.com args[1349223465] : ('0.08795730883587391',) no score found for photo 1349223465 We are sending mail with results at report@fotonower.com args[1349223432] : ('0.08795730883587391',) no score found for photo 1349223432 We are sending mail with results at report@fotonower.com args[1349223198] : ('0.08795730883587391',) no score found for photo 1349223198 We are sending mail with results at report@fotonower.com args[1349223168] : ('0.08795730883587391',) no score found for photo 1349223168 We are sending mail with results at report@fotonower.com args[1349223137] : ('0.08795730883587391',) no score found for photo 1349223137 We are sending mail with results at report@fotonower.com args[1349223115] : ('0.08795730883587391',) no score found for photo 1349223115 We are sending mail with results at report@fotonower.com args[1349223108] : ('0.08795730883587391',) no score found for photo 1349223108 We are sending mail with results at report@fotonower.com refus_total : 0.08795730883587391 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=21939479 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_P21939479_01-04-2025_08_07_00.pdf results_Auto_P21939479_01-04-2025_08_07_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21939479_01-04-2025_08_07_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','21939479','results_Auto_P21939479_01-04-2025_08_07_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21939479_01-04-2025_08_07_00.pdf','pdf','','0.16','0.08795730883587391') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21939479]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] map_info['map_portfolio_photo'] : {21939479: [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108, 1349222998, 1349222965, 1349222956, 1349222947, 1349222936, 1349222908, 1349222647, 1349222632, 1349222617, 1349222612, 1349222603, 1349222594, 1349222311, 1349222277]} final : False mtd_id 4302 list_pids : [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] 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, '2712075') ('4302', '21939479', '1349223586', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223551', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223521', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223497', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223465', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223432', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223198', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223168', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223137', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223115', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223108', None, None, None, None, None, '2712075') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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', '21939479', '1349223586', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223551', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223521', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223497', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223465', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223432', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223198', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223168', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223137', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223115', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223108', None, None, None, None, None, '2712075')] time used for this insertion : 0.013349771499633789 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.3351638317108154 time spend to save output : 0.013598442077636719 total time spend for step 4 : 2.348762273788452 step5:split_time_score Tue Apr 1 08:07:02 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 : ['21939479'] 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 : [('21939479',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21939479) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349223551: {'path': 'temp/1743487620_3704242_1349223551_dabfd90e0702945e296e14bc1e750a17.jpg', 'extension': 'jpg'}, 1349223586: {'path': 'temp/1743487620_3704242_1349223586_c46f69e09e02d61d6e16260cec4eb084.jpg', 'extension': 'jpg'}, 1349223108: {'path': 'temp/1743487620_3704242_1349223108_d1e2d03af97b90d955eb05bab8ec4e25.jpg', 'extension': 'jpg'}, 1349223115: {'path': 'temp/1743487620_3704242_1349223115_9c9168902b882c574d635551c96d0114.jpg', 'extension': 'jpg'}, 1349223137: {'path': 'temp/1743487620_3704242_1349223137_23a0099a688aa719553b91b7dc5aeb86.jpg', 'extension': 'jpg'}, 1349223168: {'path': 'temp/1743487620_3704242_1349223168_0db2c88ad419210575d6c878df27beae.jpg', 'extension': 'jpg'}, 1349223198: {'path': 'temp/1743487620_3704242_1349223198_9ebf886c2f4941f36bfb1fc0d354424c.jpg', 'extension': 'jpg'}, 1349223432: {'path': 'temp/1743487620_3704242_1349223432_f1ec31497188f090a33f70d82025a0ae.jpg', 'extension': 'jpg'}, 1349223465: {'path': 'temp/1743487620_3704242_1349223465_ac730693a724295ac2c586837ffc70f3.jpg', 'extension': 'jpg'}, 1349223497: {'path': 'temp/1743487620_3704242_1349223497_d35bda04c60a7455b5a3ae5b6f064bf3.jpg', 'extension': 'jpg'}, 1349223521: {'path': 'temp/1743487620_3704242_1349223521_fb6e04277d991ef01ea634450a60e1a9.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 = 21939479; (('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 = 21939479 group by h (('08', 25),) 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=21939479 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 (21939479) 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 (21939479) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 01042025 21939479 Nombre de photos uploadées : 25 / 23040 (0%) 01042025 21939479 Nombre de photos taguées (types de déchets): 0 / 25 (0%) 01042025 21939479 Nombre de photos taguées (volume) : 0 / 25 (0%) [{'photo_id': 1349222311, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/41436cd44f6f192121c176c3c767778a.jpg', 'username': None, 'uploaded_at': 1743487277, 'text': 'image_01042025_08_00_33_010134m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349222277, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/f7bac7fb0aaeee0f72148f1fad35e989.jpg', 'username': None, 'uploaded_at': 1743487277, 'text': 'image_01042025_08_00_43_010066m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1349222647, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/8da662155be321064175b9bfeaaa2bcf.jpg', 'username': None, 'uploaded_at': 1743487327, 'text': 'image_01042025_08_00_53_10134.jpg'}, {'photo_id': 1349222632, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/1/53a11b3c3ad39a3d07f9cc63daf90ddb.jpg', 'username': None, 'uploaded_at': 1743487327, 'text': 'image_01042025_08_01_04_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0012676715850830078 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21939479, '2025-04-01' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1705632,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.021666526794433594 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= 1705632 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1705632, 'dashboard_run_id': 1714102, 'mtr_portfolio_id': 21937221, 'dashboard_result_id': 9781616, '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_P21937221_01-04-2025_07_33_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21937228, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21937229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21937230, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21937231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21937232, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21937233, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21937234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21937235, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21937236, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21937237, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21937238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21937239, 'pht': 3726}}"}, {'dashboat_entry_day': 1705632, 'dashboard_run_id': 1714102, 'mtr_portfolio_id': 21938116, 'dashboard_result_id': 9781617, '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_P21938116_01-04-2025_07_49_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21938122, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21938123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21938124, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21938125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21938126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21938127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21938128, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21938129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21938130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21938131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21938132, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21938133, 'pht': 3726}}"}, {'dashboat_entry_day': 1705632, 'dashboard_run_id': 1714102, 'mtr_portfolio_id': 21938715, 'dashboard_result_id': 9781618, '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_P21938715_01-04-2025_08_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21938742, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21938743, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21938744, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21938745, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21938746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21938747, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21938748, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21938749, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21938750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21938751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21938752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21938753, 'pht': 3726}}"}, {'dashboat_entry_day': 1705632, 'dashboard_run_id': 1714102, 'mtr_portfolio_id': 21939479, 'dashboard_result_id': 9781619, '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_P21939479_01-04-2025_08_04_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21939482, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21939483, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21939484, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21939485, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21939486, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21939487, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21939488, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21939489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21939490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21939491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21939492, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21939493, '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 = 21937221 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': 2711895, 'mtr_portfolio_id': 21937221, 'created_at': datetime.datetime(2025, 4, 1, 7, 33, 1), 'result': '0.05532164991775658', 'result_long': None, 'result_double': None}] Qualite : 0.05532164991775658 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21937221 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21937221_01-04-2025_07_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21937221 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_P21937221_01-04-2025_07_33_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21937228, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21937229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21937230, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21937231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21937232, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21937233, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21937234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21937235, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21937236, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21937237, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21937238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21937239, 'pht': 3726}}" where mtr_portfolio_id = 21937221 and dashboard_run_id = 1714102 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`=21937221 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9781616, 0.05532164991775658, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21937221_01-04-2025_07_33_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 21937228, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21937229, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21937230, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21937231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21937232, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21937233, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21937234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21937235, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21937236, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21937237, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21937238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21937239, '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 = 21938116 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': 2711967, 'mtr_portfolio_id': 21938116, 'created_at': datetime.datetime(2025, 4, 1, 7, 48, 59), 'result': '0.045723350067073176', 'result_long': None, 'result_double': None}] Qualite : 0.045723350067073176 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21938116 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21938116_01-04-2025_07_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21938116 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_P21938116_01-04-2025_07_49_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21938122, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21938123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21938124, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21938125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21938126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21938127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21938128, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21938129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21938130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21938131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21938132, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21938133, 'pht': 3726}}" where mtr_portfolio_id = 21938116 and dashboard_run_id = 1714102 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`=21938116 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9781617, 0.045723350067073176, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21938116_01-04-2025_07_49_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21938122, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21938123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21938124, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21938125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21938126, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21938127, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21938128, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21938129, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21938130, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21938131, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21938132, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21938133, '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 = 21938715 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': 2712013, 'mtr_portfolio_id': 21938715, 'created_at': datetime.datetime(2025, 4, 1, 8, 2, 58), 'result': '0.05708466206649813', 'result_long': None, 'result_double': None}] Qualite : 0.05708466206649813 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21938715 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21938715_01-04-2025_08_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21938715 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_P21938715_01-04-2025_08_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21938742, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21938743, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21938744, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21938745, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21938746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21938747, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21938748, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21938749, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21938750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21938751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21938752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21938753, 'pht': 3726}}" where mtr_portfolio_id = 21938715 and dashboard_run_id = 1714102 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`=21938715 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9781618, 0.05708466206649813, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21938715_01-04-2025_08_02_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21938742, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21938743, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21938744, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21938745, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21938746, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21938747, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21938748, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21938749, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21938750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21938751, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21938752, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21938753, '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 = 21939479 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': 2712075, 'mtr_portfolio_id': 21939479, 'created_at': datetime.datetime(2025, 4, 1, 8, 7), 'result': '0.08795730883587391', 'result_long': None, 'result_double': None}] Qualite : 0.08795730883587391 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21939479 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21939479_01-04-2025_08_07_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21939479 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_P21939479_01-04-2025_08_07_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21939482, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21939483, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21939484, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21939485, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21939486, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21939487, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21939488, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21939489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21939490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21939491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21939492, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21939493, 'pht': 3726}}" where mtr_portfolio_id = 21939479 and dashboard_run_id = 1714102 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`=21939479 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9781619, 0.08795730883587391, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21939479_01-04-2025_08_07_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21939482, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21939483, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21939484, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21939485, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21939486, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21939487, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21939488, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21939489, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21939490, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21939491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21939492, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21939493, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21937221,21938116,21938715,21939479) result : ((1349215861,), (1349215867,), (1349215872,), (1349215877,), (1349215884,), (1349215896,), (1349215898,), (1349215901,), (1349215905,), (1349215909,), (1349215950,), (1349215955,), (1349215975,), (1349215977,), (1349215983,), (1349215987,), (1349215990,), (1349215992,), (1349216066,), (1349216067,), (1349216068,), (1349216173,), (1349216177,), (1349216193,), (1349216240,), (1349216247,), (1349216262,), (1349216436,), (1349216446,), (1349216456,), (1349216484,), (1349216517,), (1349216520,), (1349216662,), (1349216673,), (1349216718,), (1349216728,), (1349216737,), (1349216818,), (1349216820,), (1349216830,), (1349216848,), (1349216854,), (1349216888,), (1349216892,), (1349216922,), (1349217000,), (1349217217,), (1349217225,), (1349217239,), (1349217328,), (1349217274,), (1349217286,), (1349217313,), (1349217322,), (1349217345,), (1349217383,), (1349217410,), (1349217439,), (1349217458,), (1349217579,), (1349217584,), (1349217588,), (1349217591,), (1349217594,), (1349217632,), (1349217640,), (1349217651,), (1349217890,), (1349217918,), (1349217923,), (1349217962,), (1349217974,), (1349218080,), (1349218110,), (1349218141,), (1349218157,), (1349218162,), (1349218193,), (1349218196,), (1349218199,), (1349218207,), (1349218275,), (1349218309,), (1349218337,), (1349218373,), (1349218378,), (1349218415,), (1349218419,), (1349218422,), (1349218425,), (1349218429,), (1349218538,), (1349218539,), (1349218543,), (1349218548,), (1349218552,), (1349218556,), (1349218582,), (1349218589,), (1349218593,), (1349218628,), (1349218637,), (1349218642,), (1349218646,), (1349218651,), (1349218729,), (1349218733,), (1349218740,), (1349218746,), (1349218750,), (1349218762,), (1349218825,), (1349218882,), (1349218911,), (1349218920,), (1349218952,), (1349218954,), (1349219073,), (1349219029,), (1349219030,), (1349219061,), (1349219064,), (1349219157,), (1349219169,), (1349219492,), (1349219497,), (1349219501,), (1349219504,), (1349219548,), (1349219549,), (1349219553,), (1349219829,), (1349219849,), (1349219921,), (1349219947,), (1349219951,), (1349220050,), (1349220054,), (1349220057,), (1349220062,), (1349220066,), (1349220130,), (1349220132,), (1349220137,), (1349220163,), (1349220164,), (1349220166,), (1349220196,), (1349220218,), (1349220220,), (1349220251,), (1349220303,), (1349220384,), (1349220386,), (1349220408,), (1349220410,), (1349220415,), (1349220495,), (1349220997,), (1349221004,), (1349221013,), (1349221169,), (1349221175,), (1349221180,), (1349221184,), (1349221186,), (1349221692,), (1349221765,), (1349221801,), (1349221837,), (1349221942,), (1349221954,), (1349221988,), (1349222025,), (1349222333,), (1349222277,), (1349222311,), (1349222594,), (1349222603,), (1349222612,), (1349222617,), (1349222632,), (1349222647,), (1349222908,), (1349222936,), (1349222947,), (1349222956,), (1349222965,), (1349222998,), (1349223108,), (1349223115,), (1349223137,), (1349223168,), (1349223198,), (1349223432,), (1349223465,), (1349223497,), (1349223521,), (1349223551,), (1349223586,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01042025': {'nb_upload': 25, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21939479]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] map_info['map_portfolio_photo'] : {21939479: [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108, 1349222998, 1349222965, 1349222956, 1349222947, 1349222936, 1349222908, 1349222647, 1349222632, 1349222617, 1349222612, 1349222603, 1349222594, 1349222311, 1349222277]} final : True mtd_id 4302 list_pids : [1349223586, 1349223551, 1349223521, 1349223497, 1349223465, 1349223432, 1349223198, 1349223168, 1349223137, 1349223115, 1349223108] Looping around the photos to save general results len do output : 1 /21939479Didn'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, '2712075') ('4302', '21939479', '1349223586', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223551', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223521', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223497', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223465', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223432', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223198', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223168', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223137', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223115', None, None, None, None, None, '2712075') ('4302', None, None, None, None, None, None, None, '2712075') ('4302', '21939479', '1349223108', None, None, None, None, None, '2712075') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '21939479', 'None', None, None, None, None, '2712075'), ('4302', '21939479', '1349223586', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223551', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223521', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223497', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223465', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223432', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223198', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223168', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223137', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223115', None, None, None, None, None, '2712075'), ('4302', '21939479', '1349223108', None, None, None, None, None, '2712075')] time used for this insertion : 0.013192176818847656 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3346567153930664 time spend to save output : 0.013476371765136719 total time spend for step 5 : 0.3481330871582031 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 (2712075) 2.19user 2.37system 0:08.80elapsed 51%CPU (0avgtext+0avgdata 158936maxresident)k 4032inputs+8736outputs (69major+64009minor)pagefaults 0swaps