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, '2772966') ('4302', '22534867', '1354603175', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603172', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603169', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603164', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603127', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603123', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603113', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603077', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603074', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603036', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603033', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603031', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603019', None, None, None, None, None, '2772966') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22534867', "{'papier': 22534895, 'Carton_brun': 22534896, 'kraft': 22534897, 'Teint_Dans_La_Masse': 22534898, 'Carton_gris': 22534899, 'plastique': 22534900, 'flou': 22534901, 'autre_refus': 22534902, 'metal': 22534903, 'cartonnette': 22534904, 'mal_croppe': 22534905, 'environnement': 22534906}", None, None, None, None, '2772966'), ('4302', '22534867', '1354603175', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603172', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603169', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603164', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603127', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603123', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603113', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603077', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603074', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603036', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603033', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603031', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603019', None, None, None, None, None, '2772966')] time used for this insertion : 0.20977091789245605 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1277167797088623 time spend to save output : 0.21018075942993164 total time spend for step 1 : 2.337897539138794 step2:final Wed Apr 30 08:35:29 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 (22534867) 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 22534867 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1354603036,1354603033,1354603031,1354603019,1354603077,1354603074,1354603127,1354603113,1354603123,1354603175,1354603172,1354603169,1354603164); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22534867]) Inside saveOutput : final : False verbose : True original output for save of step final : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} new output for save of step final : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019] map_info['map_portfolio_photo'] : {22534867: [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019]} final : False mtd_id 4302 list_pids : [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019] Looping around the photos to save general results len do output : 13 /1354603175.Didn't retrieve data . /1354603172.Didn't retrieve data . /1354603169.Didn't retrieve data . /1354603164.Didn't retrieve data . /1354603127.Didn't retrieve data . /1354603123.Didn't retrieve data . /1354603113.Didn't retrieve data . /1354603077.Didn't retrieve data . /1354603074.Didn't retrieve data . /1354603036.Didn't retrieve data . /1354603033.Didn't retrieve data . /1354603031.Didn't retrieve data . /1354603019.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, '2772966') ('4302', '22534867', '1354603175', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603172', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603169', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603164', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603127', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603123', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603113', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603077', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603074', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603036', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603033', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603031', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603019', None, None, None, None, None, '2772966') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 39 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22534867', '1354603175', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603172', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603169', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603164', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603127', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603123', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603113', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603077', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603074', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603036', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603033', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603031', '0.0', None, None, None, None, '2772966'), ('4302', '22534867', '1354603019', '0.0', None, None, None, None, '2772966')] time used for this insertion : 0.149552583694458 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.014650344848632812 time spend to save output : 0.15025877952575684 total time spend for step 2 : 0.16490912437438965 step3:velours_tree Wed Apr 30 08:35:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22534867: [{'papier': 22534895, 'Carton_brun': 22534896, 'kraft': 22534897, 'Teint_Dans_La_Masse': 22534898, 'Carton_gris': 22534899, 'plastique': 22534900, 'flou': 22534901, 'autre_refus': 22534902, 'metal': 22534903, 'cartonnette': 22534904, 'mal_croppe': 22534905, 'environnement': 22534906}]} input_args_next_step : {22534867: ()} output_args : {22534867: [{'papier': 22534895, 'Carton_brun': 22534896, 'kraft': 22534897, 'Teint_Dans_La_Masse': 22534898, 'Carton_gris': 22534899, 'plastique': 22534900, 'flou': 22534901, 'autre_refus': 22534902, 'metal': 22534903, 'cartonnette': 22534904, 'mal_croppe': 22534905, 'environnement': 22534906}]} args : 22534867 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 22534895, 'Carton_brun': 22534896, 'kraft': 22534897, 'Teint_Dans_La_Masse': 22534898, 'Carton_gris': 22534899, 'plastique': 22534900, 'flou': 22534901, 'autre_refus': 22534902, 'metal': 22534903, 'cartonnette': 22534904, 'mal_croppe': 22534905, 'environnement': 22534906},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22534867) 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([22534867]) 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.3120388984680176 time spend to save output : 6.175041198730469e-05 total time spend for step 3 : 0.3121006488800049 step4:send_mail_cod Wed Apr 30 08:35:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} input_args_next_step : {1354603175: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603175 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603172 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603169 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603164 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603127 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603123 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603113 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603077 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603074 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603036 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603033 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603031 depend.output_id : 0 input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ()} output_args : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',)} args : 1354603019 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 : {22534867: [{'papier': 22534895, 'Carton_brun': 22534896, 'kraft': 22534897, 'Teint_Dans_La_Masse': 22534898, 'Carton_gris': 22534899, 'plastique': 22534900, 'flou': 22534901, 'autre_refus': 22534902, 'metal': 22534903, 'cartonnette': 22534904, 'mal_croppe': 22534905, 'environnement': 22534906}]} input_args_next_step : {1354603175: ('0.0',), 1354603172: ('0.0',), 1354603169: ('0.0',), 1354603164: ('0.0',), 1354603127: ('0.0',), 1354603123: ('0.0',), 1354603113: ('0.0',), 1354603077: ('0.0',), 1354603074: ('0.0',), 1354603036: ('0.0',), 1354603033: ('0.0',), 1354603031: ('0.0',), 1354603019: ('0.0',), 22534867: ()} output_args : {22534867: [{'papier': 22534895, 'Carton_brun': 22534896, 'kraft': 22534897, 'Teint_Dans_La_Masse': 22534898, 'Carton_gris': 22534899, 'plastique': 22534900, 'flou': 22534901, 'autre_refus': 22534902, 'metal': 22534903, 'cartonnette': 22534904, 'mal_croppe': 22534905, 'environnement': 22534906}]} args : 22534867 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :14, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22534867) 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 (1354603175,1354603172,1354603169,1354603164,1354603127,1354603123,1354603113,1354603077,1354603074,1354603036,1354603033,1354603031,1354603019) Found this number of photos: 13 ##### Call download_photos : nb_thread : 5 begin to download photo : 1354603019 begin to download photo : 1354603036 begin to download photo : 1354603113 begin to download photo : 1354603164 begin to download photo : 1354603175 download finish for photo 1354603113 begin to download photo : 1354603123 download finish for photo 1354603019 begin to download photo : 1354603031 download finish for photo 1354603036 begin to download photo : 1354603074 download finish for photo 1354603175 download finish for photo 1354603164 begin to download photo : 1354603169 download finish for photo 1354603123 begin to download photo : 1354603127 download finish for photo 1354603031 begin to download photo : 1354603033 download finish for photo 1354603074 begin to download photo : 1354603077 download finish for photo 1354603169 begin to download photo : 1354603172 download finish for photo 1354603127 download finish for photo 1354603033 download finish for photo 1354603077 download finish for photo 1354603172 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette225348971745994930/ imagette225349001745994930/ imagette225349011745994930/ imagette225349021745994930/ imagette225349031745994930/ imagette225349041745994930/ imagette225349051745994930/ imagette225348961745994930/ imagette225348981745994930/ imagette225348991745994930/ length of list_filenames : 13 ; length of list_pids : 13 ; length of list_args : 13 results_Auto_P22534867_30-04-2025_08_35_30.pdf 22534897 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=22534897 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225348971745994930 22534900 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=22534900 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225349001745994930 22534901 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=22534901 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225349011745994930 22534902 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=22534902 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225349021745994930 22534903 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=22534903 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225349031745994930 22534904 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=22534904 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225349041745994930 22534905 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=22534905 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225349051745994930 22534896 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=22534896 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225348961745994930 22534898 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=22534898 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225348981745994930 22534899 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=22534899 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette225348991745994930 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22534867 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22534907,22534908,22534909,22534910,22534911,22534912,22534913,22534914,22534915,22534916,22534917,22534918?tags=papier,Carton_brun,kraft,Teint_Dans_La_Masse,Carton_gris,plastique,flou,autre_refus,metal,cartonnette,mal_croppe,environnement your option no_mail is active, we will not send the real mail to your client args[1354603175] : ('0.0',) no score found for photo 1354603175 We are sending mail with results at report@fotonower.com args[1354603172] : ('0.0',) no score found for photo 1354603172 We are sending mail with results at report@fotonower.com args[1354603169] : ('0.0',) no score found for photo 1354603169 We are sending mail with results at report@fotonower.com args[1354603164] : ('0.0',) no score found for photo 1354603164 We are sending mail with results at report@fotonower.com args[1354603127] : ('0.0',) no score found for photo 1354603127 We are sending mail with results at report@fotonower.com args[1354603123] : ('0.0',) no score found for photo 1354603123 We are sending mail with results at report@fotonower.com args[1354603113] : ('0.0',) no score found for photo 1354603113 We are sending mail with results at report@fotonower.com args[1354603077] : ('0.0',) no score found for photo 1354603077 We are sending mail with results at report@fotonower.com args[1354603074] : ('0.0',) no score found for photo 1354603074 We are sending mail with results at report@fotonower.com args[1354603036] : ('0.0',) no score found for photo 1354603036 We are sending mail with results at report@fotonower.com args[1354603033] : ('0.0',) no score found for photo 1354603033 We are sending mail with results at report@fotonower.com args[1354603031] : ('0.0',) no score found for photo 1354603031 We are sending mail with results at report@fotonower.com args[1354603019] : ('0.0',) no score found for photo 1354603019 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22534867 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_P22534867_30-04-2025_08_35_30.pdf results_Auto_P22534867_30-04-2025_08_35_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22534867_30-04-2025_08_35_30.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','22534867','results_Auto_P22534867_30-04-2025_08_35_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22534867_30-04-2025_08_35_30.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22534867]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019] map_info['map_portfolio_photo'] : {22534867: [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019]} final : False mtd_id 4302 list_pids : [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019] 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, '2772966') ('4302', '22534867', '1354603175', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603172', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603169', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603164', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603127', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603123', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603113', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603077', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603074', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603036', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603033', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603031', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603019', None, None, None, None, None, '2772966') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22534867', '1354603175', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603172', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603169', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603164', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603127', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603123', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603113', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603077', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603074', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603036', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603033', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603031', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603019', None, None, None, None, None, '2772966')] time used for this insertion : 0.15766525268554688 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8724853992462158 time spend to save output : 0.15801072120666504 total time spend for step 4 : 2.030496120452881 step5:split_time_score Wed Apr 30 08:35:32 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22534867'] 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 : [('22534867',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22534867) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1354603175: {'path': 'temp/1745994930_1411119_1354603175_26fee6b3994994e1617b53ce4b3927cf.jpg', 'extension': 'jpg'}, 1354603113: {'path': 'temp/1745994930_1411119_1354603113_69406a4b93a5837a250faa3a99323a40.jpg', 'extension': 'jpg'}, 1354603123: {'path': 'temp/1745994930_1411119_1354603123_74849f6f76c4aaef901e2a707eefee3a.jpg', 'extension': 'jpg'}, 1354603127: {'path': 'temp/1745994930_1411119_1354603127_f5d17a0190f86e820127801d4ef6c0ce.jpg', 'extension': 'jpg'}, 1354603019: {'path': 'temp/1745994930_1411119_1354603019_27edf98535a063a610fcf277f5c14408.jpg', 'extension': 'jpg'}, 1354603031: {'path': 'temp/1745994930_1411119_1354603031_c0c9e91b6236afd742638ba899037708.jpg', 'extension': 'jpg'}, 1354603033: {'path': 'temp/1745994930_1411119_1354603033_a8948270bbca3d20d2535f3c23fbf232.jpg', 'extension': 'jpg'}, 1354603036: {'path': 'temp/1745994930_1411119_1354603036_fc2fef92db49b65cb56f8a925cf77126.jpg', 'extension': 'jpg'}, 1354603074: {'path': 'temp/1745994930_1411119_1354603074_b64303f9066f944e1b3de4c0711bd0f7.jpg', 'extension': 'jpg'}, 1354603077: {'path': 'temp/1745994930_1411119_1354603077_415be68f5b9e050b1f7e2e7dc5226064.jpg', 'extension': 'jpg'}, 1354603164: {'path': 'temp/1745994930_1411119_1354603164_f9db1db22bd98522ccfc6f0dafde410e.jpg', 'extension': 'jpg'}, 1354603169: {'path': 'temp/1745994930_1411119_1354603169_fb070cec482666bb7e9fe47fa1d80f5a.jpg', 'extension': 'jpg'}, 1354603172: {'path': 'temp/1745994930_1411119_1354603172_d7a0fcd8d58962f38d69f0521feac0e8.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 = 22534867; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22534867 group by h (('08', 13),) 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=22534867 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 (22534867) 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 (22534867) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 30042025 22534867 Nombre de photos uploadées : 13 / 23040 (0%) 30042025 22534867 Nombre de photos taguées (types de déchets): 0 / 13 (0%) 30042025 22534867 Nombre de photos taguées (volume) : 0 / 13 (0%) [{'photo_id': 1354603036, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/fc2fef92db49b65cb56f8a925cf77126.jpg', 'username': None, 'uploaded_at': 1745994668, 'text': 'image_30042025_08_30_05_10152.jpg'}, {'photo_id': 1354603033, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/a8948270bbca3d20d2535f3c23fbf232.jpg', 'username': None, 'uploaded_at': 1745994668, 'text': 'image_30042025_08_30_14_9126.jpg'}, {'photo_id': 1354603031, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/c0c9e91b6236afd742638ba899037708.jpg', 'username': None, 'uploaded_at': 1745994668, 'text': 'image_30042025_08_30_34_10141.jpg'}, {'photo_id': 1354603019, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/30/27edf98535a063a610fcf277f5c14408.jpg', 'username': None, 'uploaded_at': 1745994668, 'text': 'image_30042025_08_30_45_10137.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.384185791015625e-06 elapsed_time : order_list_meta_photo_and_scores 1.1920928955078125e-05 ????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0009150505065917969 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 22534867, '2025-04-30' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1757158,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022923707962036133 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= 1757158 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1757158, 'dashboard_run_id': 1765755, 'mtr_portfolio_id': 22533018, 'dashboard_result_id': 10173835, '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_P22533018_30-04-2025_08_03_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22533046, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22533047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22533048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22533049, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22533050, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22533051, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22533052, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22533053, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22533054, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22533055, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22533056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22533057, 'pht': 3726}}"}, {'dashboat_entry_day': 1757158, 'dashboard_run_id': 1765755, 'mtr_portfolio_id': 22533642, 'dashboard_result_id': 10173836, '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_P22533642_30-04-2025_08_18_57.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22533649, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22533650, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22533651, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22533652, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22533653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22533654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22533655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22533656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22533657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22533658, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22533659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22533660, 'pht': 3726}}"}, {'dashboat_entry_day': 1757158, 'dashboard_run_id': 1765755, 'mtr_portfolio_id': 22534441, 'dashboard_result_id': 10173837, '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_P22534441_30-04-2025_08_35_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22534447, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22534448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22534449, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22534450, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22534451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22534452, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22534453, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22534454, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22534455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22534456, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22534457, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22534458, 'pht': 3726}}"}, {'dashboat_entry_day': 1757158, 'dashboard_run_id': 1765755, 'mtr_portfolio_id': 22534867, 'dashboard_result_id': 10173838, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22533018 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': 2772729, 'mtr_portfolio_id': 22533018, 'created_at': datetime.datetime(2025, 4, 30, 8, 3, 30), 'result': '0.05446921799136508', 'result_long': None, 'result_double': None}] Qualite : 0.05446921799136508 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22533018 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22533018_30-04-2025_08_03_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22533018 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_P22533018_30-04-2025_08_03_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22533046, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22533047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22533048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22533049, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22533050, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22533051, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22533052, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22533053, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22533054, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22533055, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22533056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22533057, 'pht': 3726}}" where mtr_portfolio_id = 22533018 and dashboard_run_id = 1765755 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`=22533018 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10173835, 0.05446921799136508, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22533018_30-04-2025_08_03_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22533046, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22533047, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22533048, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22533049, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22533050, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22533051, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22533052, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22533053, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22533054, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22533055, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22533056, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22533057, '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 = 22533642 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': 2772801, 'mtr_portfolio_id': 22533642, 'created_at': datetime.datetime(2025, 4, 30, 8, 18, 57), 'result': '0.03629747576780559', 'result_long': None, 'result_double': None}] Qualite : 0.03629747576780559 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22533642 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22533642_30-04-2025_08_18_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22533642 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_P22533642_30-04-2025_08_18_57.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22533649, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22533650, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22533651, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22533652, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22533653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22533654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22533655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22533656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22533657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22533658, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22533659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22533660, 'pht': 3726}}" where mtr_portfolio_id = 22533642 and dashboard_run_id = 1765755 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`=22533642 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10173836, 0.03629747576780559, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22533642_30-04-2025_08_18_57.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22533649, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22533650, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22533651, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22533652, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22533653, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22533654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22533655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22533656, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22533657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22533658, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22533659, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22533660, '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 = 22534441 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': 2772891, 'mtr_portfolio_id': 22534441, 'created_at': datetime.datetime(2025, 4, 30, 8, 34, 59), 'result': '0.03138220880956816', 'result_long': None, 'result_double': None}] Qualite : 0.03138220880956816 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22534441 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22534441_30-04-2025_08_35_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22534441 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_P22534441_30-04-2025_08_35_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22534447, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22534448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22534449, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22534450, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22534451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22534452, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22534453, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22534454, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22534455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22534456, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22534457, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22534458, 'pht': 3726}}" where mtr_portfolio_id = 22534441 and dashboard_run_id = 1765755 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`=22534441 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10173837, 0.03138220880956816, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22534441_30-04-2025_08_35_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22534447, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22534448, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22534449, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22534450, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22534451, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22534452, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22534453, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22534454, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22534455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22534456, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22534457, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22534458, '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 = 22534867 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22534867 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 22534867 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22534867 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22534867 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22534867 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22534867_30-04-2025_08_35_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22534867 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_P22534867_30-04-2025_08_35_30.pdf'}" where mtr_portfolio_id = 22534867 and dashboard_run_id = 1765755 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22533018,22533642,22534441,22534867) result : ((1354595508,), (1354595512,), (1354595515,), (1354595590,), (1354595612,), (1354595616,), (1354595621,), (1354595626,), (1354595628,), (1354595631,), (1354595651,), (1354595655,), (1354595659,), (1354595663,), (1354595667,), (1354595711,), (1354595720,), (1354595729,), (1354595742,), (1354595745,), (1354595747,), (1354595825,), (1354595828,), (1354595863,), (1354596048,), (1354596053,), (1354596059,), (1354596063,), (1354596066,), (1354596111,), (1354596150,), (1354596156,), (1354596159,), (1354596161,), (1354596163,), (1354596197,), (1354596203,), (1354596205,), (1354596229,), (1354596233,), (1354596238,), (1354596242,), (1354596246,), (1354596265,), (1354596269,), (1354596274,), (1354596280,), (1354596286,), (1354596340,), (1354596356,), (1354596367,), (1354596369,), (1354596372,), (1354596376,), (1354596463,), (1354596491,), (1354596530,), (1354597030,), (1354597060,), (1354597111,), (1354597135,), (1354597337,), (1354597344,), (1354597346,), (1354597402,), (1354597387,), (1354597607,), (1354597652,), (1354597684,), (1354598368,), (1354598418,), (1354598470,), (1354598537,), (1354598594,), (1354598647,), (1354599181,), (1354599244,), (1354599313,), (1354599369,), (1354599402,), (1354599700,), (1354599726,), (1354599729,), (1354599846,), (1354599879,), (1354599911,), (1354599943,), (1354600390,), (1354600434,), (1354600472,), (1354600977,), (1354600980,), (1354600986,), (1354601018,), (1354601071,), (1354601302,), (1354601328,), (1354601341,), (1354601348,), (1354601379,), (1354601383,), (1354601388,), (1354601391,), (1354601495,), (1354601507,), (1354601529,), (1354601578,), (1354601616,), (1354601658,), (1354601661,), (1354601668,), (1354601704,), (1354601706,), (1354601710,), (1354601744,), (1354601747,), (1354601749,), (1354601753,), (1354601756,), (1354601780,), (1354601782,), (1354601785,), (1354602162,), (1354602297,), (1354602300,), (1354602337,), (1354602342,), (1354602345,), (1354602385,), (1354602388,), (1354602458,), (1354602463,), (1354602497,), (1354602501,), (1354602513,), (1354602517,), (1354602521,), (1354602585,), (1354602590,), (1354602598,), (1354602607,), (1354602654,), (1354602661,), (1354602671,), (1354602677,), (1354602683,), (1354602704,), (1354602708,), (1354602717,), (1354602722,), (1354602735,), (1354602797,), (1354602802,), (1354602808,), (1354602812,), (1354602847,), (1354602851,), (1354602895,), (1354602898,), (1354602900,), (1354602902,), (1354602905,), (1354602909,), (1354602936,), (1354602946,), (1354602955,), (1354602961,), (1354603042,), (1354603019,), (1354603031,), (1354603033,), (1354603036,), (1354603074,), (1354603077,), (1354603113,), (1354603123,), (1354603127,), (1354603164,), (1354603169,), (1354603172,), (1354603175,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'30042025': {'nb_upload': 13, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22534867]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019] map_info['map_portfolio_photo'] : {22534867: [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019]} final : True mtd_id 4302 list_pids : [1354603175, 1354603172, 1354603169, 1354603164, 1354603127, 1354603123, 1354603113, 1354603077, 1354603074, 1354603036, 1354603033, 1354603031, 1354603019] Looping around the photos to save general results len do output : 1 /22534867Didn'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, '2772966') ('4302', '22534867', '1354603175', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603172', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603169', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603164', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603127', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603123', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603113', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603077', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603074', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603036', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603033', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603031', None, None, None, None, None, '2772966') ('4302', None, None, None, None, None, None, None, '2772966') ('4302', '22534867', '1354603019', None, None, None, None, None, '2772966') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22534867', 'None', None, None, None, None, '2772966'), ('4302', '22534867', '1354603175', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603172', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603169', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603164', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603127', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603123', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603113', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603077', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603074', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603036', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603033', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603031', None, None, None, None, None, '2772966'), ('4302', '22534867', '1354603019', None, None, None, None, None, '2772966')] time used for this insertion : 0.15697097778320312 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.38669705390930176 time spend to save output : 0.15723037719726562 total time spend for step 5 : 0.5439274311065674 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 (2772966) 2.24user 2.17system 0:08.15elapsed 54%CPU (0avgtext+0avgdata 160384maxresident)k 248inputs+6632outputs (0major+77228minor)pagefaults 0swaps