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 (22577091) 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 (2777384 ) ) 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 (22577091) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1355004613, 'portfolio_id': 22577091}, {'photo_id': 1355004611, 'portfolio_id': 22577091}, {'photo_id': 1355004606, 'portfolio_id': 22577091}, {'photo_id': 1355004590, 'portfolio_id': 22577091}, {'photo_id': 1355004447, 'portfolio_id': 22577091}, {'photo_id': 1355004335, 'portfolio_id': 22577091}, {'photo_id': 1355004219, 'portfolio_id': 22577091}, {'photo_id': 1355004111, 'portfolio_id': 22577091}, {'photo_id': 1355004019, 'portfolio_id': 22577091}, {'photo_id': 1355003681, 'portfolio_id': 22577091}, {'photo_id': 1355002745, 'portfolio_id': 22577091}, {'photo_id': 1355002720, 'portfolio_id': 22577091}, {'photo_id': 1355002691, 'portfolio_id': 22577091}, {'photo_id': 1355002636, 'portfolio_id': 22577091}, {'photo_id': 1355002634, 'portfolio_id': 22577091}, {'photo_id': 1355002632, 'portfolio_id': 22577091}, {'photo_id': 1355002630, 'portfolio_id': 22577091}, {'photo_id': 1355002628, 'portfolio_id': 22577091}, {'photo_id': 1355002484, 'portfolio_id': 22577091}, {'photo_id': 1355002458, 'portfolio_id': 22577091}, {'photo_id': 1355002433, 'portfolio_id': 22577091}, {'photo_id': 1355002394, 'portfolio_id': 22577091}, {'photo_id': 1355002368, 'portfolio_id': 22577091}, {'photo_id': 1355002340, 'portfolio_id': 22577091}, {'photo_id': 1355002061, 'portfolio_id': 22577091}, {'photo_id': 1355002032, 'portfolio_id': 22577091}, {'photo_id': 1355001973, 'portfolio_id': 22577091}, {'photo_id': 1355001916, 'portfolio_id': 22577091}, {'photo_id': 1355001843, 'portfolio_id': 22577091}, {'photo_id': 1355001788, 'portfolio_id': 22577091}, {'photo_id': 1355001006, 'portfolio_id': 22577091}, {'photo_id': 1355000937, 'portfolio_id': 22577091}, {'photo_id': 1355000864, 'portfolio_id': 22577091}, {'photo_id': 1355000290, 'portfolio_id': 22577091}, {'photo_id': 1355000215, 'portfolio_id': 22577091}, {'photo_id': 1355000029, 'portfolio_id': 22577091}, {'photo_id': 1354999812, 'portfolio_id': 22577091}, {'photo_id': 1354998970, 'portfolio_id': 22577091}, {'photo_id': 1354998943, 'portfolio_id': 22577091}, {'photo_id': 1354997055, 'portfolio_id': 22577091}, {'photo_id': 1354996566, 'portfolio_id': 22577091}] map_portfolio_id_photo_id: {22577091: [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681, 1355002745, 1355002720, 1355002691, 1355002636, 1355002634, 1355002632, 1355002630, 1355002628, 1355002484, 1355002458, 1355002433, 1355002394, 1355002368, 1355002340, 1355002061, 1355002032, 1355001973, 1355001916, 1355001843, 1355001788, 1355001006, 1355000937, 1355000864, 1355000290, 1355000215, 1355000029, 1354999812, 1354998970, 1354998943, 1354997055, 1354996566]} ##### 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.015228509902954102 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu May 1 03:12: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 (22577091) 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 : 22577091 get user id for portfolio 22577091 get sub ptf for main ptf 22577091, type 3726 and hashtags ['kraft', 'papier', 'cartonnette', 'metal', 'Carton_gris', 'Teint_Dans_La_Masse', 'environnement', 'Carton_brun', 'mal_croppe', 'autre_refus', 'flou', '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`=22577091 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','cartonnette','metal','Carton_gris','Teint_Dans_La_Masse','environnement','Carton_brun','mal_croppe','autre_refus','flou','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`=22577091 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','cartonnette','metal','Carton_gris','Teint_Dans_La_Masse','environnement','Carton_brun','mal_croppe','autre_refus','flou','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 22577091, 'sub_port_id': 22577093, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009332, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'flou': {'main_port_id': 22577091, 'sub_port_id': 22577094, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009333, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'Carton_gris': {'main_port_id': 22577091, 'sub_port_id': 22577095, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009334, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'papier': {'main_port_id': 22577091, 'sub_port_id': 22577096, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009335, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'mal_croppe': {'main_port_id': 22577091, 'sub_port_id': 22577097, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009336, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'plastique': {'main_port_id': 22577091, 'sub_port_id': 22577098, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009337, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'metal': {'main_port_id': 22577091, 'sub_port_id': 22577099, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009338, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'cartonnette': {'main_port_id': 22577091, 'sub_port_id': 22577100, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009339, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'environnement': {'main_port_id': 22577091, 'sub_port_id': 22577101, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009340, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'autre_refus': {'main_port_id': 22577091, 'sub_port_id': 22577102, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009341, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 22577091, 'sub_port_id': 22577103, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009342, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}, 'kraft': {'main_port_id': 22577091, 'sub_port_id': 22577104, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009343, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 30), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22577093 , 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=22577091 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 (22577093) result : ((1355002656,), (1355003204,), (1355003205,), (1355003206,), (1355004537,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577094 , 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=22577091 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 (22577094) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577095 , 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=22577091 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 (22577095) result : ((1355003930,), (1355004527,), (1355004528,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577096 , 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=22577091 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 (22577096) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577097 , 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=22577091 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 (22577097) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577098 , 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=22577091 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 (22577098) result : ((1355003236,), (1355003237,), (1355004551,), (1355004553,), (1355004555,), (1355004557,), (1355004559,), (1355004561,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577099 , 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=22577091 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 (22577099) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577100 , 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=22577091 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 (22577100) result : ((1355003172,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577101 , 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=22577091 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 (22577101) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577102 , 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=22577091 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 (22577102) result : ((1355002658,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577103 , 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=22577091 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 (22577103) result : ((1355003147,), (1355003150,), (1355003151,), (1355003905,), (1355003907,), (1355004524,), (1355004525,), (1355004526,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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 22577104 , 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=22577091 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 (22577104) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22577091) result : ((1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) 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`=22577091 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','cartonnette','metal','Carton_gris','Teint_Dans_La_Masse','environnement','Carton_brun','mal_croppe','autre_refus','flou','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`=22577091 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','papier','cartonnette','metal','Carton_gris','Teint_Dans_La_Masse','environnement','Carton_brun','mal_croppe','autre_refus','flou','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_brun': {'main_port_id': 22577091, 'sub_port_id': 22577105, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009344, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'flou': {'main_port_id': 22577091, 'sub_port_id': 22577106, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009345, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'Carton_gris': {'main_port_id': 22577091, 'sub_port_id': 22577107, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009346, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'papier': {'main_port_id': 22577091, 'sub_port_id': 22577108, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009347, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'mal_croppe': {'main_port_id': 22577091, 'sub_port_id': 22577109, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009348, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'plastique': {'main_port_id': 22577091, 'sub_port_id': 22577110, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009349, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'metal': {'main_port_id': 22577091, 'sub_port_id': 22577111, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009350, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'cartonnette': {'main_port_id': 22577091, 'sub_port_id': 22577112, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009351, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'environnement': {'main_port_id': 22577091, 'sub_port_id': 22577113, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009352, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'autre_refus': {'main_port_id': 22577091, 'sub_port_id': 22577114, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009353, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 22577091, 'sub_port_id': 22577115, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009354, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 7, 34), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}, 'kraft': {'main_port_id': 22577091, 'sub_port_id': 22577116, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15009355, 'last_updated_at': datetime.datetime(2025, 5, 1, 3, 10, 31), 'last_updated_at_desc': datetime.datetime(2025, 5, 1, 3, 10, 31), 'last_updated_at_asc': datetime.datetime(2025, 5, 1, 3, 7, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577105,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577093 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577106,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577094 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577107,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577095 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577108,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577096 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577109,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577097 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577110,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577098 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577111,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577099 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577112,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577100 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577113,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577101 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577114,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577102 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577115,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577103 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22577116,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22577104 lien utilise dans velours : https://www.fotonower.com/velours/22577105,22577106,22577107,22577108,22577109,22577110,22577111,22577112,22577113,22577114,22577115,22577116?tags=Carton_brun,flou,Carton_gris,papier,mal_croppe,plastique,metal,cartonnette,environnement,autre_refus,Teint_Dans_La_Masse,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22577091]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] map_info['map_portfolio_photo'] : {22577091: [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681, 1355002745, 1355002720, 1355002691, 1355002636, 1355002634, 1355002632, 1355002630, 1355002628, 1355002484, 1355002458, 1355002433, 1355002394, 1355002368, 1355002340, 1355002061, 1355002032, 1355001973, 1355001916, 1355001843, 1355001788, 1355001006, 1355000937, 1355000864, 1355000290, 1355000215, 1355000029, 1354999812, 1354998970, 1354998943, 1354997055, 1354996566]} final : False mtd_id 4302 list_pids : [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] Looping around the photos to save general results len do output : 1 /22577091. 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, '2777384') ('4302', '22577091', '1355004613', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004611', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004606', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004590', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004447', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004335', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004219', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004111', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004019', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355003681', None, None, None, None, None, '2777384') 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', None, '22577091', "{'Carton_brun': 22577093, 'flou': 22577094, 'Carton_gris': 22577095, 'papier': 22577096, 'mal_croppe': 22577097, 'plastique': 22577098, 'metal': 22577099, 'cartonnette': 22577100, 'environnement': 22577101, 'autre_refus': 22577102, 'Teint_Dans_La_Masse': 22577103, 'kraft': 22577104}", None, None, None, None, '2777384'), ('4302', '22577091', '1355004613', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004611', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004606', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004590', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004447', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004335', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004219', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004111', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004019', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355003681', None, None, None, None, None, '2777384')] time used for this insertion : 0.01338815689086914 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4394707679748535 time spend to save output : 0.013646125793457031 total time spend for step 1 : 1.4531168937683105 step2:final Thu May 1 03:13: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 (22577091) 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 22577091 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1354996566,1354997055,1354998970,1354998943,1355000290,1355000215,1355000029,1354999812,1355001006,1355000937,1355000864,1355002061,1355002032,1355001973,1355001916,1355001843,1355001788,1355002484,1355002458,1355002433,1355002394,1355002368,1355002340,1355002636,1355002634,1355002632,1355002630,1355002628,1355002745,1355002720,1355002691,1355004447,1355004335,1355004219,1355003681,1355004111,1355004019,1355004613,1355004611,1355004606,1355004590); 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([22577091]) Inside saveOutput : final : False verbose : True original output for save of step final : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} new output for save of step final : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] map_info['map_portfolio_photo'] : {22577091: [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681, 1355002745, 1355002720, 1355002691, 1355002636, 1355002634, 1355002632, 1355002630, 1355002628, 1355002484, 1355002458, 1355002433, 1355002394, 1355002368, 1355002340, 1355002061, 1355002032, 1355001973, 1355001916, 1355001843, 1355001788, 1355001006, 1355000937, 1355000864, 1355000290, 1355000215, 1355000029, 1354999812, 1354998970, 1354998943, 1354997055, 1354996566]} final : False mtd_id 4302 list_pids : [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] Looping around the photos to save general results len do output : 10 /1355004613.Didn't retrieve data . /1355004611.Didn't retrieve data . /1355004606.Didn't retrieve data . /1355004590.Didn't retrieve data . /1355004447.Didn't retrieve data . /1355004335.Didn't retrieve data . /1355004219.Didn't retrieve data . /1355004111.Didn't retrieve data . /1355004019.Didn't retrieve data . /1355003681.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, '2777384') ('4302', '22577091', '1355004613', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004611', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004606', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004590', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004447', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004335', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004219', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004111', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004019', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355003681', None, None, None, None, None, '2777384') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '22577091', '1355004613', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004611', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004606', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004590', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004447', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004335', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004219', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004111', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355004019', '0.05929512282032948', None, None, None, None, '2777384'), ('4302', '22577091', '1355003681', '0.05929512282032948', None, None, None, None, '2777384')] time used for this insertion : 0.01361083984375 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06605958938598633 time spend to save output : 0.014093160629272461 total time spend for step 2 : 0.08015275001525879 step3:velours_tree Thu May 1 03:13: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 : {22577091: [{'Carton_brun': 22577093, 'flou': 22577094, 'Carton_gris': 22577095, 'papier': 22577096, 'mal_croppe': 22577097, 'plastique': 22577098, 'metal': 22577099, 'cartonnette': 22577100, 'environnement': 22577101, 'autre_refus': 22577102, 'Teint_Dans_La_Masse': 22577103, 'kraft': 22577104}]} input_args_next_step : {22577091: ()} output_args : {22577091: [{'Carton_brun': 22577093, 'flou': 22577094, 'Carton_gris': 22577095, 'papier': 22577096, 'mal_croppe': 22577097, 'plastique': 22577098, 'metal': 22577099, 'cartonnette': 22577100, 'environnement': 22577101, 'autre_refus': 22577102, 'Teint_Dans_La_Masse': 22577103, 'kraft': 22577104}]} args : 22577091 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_brun': 22577093, 'flou': 22577094, 'Carton_gris': 22577095, 'papier': 22577096, 'mal_croppe': 22577097, 'plastique': 22577098, 'metal': 22577099, 'cartonnette': 22577100, 'environnement': 22577101, 'autre_refus': 22577102, 'Teint_Dans_La_Masse': 22577103, 'kraft': 22577104},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22577091) 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([22577091]) 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.26976799964904785 time spend to save output : 4.8160552978515625e-05 total time spend for step 3 : 0.26981616020202637 step4:send_mail_cod Thu May 1 03:13: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 : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} input_args_next_step : {1355004613: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004613 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004611 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004606 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004590 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004447 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004335 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004219 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004111 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355004019 depend.output_id : 0 input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ()} output_args : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',)} args : 1355003681 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 : {22577091: [{'Carton_brun': 22577093, 'flou': 22577094, 'Carton_gris': 22577095, 'papier': 22577096, 'mal_croppe': 22577097, 'plastique': 22577098, 'metal': 22577099, 'cartonnette': 22577100, 'environnement': 22577101, 'autre_refus': 22577102, 'Teint_Dans_La_Masse': 22577103, 'kraft': 22577104}]} input_args_next_step : {1355004613: ('0.05929512282032948',), 1355004611: ('0.05929512282032948',), 1355004606: ('0.05929512282032948',), 1355004590: ('0.05929512282032948',), 1355004447: ('0.05929512282032948',), 1355004335: ('0.05929512282032948',), 1355004219: ('0.05929512282032948',), 1355004111: ('0.05929512282032948',), 1355004019: ('0.05929512282032948',), 1355003681: ('0.05929512282032948',), 22577091: ()} output_args : {22577091: [{'Carton_brun': 22577093, 'flou': 22577094, 'Carton_gris': 22577095, 'papier': 22577096, 'mal_croppe': 22577097, 'plastique': 22577098, 'metal': 22577099, 'cartonnette': 22577100, 'environnement': 22577101, 'autre_refus': 22577102, 'Teint_Dans_La_Masse': 22577103, 'kraft': 22577104}]} args : 22577091 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 :11, first value : ('0.05929512282032948',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22577091) 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 (1355004613,1355004611,1355004606,1355004590,1355004447,1355004335,1355004219,1355004111,1355004019,1355003681) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1355003681 begin to download photo : 1355004219 begin to download photo : 1355004590 begin to download photo : 1355004613 download finish for photo 1355004613 download finish for photo 1355004590 begin to download photo : 1355004606 download finish for photo 1355004219 begin to download photo : 1355004335 download finish for photo 1355003681 begin to download photo : 1355004019 download finish for photo 1355004335 begin to download photo : 1355004447 download finish for photo 1355004606 begin to download photo : 1355004611 download finish for photo 1355004019 begin to download photo : 1355004111 download finish for photo 1355004447 download finish for photo 1355004611 download finish for photo 1355004111 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette225770941746061980/ imagette225770971746061980/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P22577091_01-05-2025_03_13_00.pdf 22577094 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=22577094 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225770941746061980 22577097 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=22577097 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225770971746061980 22577098 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=22577098 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355003236: '1746061811_1627937_1355000029_badc8219e786f0f22dffcf29536d6ad4_rle_crop_3777835120_0.png', 1355003237: '1746061811_1627937_1354999812_4f644b147cef45816b7ab7140ac8d8fa_rle_crop_3777835128_0.png', 1355004551: '1746061886_3104001_1355002634_a2f301c1c4da6053bed3a7c25701bf1d_rle_crop_3777835373_0.png', 1355004553: '1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835399_0.png', 1355004555: '1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835401_0.png', 1355004557: '1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835398_0.png', 1355004559: '1746061886_3104001_1355002630_9d3520566ad941f51875b2508f115236_rle_crop_3777835406_0.png', 1355004561: '1746061886_3104001_1355002630_9d3520566ad941f51875b2508f115236_rle_crop_3777835412_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/e50417923cb3559e7cb9f543ae29c171_88177231.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/b0814fbecba8a97482285e12ca32db2c_21708301.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/15b9d5f6bd77a79b24381d00db16af88_70812384.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/7ba496b9b6cf776fed05612b71fb9918_79093345.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/dc9af1c1fed93d929d0d8a3cc5ee6343_63666195.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/ef10d1cebe8686967a8e7b0c8e983026_76162517.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/fe9847053f2bed501442160dc22ac6f7_88364634.png change filename to text .imagette225770981746061980/ imagette225770981746061980/1746061886_3104001_1355002630_9d3520566ad941f51875b2508f115236_rle_crop_3777835412_0.png.png imagette225770981746061980/1746061811_1627937_1355000029_badc8219e786f0f22dffcf29536d6ad4_rle_crop_3777835120_0.png.png imagette225770981746061980/1746061886_3104001_1355002630_9d3520566ad941f51875b2508f115236_rle_crop_3777835406_0.png.png imagette225770981746061980/1746061811_1627937_1354999812_4f644b147cef45816b7ab7140ac8d8fa_rle_crop_3777835128_0.png.png imagette225770981746061980/1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835399_0.png.png imagette225770981746061980/1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835398_0.png.png imagette225770981746061980/1746061886_3104001_1355002634_a2f301c1c4da6053bed3a7c25701bf1d_rle_crop_3777835373_0.png.png imagette225770981746061980/1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835401_0.png.png imagette225770991746061981/ wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/8110079a658b4b56c2ca324ff934d625_72966276.png imagette225770981746061980 22577099 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=22577099 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225770991746061981 22577100 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=22577100 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355003172: '1746061811_1627937_1355001006_2c69aee7d96311c5f00e91465fe62782_rle_crop_3777835057_0.png'} change filename to text .imagette225771001746061981/ imagette225771001746061981/1746061811_1627937_1355001006_2c69aee7d96311c5f00e91465fe62782_rle_crop_3777835057_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/fe044fc5fdae68563304ec3234057791_96465370.png imagette225771001746061981 22577102 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=22577102 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355002658: '1746061767_3101118_1355000937_9ad22963faa8d71b0da41df9dbd9dd0c_rle_crop_3777834921_0.png'} change filename to text .imagette225771021746061981/ imagette225771021746061981/1746061767_3101118_1355000937_9ad22963faa8d71b0da41df9dbd9dd0c_rle_crop_3777834921_0.png.png imagette225771041746061981/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/0d353c6a61a78c845bbc898d222ed0f3_88221986.png imagette225771021746061981 22577104 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=22577104 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225771041746061981 22577093 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=22577093 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355002656: '1746061751_1627247_1355001788_103da380b81eb9c85c90d1269e1e5ed1_rle_crop_3777834937_0.png', 1355003204: '1746061811_1627937_1355000215_1c1c4c7539ac88d370087d797e9f2bb0_rle_crop_3777835077_0.png', 1355003205: '1746061811_1627937_1355000029_badc8219e786f0f22dffcf29536d6ad4_rle_crop_3777835115_0.png', 1355003206: '1746061811_1627937_1355000029_badc8219e786f0f22dffcf29536d6ad4_rle_crop_3777835117_0.png', 1355004537: '1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835393_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/f43245f517790e3a8cd9e11052c9e5e0_90375879.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/0e10a90b42dd72caca911a7aec49f44c_40512162.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/d87f3eda9351fcc63e9058552f812778_55252439.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/f790f380b10dc7334ceb5ff6e52179f9_51230387.png change filename to text .imagette225770931746061981/ imagette225770931746061981/1746061811_1627937_1355000029_badc8219e786f0f22dffcf29536d6ad4_rle_crop_3777835117_0.png.png imagette225770931746061981/1746061751_1627247_1355001788_103da380b81eb9c85c90d1269e1e5ed1_rle_crop_3777834937_0.png.png imagette225770931746061981/1746061811_1627937_1355000029_badc8219e786f0f22dffcf29536d6ad4_rle_crop_3777835115_0.png.png imagette225770931746061981/1746061811_1627937_1355000215_1c1c4c7539ac88d370087d797e9f2bb0_rle_crop_3777835077_0.png.png imagette225770931746061981/1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835393_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/90f2a0dde8019505007fff1ff60b9867_14561886.png imagette225770931746061981 22577095 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=22577095 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355003930: '1746061838_629444_1354997055_b28d52db3b31525726238420909a20c2_rle_crop_3777835198_0.png', 1355004527: '1746061886_3104001_1355002628_f1704d0a4b00a1f694fbb2341f50cab7_rle_crop_3777835425_0.png', 1355004528: '1746061886_3104001_1355002628_f1704d0a4b00a1f694fbb2341f50cab7_rle_crop_3777835420_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/9bdd309805ca13657758ac720e271a0c_66393927.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/51dbe4ff8ce45a25f07da4912c2e9886_72680281.png change filename to text .imagette225770951746061982/ imagette225770951746061982/1746061838_629444_1354997055_b28d52db3b31525726238420909a20c2_rle_crop_3777835198_0.png.png imagette225770951746061982/1746061886_3104001_1355002628_f1704d0a4b00a1f694fbb2341f50cab7_rle_crop_3777835425_0.png.png imagette225770951746061982/1746061886_3104001_1355002628_f1704d0a4b00a1f694fbb2341f50cab7_rle_crop_3777835420_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/8e8dff7d23dc6b7cbb43bc9a245c7b61_58842319.png imagette225770951746061982 22577103 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=22577103 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1355003147: '1746061811_1627937_1355001006_2c69aee7d96311c5f00e91465fe62782_rle_crop_3777835062_0.png', 1355003150: '1746061811_1627937_1354999812_4f644b147cef45816b7ab7140ac8d8fa_rle_crop_3777835126_0.png', 1355003151: '1746061811_1627937_1354999812_4f644b147cef45816b7ab7140ac8d8fa_rle_crop_3777835127_0.png', 1355003905: '1746061838_629444_1354998970_aab49b209916f643dfdd88dc451a99bf_rle_crop_3777835191_0.png', 1355003907: '1746061838_629444_1354997055_b28d52db3b31525726238420909a20c2_rle_crop_3777835204_0.png', 1355004524: '1746061886_3104001_1355002634_a2f301c1c4da6053bed3a7c25701bf1d_rle_crop_3777835379_0.png', 1355004525: '1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835395_0.png', 1355004526: '1746061886_3104001_1355002628_f1704d0a4b00a1f694fbb2341f50cab7_rle_crop_3777835423_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/c648e95adea57ddb7484dc5939178096_46896691.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/99da2dc7ddc1f6ad5fdc2e72bcf59e2e_13633441.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/0e3b6830a6e7e296f1d87042a1fac8bd_92931143.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/b8edb4a49fc17af664570e8dba4eebf7_28830198.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/2e890230edd56ca80eab7a02968e0f58_98368463.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/f2530a528b2a1467499a589345559593_87989466.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/c7891ee60f0390e5d69f19d96c7cffd7_67188713.png change filename to text .imagette225771031746061982/ imagette225771031746061982/1746061886_3104001_1355002628_f1704d0a4b00a1f694fbb2341f50cab7_rle_crop_3777835423_0.png.png imagette225771031746061982/1746061886_3104001_1355002632_2ca3ab314cc8e1b40a00dc015fe2e323_rle_crop_3777835395_0.png.png imagette225771031746061982/1746061838_629444_1354998970_aab49b209916f643dfdd88dc451a99bf_rle_crop_3777835191_0.png.png imagette225771031746061982/1746061811_1627937_1355001006_2c69aee7d96311c5f00e91465fe62782_rle_crop_3777835062_0.png.png imagette225771031746061982/1746061886_3104001_1355002634_a2f301c1c4da6053bed3a7c25701bf1d_rle_crop_3777835379_0.png.png imagette225771031746061982/1746061811_1627937_1354999812_4f644b147cef45816b7ab7140ac8d8fa_rle_crop_3777835127_0.png.png imagette225771031746061982/1746061838_629444_1354997055_b28d52db3b31525726238420909a20c2_rle_crop_3777835204_0.png.png imagette225771031746061982/1746061811_1627937_1354999812_4f644b147cef45816b7ab7140ac8d8fa_rle_crop_3777835126_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/18c585b34e6c40d2681cb499300b9f47_10809501.png imagette225771031746061982 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22577091 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22577105,22577106,22577107,22577108,22577109,22577110,22577111,22577112,22577113,22577114,22577115,22577116?tags=Carton_brun,flou,Carton_gris,papier,mal_croppe,plastique,metal,cartonnette,environnement,autre_refus,Teint_Dans_La_Masse,kraft your option no_mail is active, we will not send the real mail to your client args[1355004613] : ('0.05929512282032948',) no score found for photo 1355004613 We are sending mail with results at report@fotonower.com args[1355004611] : ('0.05929512282032948',) no score found for photo 1355004611 We are sending mail with results at report@fotonower.com args[1355004606] : ('0.05929512282032948',) no score found for photo 1355004606 We are sending mail with results at report@fotonower.com args[1355004590] : ('0.05929512282032948',) no score found for photo 1355004590 We are sending mail with results at report@fotonower.com args[1355004447] : ('0.05929512282032948',) no score found for photo 1355004447 We are sending mail with results at report@fotonower.com args[1355004335] : ('0.05929512282032948',) no score found for photo 1355004335 We are sending mail with results at report@fotonower.com args[1355004219] : ('0.05929512282032948',) no score found for photo 1355004219 We are sending mail with results at report@fotonower.com args[1355004111] : ('0.05929512282032948',) no score found for photo 1355004111 We are sending mail with results at report@fotonower.com args[1355004019] : ('0.05929512282032948',) no score found for photo 1355004019 We are sending mail with results at report@fotonower.com args[1355003681] : ('0.05929512282032948',) no score found for photo 1355003681 We are sending mail with results at report@fotonower.com refus_total : 0.05929512282032948 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=22577091 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_P22577091_01-05-2025_03_13_00.pdf results_Auto_P22577091_01-05-2025_03_13_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22577091_01-05-2025_03_13_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','22577091','results_Auto_P22577091_01-05-2025_03_13_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22577091_01-05-2025_03_13_00.pdf','pdf','','0.18','0.05929512282032948') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22577091]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] map_info['map_portfolio_photo'] : {22577091: [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681, 1355002745, 1355002720, 1355002691, 1355002636, 1355002634, 1355002632, 1355002630, 1355002628, 1355002484, 1355002458, 1355002433, 1355002394, 1355002368, 1355002340, 1355002061, 1355002032, 1355001973, 1355001916, 1355001843, 1355001788, 1355001006, 1355000937, 1355000864, 1355000290, 1355000215, 1355000029, 1354999812, 1354998970, 1354998943, 1354997055, 1354996566]} final : False mtd_id 4302 list_pids : [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] 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, '2777384') ('4302', '22577091', '1355004613', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004611', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004606', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004590', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004447', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004335', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004219', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004111', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004019', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355003681', None, None, None, None, None, '2777384') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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', '22577091', '1355004613', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004611', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004606', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004590', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004447', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004335', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004219', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004111', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004019', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355003681', None, None, None, None, None, '2777384')] time used for this insertion : 0.012961149215698242 save_final save missing photos in datou_result : time spend for datou_step_exec : 7.0899739265441895 time spend to save output : 0.013145685195922852 total time spend for step 4 : 7.103119611740112 step5:split_time_score Thu May 1 03:13:07 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22577091'] 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 : [('22577091',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22577091) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1355004613: {'path': 'temp/1746061980_634617_1355004613_bb3268bb56f0ad0b8d53f0170a7392a7.jpg', 'extension': 'jpg'}, 1355004219: {'path': 'temp/1746061980_634617_1355004219_1172e103960517814e8d29cf8b6754dc.jpg', 'extension': 'jpg'}, 1355004335: {'path': 'temp/1746061980_634617_1355004335_e8e6c2b0ccf889402616a8e16bcc3343.jpg', 'extension': 'jpg'}, 1355004447: {'path': 'temp/1746061980_634617_1355004447_6ea88e3e470a2cf0a343c293b4d4272c.jpg', 'extension': 'jpg'}, 1355004590: {'path': 'temp/1746061980_634617_1355004590_177947cb43268a9adf2c2230d2adfe8d.jpg', 'extension': 'jpg'}, 1355004606: {'path': 'temp/1746061980_634617_1355004606_b39190fd1eab263a6a773a3306ee385a.jpg', 'extension': 'jpg'}, 1355004611: {'path': 'temp/1746061980_634617_1355004611_60ba75b052269563e5a8ae7697b1881b.jpg', 'extension': 'jpg'}, 1355003681: {'path': 'temp/1746061980_634617_1355003681_4bf7c29eb022f73768f8476440d92ca3.jpg', 'extension': 'jpg'}, 1355004019: {'path': 'temp/1746061980_634617_1355004019_2aca04d5655d80aac46caee6ce07cf9f.jpg', 'extension': 'jpg'}, 1355004111: {'path': 'temp/1746061980_634617_1355004111_66f7f094e6a65891ce82130c5241d3bd.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 = 22577091; (('arc_en_ciel_jrm_live',), ('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 = 22577091 group by h (('03', 41),) 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=22577091 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 (22577091) 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 (22577091) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 01052025 22577091 Nombre de photos uploadées : 41 / 23040 (0%) 01052025 22577091 Nombre de photos taguées (types de déchets): 0 / 41 (0%) 01052025 22577091 Nombre de photos taguées (volume) : 0 / 41 (0%) [{'photo_id': 1354996566, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/7bdb76a1050e4aab32efc6ab2633a2ba.jpg', 'username': None, 'uploaded_at': 1746061327, 'text': 'image_01052025_03_01_14_10139.jpg'}, {'photo_id': 1354997055, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/b28d52db3b31525726238420909a20c2.jpg', 'username': None, 'uploaded_at': 1746061387, 'text': 'image_01052025_03_02_34_10141.jpg'}, {'photo_id': 1354998970, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/aab49b209916f643dfdd88dc451a99bf.jpg', 'username': None, 'uploaded_at': 1746061447, 'text': 'image_01052025_03_02_53_9128.jpg'}, {'photo_id': 1354998943, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/1/1e2d7b78b3c3c22b1c2b767a99caf2c8.jpg', 'username': None, 'uploaded_at': 1746061447, 'text': 'image_01052025_03_03_34_10145.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 7.152557373046875e-06 ????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002830982208251953 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22577091, '2025-05-01' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1761690,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02432727813720703 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= 1761690 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1761690, 'dashboard_run_id': 1769423, 'mtr_portfolio_id': 22575738, 'dashboard_result_id': 10218281, '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_P22575738_01-05-2025_02_37_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22575763, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22575764, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22575765, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22575766, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22575767, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22575768, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22575769, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22575770, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22575771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22575772, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22575773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22575774, 'pht': 3726}}"}, {'dashboat_entry_day': 1761690, 'dashboard_run_id': 1769423, 'mtr_portfolio_id': 22576269, 'dashboard_result_id': 10218282, '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_P22576269_01-05-2025_02_46_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22576298, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22576299, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22576300, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22576301, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22576302, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22576303, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22576304, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22576305, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22576306, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22576307, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22576308, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22576309, 'pht': 3726}}"}, {'dashboat_entry_day': 1761690, 'dashboard_run_id': 1769423, 'mtr_portfolio_id': 22576604, 'dashboard_result_id': 10218283, '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_P22576604_01-05-2025_03_06_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22576605, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22576606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22576607, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22576608, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22576609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22576610, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22576611, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22576612, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22576613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22576614, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22576615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22576616, 'pht': 3726}}"}, {'dashboat_entry_day': 1761690, 'dashboard_run_id': 1769423, 'mtr_portfolio_id': 22577091, 'dashboard_result_id': 10218284, '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_P22577091_01-05-2025_03_10_32.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22577093, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22577094, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22577095, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22577096, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22577097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22577098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22577099, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22577100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22577101, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22577102, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22577103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22577104, '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 = 22575738 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': 2777193, 'mtr_portfolio_id': 22575738, 'created_at': datetime.datetime(2025, 5, 1, 2, 36, 59), 'result': '0.04950045562957905', 'result_long': None, 'result_double': None}] Qualite : 0.04950045562957905 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22575738 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22575738_01-05-2025_02_37_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22575738 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_P22575738_01-05-2025_02_37_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22575763, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22575764, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22575765, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22575766, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22575767, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22575768, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22575769, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22575770, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22575771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22575772, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22575773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22575774, 'pht': 3726}}" where mtr_portfolio_id = 22575738 and dashboard_run_id = 1769423 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`=22575738 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10218281, 0.04950045562957905, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22575738_01-05-2025_02_37_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22575763, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22575764, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22575765, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22575766, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22575767, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22575768, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22575769, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22575770, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22575771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22575772, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22575773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22575774, '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 = 22576269 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': 2777266, 'mtr_portfolio_id': 22576269, 'created_at': datetime.datetime(2025, 5, 1, 2, 46, 59), 'result': '0.04817299169054344', 'result_long': None, 'result_double': None}] Qualite : 0.04817299169054344 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22576269 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22576269_01-05-2025_02_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22576269 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_P22576269_01-05-2025_02_46_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22576298, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22576299, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22576300, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22576301, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22576302, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22576303, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22576304, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22576305, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22576306, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22576307, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22576308, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22576309, 'pht': 3726}}" where mtr_portfolio_id = 22576269 and dashboard_run_id = 1769423 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`=22576269 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10218282, 0.04817299169054344, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22576269_01-05-2025_02_46_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22576298, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22576299, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22576300, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22576301, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22576302, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22576303, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22576304, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22576305, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22576306, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22576307, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22576308, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22576309, '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 = 22576604 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': 2777303, 'mtr_portfolio_id': 22576604, 'created_at': datetime.datetime(2025, 5, 1, 3, 6, 57), 'result': '0.045339893243220006', 'result_long': None, 'result_double': None}] Qualite : 0.045339893243220006 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22576604 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22576604_01-05-2025_03_06_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22576604 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_P22576604_01-05-2025_03_06_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22576605, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22576606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22576607, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22576608, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22576609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22576610, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22576611, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22576612, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22576613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22576614, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22576615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22576616, 'pht': 3726}}" where mtr_portfolio_id = 22576604 and dashboard_run_id = 1769423 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`=22576604 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10218283, 0.045339893243220006, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22576604_01-05-2025_03_06_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22576605, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22576606, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22576607, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22576608, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22576609, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22576610, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22576611, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22576612, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22576613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22576614, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22576615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22576616, '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 = 22577091 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': 2777384, 'mtr_portfolio_id': 22577091, 'created_at': datetime.datetime(2025, 5, 1, 3, 13), 'result': '0.05929512282032948', 'result_long': None, 'result_double': None}] Qualite : 0.05929512282032948 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22577091 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22577091_01-05-2025_03_13_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22577091 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_P22577091_01-05-2025_03_13_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22577093, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22577094, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22577095, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22577096, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22577097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22577098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22577099, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22577100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22577101, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22577102, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22577103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22577104, 'pht': 3726}}" where mtr_portfolio_id = 22577091 and dashboard_run_id = 1769423 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`=22577091 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10218284, 0.05929512282032948, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22577091_01-05-2025_03_13_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22577093, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22577094, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22577095, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22577096, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22577097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22577098, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22577099, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22577100, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22577101, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22577102, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22577103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22577104, '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 (22575738,22576269,22576604,22577091) result : ((1354994190,), (1354994192,), (1354994222,), (1354994224,), (1354994225,), (1354994257,), (1354994263,), (1354994268,), (1354994281,), (1354994318,), (1354994319,), (1354994320,), (1354994322,), (1354994324,), (1354994358,), (1354994359,), (1354994397,), (1354994398,), (1354994399,), (1354994425,), (1354994426,), (1354994427,), (1354994428,), (1354994429,), (1354994452,), (1354994455,), (1354994458,), (1354994473,), (1354994477,), (1354994487,), (1354994489,), (1354994516,), (1354994517,), (1354994518,), (1354994520,), (1354994522,), (1354994547,), (1354994554,), (1354994560,), (1354994576,), (1354994620,), (1354994621,), (1354994622,), (1354994624,), (1354994651,), (1354994654,), (1354994656,), (1354994714,), (1354994717,), (1354994742,), (1354994744,), (1354994747,), (1354994751,), (1354994755,), (1354994796,), (1354994788,), (1354994791,), (1354994793,), (1354994829,), (1354994832,), (1354994834,), (1354994836,), (1354994854,), (1354994898,), (1354994900,), (1354994928,), (1354994931,), (1354994932,), (1354994935,), (1354994939,), (1354994942,), (1354994963,), (1354994964,), (1354994965,), (1354994968,), (1354994971,), (1354994974,), (1354995145,), (1354995199,), (1354995205,), (1354995213,), (1354995242,), (1354995243,), (1354995244,), (1354995249,), (1354995286,), (1354995287,), (1354995288,), (1354995290,), (1354995293,), (1354995318,), (1354995319,), (1354995320,), (1354995357,), (1354995359,), (1354995361,), (1354995403,), (1354995404,), (1354995405,), (1354995406,), (1354995407,), (1354995409,), (1354995429,), (1354995432,), (1354995433,), (1354995434,), (1354995436,), (1354995466,), (1354995468,), (1354995469,), (1354995471,), (1354995506,), (1354995509,), (1354995510,), (1354995512,), (1354995514,), (1354995517,), (1354995540,), (1354995538,), (1354995571,), (1354995573,), (1354995576,), (1354995579,), (1354995583,), (1354995586,), (1354995601,), (1354995611,), (1354995613,), (1354995615,), (1354995618,), (1354995666,), (1354995668,), (1354995671,), (1354995674,), (1354995677,), (1354995696,), (1354995698,), (1354995699,), (1354995701,), (1354995731,), (1354995732,), (1354995733,), (1354995735,), (1354995738,), (1354995740,), (1354995759,), (1354995761,), (1354995762,), (1354995763,), (1354995789,), (1354995824,), (1354995825,), (1354995826,), (1354995828,), (1354995856,), (1354995858,), (1354995936,), (1354996455,), (1354997265,), (1354996566,), (1354997055,), (1354998943,), (1354998970,), (1354999812,), (1355000029,), (1355000215,), (1355000290,), (1355000864,), (1355000937,), (1355001006,), (1355001788,), (1355001843,), (1355001916,), (1355001973,), (1355002032,), (1355002061,), (1355002340,), (1355002368,), (1355002394,), (1355002433,), (1355002458,), (1355002484,), (1355002628,), (1355002630,), (1355002632,), (1355002634,), (1355002636,), (1355002691,), (1355002720,), (1355002745,), (1355003681,), (1355004019,), (1355004111,), (1355004219,), (1355004335,), (1355004447,), (1355004590,), (1355004606,), (1355004611,), (1355004613,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01052025': {'nb_upload': 41, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22577091]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] map_info['map_portfolio_photo'] : {22577091: [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681, 1355002745, 1355002720, 1355002691, 1355002636, 1355002634, 1355002632, 1355002630, 1355002628, 1355002484, 1355002458, 1355002433, 1355002394, 1355002368, 1355002340, 1355002061, 1355002032, 1355001973, 1355001916, 1355001843, 1355001788, 1355001006, 1355000937, 1355000864, 1355000290, 1355000215, 1355000029, 1354999812, 1354998970, 1354998943, 1354997055, 1354996566]} final : True mtd_id 4302 list_pids : [1355004613, 1355004611, 1355004606, 1355004590, 1355004447, 1355004335, 1355004219, 1355004111, 1355004019, 1355003681] Looping around the photos to save general results len do output : 1 /22577091Didn'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, '2777384') ('4302', '22577091', '1355004613', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004611', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004606', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004590', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004447', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004335', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004219', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004111', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355004019', None, None, None, None, None, '2777384') ('4302', None, None, None, None, None, None, None, '2777384') ('4302', '22577091', '1355003681', None, None, None, None, None, '2777384') 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', None, '22577091', 'None', None, None, None, None, '2777384'), ('4302', '22577091', '1355004613', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004611', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004606', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004590', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004447', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004335', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004219', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004111', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355004019', None, None, None, None, None, '2777384'), ('4302', '22577091', '1355003681', None, None, None, None, None, '2777384')] time used for this insertion : 0.013107061386108398 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3325209617614746 time spend to save output : 0.013354778289794922 total time spend for step 5 : 0.34587574005126953 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 (2777384) 2.19user 2.33system 0:12.21elapsed 37%CPU (0avgtext+0avgdata 162132maxresident)k 744inputs+10752outputs (3major+64619minor)pagefaults 0swaps