save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05592036247253418 time spend to save output : 0.01279306411743164 total time spend for step 2 : 0.06871342658996582 step3:velours_tree Fri Apr 11 19:05: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 : {22293155: [{'metal': 22293204, 'plastique': 22293216, 'flou': 22293219, 'cartonnette': 22293220, 'environnement': 22293233, 'Carton_brun': 22293234, 'papier': 22293235, 'mal_croppe': 22293236, 'Teint_Dans_La_Masse': 22293237, 'autre_refus': 22293238, 'kraft': 22293239, 'Carton_gris': 22293240}]} input_args_next_step : {22293155: ()} output_args : {22293155: [{'metal': 22293204, 'plastique': 22293216, 'flou': 22293219, 'cartonnette': 22293220, 'environnement': 22293233, 'Carton_brun': 22293234, 'papier': 22293235, 'mal_croppe': 22293236, 'Teint_Dans_La_Masse': 22293237, 'autre_refus': 22293238, 'kraft': 22293239, 'Carton_gris': 22293240}]} args : 22293155 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 : ({'metal': 22293204, 'plastique': 22293216, 'flou': 22293219, 'cartonnette': 22293220, 'environnement': 22293233, 'Carton_brun': 22293234, 'papier': 22293235, 'mal_croppe': 22293236, 'Teint_Dans_La_Masse': 22293237, 'autre_refus': 22293238, 'kraft': 22293239, 'Carton_gris': 22293240},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22293155) 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([22293155]) 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.2842535972595215 time spend to save output : 5.030632019042969e-05 total time spend for step 3 : 0.2843039035797119 step4:send_mail_cod Fri Apr 11 19:05: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 : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',)} input_args_next_step : {1351837083: ()} output_args : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',)} args : 1351837083 depend.output_id : 0 input_args_next_step : {1351837083: ('0.0',), 1351837020: ()} output_args : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',)} args : 1351837020 depend.output_id : 0 input_args_next_step : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ()} output_args : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',)} args : 1351836844 depend.output_id : 0 input_args_next_step : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ()} output_args : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',)} args : 1351836764 depend.output_id : 0 input_args_next_step : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ()} output_args : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',)} args : 1351836720 depend.output_id : 0 input_args_next_step : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ()} output_args : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',)} args : 1351836679 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 : {22293155: [{'metal': 22293204, 'plastique': 22293216, 'flou': 22293219, 'cartonnette': 22293220, 'environnement': 22293233, 'Carton_brun': 22293234, 'papier': 22293235, 'mal_croppe': 22293236, 'Teint_Dans_La_Masse': 22293237, 'autre_refus': 22293238, 'kraft': 22293239, 'Carton_gris': 22293240}]} input_args_next_step : {1351837083: ('0.0',), 1351837020: ('0.0',), 1351836844: ('0.0',), 1351836764: ('0.0',), 1351836720: ('0.0',), 1351836679: ('0.0',), 22293155: ()} output_args : {22293155: [{'metal': 22293204, 'plastique': 22293216, 'flou': 22293219, 'cartonnette': 22293220, 'environnement': 22293233, 'Carton_brun': 22293234, 'papier': 22293235, 'mal_croppe': 22293236, 'Teint_Dans_La_Masse': 22293237, 'autre_refus': 22293238, 'kraft': 22293239, 'Carton_gris': 22293240}]} args : 22293155 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 :7, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22293155) 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 (1351837083,1351837020,1351836844,1351836764,1351836720,1351836679) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1351836679 begin to download photo : 1351836764 begin to download photo : 1351837020 download finish for photo 1351836679 begin to download photo : 1351836720 download finish for photo 1351836764 begin to download photo : 1351836844 download finish for photo 1351837020 begin to download photo : 1351837083 download finish for photo 1351836720 download finish for photo 1351836844 download finish for photo 1351837083 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette222932041744391100/ imagette222932161744391100/ imagette222932191744391100/ imagette222932201744391101/ imagette222932361744391101/ imagette222932381744391101/ imagette222932391744391101/ imagette222932341744391101/ imagette222932371744391101/ imagette222932401744391101/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P22293155_11-04-2025_19_05_00.pdf 22293204 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=22293204 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932041744391100 22293216 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=22293216 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932161744391100 22293219 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=22293219 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932191744391100 22293220 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=22293220 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932201744391101 22293236 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=22293236 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932361744391101 22293238 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=22293238 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932381744391101 22293239 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=22293239 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932391744391101 22293234 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=22293234 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932341744391101 22293237 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=22293237 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932371744391101 22293240 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=22293240 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette222932401744391101 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22293155 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22293243,22293244,22293245,22293246,22293247,22293248,22293249,22293250,22293251,22293252,22293253,22293254?tags=metal,plastique,flou,cartonnette,environnement,Carton_brun,papier,mal_croppe,Teint_Dans_La_Masse,autre_refus,kraft,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1351837083] : ('0.0',) no score found for photo 1351837083 We are sending mail with results at report@fotonower.com args[1351837020] : ('0.0',) no score found for photo 1351837020 We are sending mail with results at report@fotonower.com args[1351836844] : ('0.0',) no score found for photo 1351836844 We are sending mail with results at report@fotonower.com args[1351836764] : ('0.0',) no score found for photo 1351836764 We are sending mail with results at report@fotonower.com args[1351836720] : ('0.0',) no score found for photo 1351836720 We are sending mail with results at report@fotonower.com args[1351836679] : ('0.0',) no score found for photo 1351836679 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=22293155 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_P22293155_11-04-2025_19_05_00.pdf results_Auto_P22293155_11-04-2025_19_05_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22293155_11-04-2025_19_05_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','22293155','results_Auto_P22293155_11-04-2025_19_05_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22293155_11-04-2025_19_05_00.pdf','pdf','','0.07','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22293155]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1351837083, 1351837020, 1351836844, 1351836764, 1351836720, 1351836679] map_info['map_portfolio_photo'] : {22293155: [1351837083, 1351837020, 1351836844, 1351836764, 1351836720, 1351836679, 1351835928, 1351835860, 1351835801, 1351835745, 1351834996, 1351834838, 1351834674, 1351834634, 1351834605]} final : False mtd_id 4302 list_pids : [1351837083, 1351837020, 1351836844, 1351836764, 1351836720, 1351836679] 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, '2745906') ('4302', '22293155', '1351837083', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351837020', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836844', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836764', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836720', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836679', None, None, None, None, None, '2745906') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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', '22293155', '1351837083', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351837020', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836844', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836764', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836720', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836679', None, None, None, None, None, '2745906')] time used for this insertion : 0.019647836685180664 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3259968757629395 time spend to save output : 0.019870996475219727 total time spend for step 4 : 1.3458678722381592 step5:split_time_score Fri Apr 11 19:05:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22293155'] 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 : [('22293155',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22293155) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1351836679: {'path': 'temp/1744391100_1437382_1351836679_5067e7886cb3020b406b05533901d616.jpg', 'extension': 'jpg'}, 1351836720: {'path': 'temp/1744391100_1437382_1351836720_3c98bd0886030647c936a0e356e27c94.jpg', 'extension': 'jpg'}, 1351836764: {'path': 'temp/1744391100_1437382_1351836764_85bd40d11b72c4923e3e76893f5a5a0c.jpg', 'extension': 'jpg'}, 1351836844: {'path': 'temp/1744391100_1437382_1351836844_e3e8dd58a1f6027b50c1f2a81c3f42dc.jpg', 'extension': 'jpg'}, 1351837020: {'path': 'temp/1744391100_1437382_1351837020_9a12abd09d363898936a7299a4691888.jpg', 'extension': 'jpg'}, 1351837083: {'path': 'temp/1744391100_1437382_1351837083_d80645def272e5538d2b3201fd2c19bc.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 = 22293155; (('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 = 22293155 group by h (('19', 15),) 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=22293155 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 (22293155) 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 (22293155) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 11042025 22293155 Nombre de photos uploadées : 15 / 23040 (0%) 11042025 22293155 Nombre de photos taguées (types de déchets): 0 / 15 (0%) 11042025 22293155 Nombre de photos taguées (volume) : 0 / 15 (0%) [{'photo_id': 1351834996, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/3ccb8016bd5fafdca9432b9d49d4d785.jpg', 'username': None, 'uploaded_at': 1744390867, 'text': 'image_11042025_19_00_04_10149.jpg'}, {'photo_id': 1351834838, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/a084240309992f4fae4678157ee30f2c.jpg', 'username': None, 'uploaded_at': 1744390867, 'text': 'image_11042025_19_00_14_10139.jpg'}, {'photo_id': 1351834674, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/5000ebbf90161eb690aa61ec94b092a1.jpg', 'username': None, 'uploaded_at': 1744390867, 'text': 'image_11042025_19_00_24_10137.jpg'}, {'photo_id': 1351834634, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/11/907d712bf9f1581d6704c20637bdbcc0.jpg', 'username': None, 'uploaded_at': 1744390867, 'text': 'image_11042025_19_00_33_9127.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ??????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006878376007080078 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22293155, '2025-04-11' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1733453,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02732372283935547 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 1733453 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1733453, 'dashboard_run_id': 1744415, 'mtr_portfolio_id': 22290790, 'dashboard_result_id': 10033168, '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_P22290790_11-04-2025_18_33_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22290791, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22290792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22290793, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22290794, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22290795, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22290796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22290797, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22290798, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22290799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22290800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22290801, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22290802, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1744415, 'mtr_portfolio_id': 22291494, 'dashboard_result_id': 10033170, '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_P22291494_11-04-2025_18_49_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22291495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22291496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22291497, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22291498, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22291499, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22291500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22291501, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22291502, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22291503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22291504, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22291505, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22291506, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1744415, 'mtr_portfolio_id': 22292559, 'dashboard_result_id': 10033171, '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_P22292559_11-04-2025_19_03_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22292585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22292586, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22292587, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22292588, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22292589, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22292590, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22292591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22292592, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22292593, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22292594, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22292595, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22292596, 'pht': 3726}}"}, {'dashboat_entry_day': 1733453, 'dashboard_run_id': 1744415, 'mtr_portfolio_id': 22293155, 'dashboard_result_id': 10033175, '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_P22293155_11-04-2025_19_04_06.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22293204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22293216, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22293219, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22293220, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22293233, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22293234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22293235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22293236, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22293237, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22293238, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22293239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22293240, '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 = 22290790 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': 2745761, 'mtr_portfolio_id': 22290790, 'created_at': datetime.datetime(2025, 4, 11, 18, 33, 1), 'result': '0.05301354526155008', 'result_long': None, 'result_double': None}] Qualite : 0.05301354526155008 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22290790 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22290790_11-04-2025_18_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22290790 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_P22290790_11-04-2025_18_33_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22290791, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22290792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22290793, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22290794, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22290795, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22290796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22290797, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22290798, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22290799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22290800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22290801, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22290802, 'pht': 3726}}" where mtr_portfolio_id = 22290790 and dashboard_run_id = 1744415 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`=22290790 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10033168, 0.05301354526155008, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22290790_11-04-2025_18_33_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22290791, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22290792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22290793, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22290794, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22290795, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22290796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22290797, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22290798, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22290799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22290800, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22290801, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22290802, '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 = 22291494 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': 2745798, 'mtr_portfolio_id': 22291494, 'created_at': datetime.datetime(2025, 4, 11, 18, 49, 1), 'result': '0.04334877146558542', 'result_long': None, 'result_double': None}] Qualite : 0.04334877146558542 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22291494 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22291494_11-04-2025_18_49_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22291494 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_P22291494_11-04-2025_18_49_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22291495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22291496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22291497, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22291498, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22291499, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22291500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22291501, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22291502, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22291503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22291504, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22291505, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22291506, 'pht': 3726}}" where mtr_portfolio_id = 22291494 and dashboard_run_id = 1744415 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`=22291494 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10033170, 0.04334877146558542, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22291494_11-04-2025_18_49_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22291495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22291496, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22291497, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22291498, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22291499, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22291500, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22291501, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22291502, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22291503, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22291504, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22291505, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22291506, '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 = 22292559 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': 2745845, 'mtr_portfolio_id': 22292559, 'created_at': datetime.datetime(2025, 4, 11, 19, 3, 1), 'result': '0.04413061003913569', 'result_long': None, 'result_double': None}] Qualite : 0.04413061003913569 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22292559 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22292559_11-04-2025_19_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22292559 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_P22292559_11-04-2025_19_03_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22292585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22292586, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22292587, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22292588, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22292589, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22292590, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22292591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22292592, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22292593, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22292594, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22292595, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22292596, 'pht': 3726}}" where mtr_portfolio_id = 22292559 and dashboard_run_id = 1744415 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`=22292559 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10033171, 0.04413061003913569, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22292559_11-04-2025_19_03_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22292585, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22292586, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22292587, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22292588, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22292589, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22292590, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22292591, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22292592, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22292593, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22292594, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22292595, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22292596, '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 = 22293155 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 = 22293155 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 = 22293155 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22293155 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 = 22293155 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 = 22293155 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22293155_11-04-2025_19_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22293155 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_P22293155_11-04-2025_19_05_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22293204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22293216, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22293219, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22293220, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22293233, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22293234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22293235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22293236, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22293237, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22293238, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22293239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22293240, 'pht': 3726}}" where mtr_portfolio_id = 22293155 and dashboard_run_id = 1744415 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22290790,22291494,22292559,22293155) result : ((1351805811,), (1351805879,), (1351806466,), (1351806474,), (1351806528,), (1351806599,), (1351807009,), (1351807057,), (1351807126,), (1351807644,), (1351807780,), (1351807836,), (1351807895,), (1351807942,), (1351808126,), (1351808480,), (1351808541,), (1351808577,), (1351808625,), (1351808769,), (1351809286,), (1351809351,), (1351809400,), (1351809462,), (1351809523,), (1351809619,), (1351810171,), (1351810228,), (1351810293,), (1351810347,), (1351811002,), (1351811119,), (1351811262,), (1351811368,), (1351811532,), (1351812258,), (1351812361,), (1351812476,), (1351812696,), (1351812852,), (1351812955,), (1351813120,), (1351813242,), (1351813388,), (1351813514,), (1351813550,), (1351813654,), (1351814019,), (1351814088,), (1351814164,), (1351814261,), (1351814618,), (1351814654,), (1351814934,), (1351815047,), (1351815220,), (1351815327,), (1351815459,), (1351815606,), (1351816119,), (1351816283,), (1351816416,), (1351816475,), (1351816597,), (1351816728,), (1351817331,), (1351817523,), (1351817706,), (1351818624,), (1351818732,), (1351818793,), (1351818866,), (1351818919,), (1351818966,), (1351819977,), (1351819583,), (1351819651,), (1351819709,), (1351819780,), (1351819897,), (1351820320,), (1351820412,), (1351820437,), (1351820458,), (1351820880,), (1351820942,), (1351821000,), (1351821039,), (1351821105,), (1351821649,), (1351821680,), (1351821864,), (1351821960,), (1351822045,), (1351822111,), (1351822491,), (1351822547,), (1351822592,), (1351822955,), (1351822996,), (1351823021,), (1351823071,), (1351823114,), (1351823582,), (1351823612,), (1351823684,), (1351823710,), (1351823774,), (1351823805,), (1351824041,), (1351824111,), (1351824160,), (1351824961,), (1351825028,), (1351825086,), (1351825160,), (1351825213,), (1351825251,), (1351825515,), (1351825550,), (1351825577,), (1351825616,), (1351826016,), (1351826072,), (1351826100,), (1351826131,), (1351826171,), (1351826211,), (1351826398,), (1351826406,), (1351826412,), (1351826431,), (1351826466,), (1351826510,), (1351826799,), (1351826893,), (1351826921,), (1351827162,), (1351827228,), (1351827256,), (1351827319,), (1351827349,), (1351827763,), (1351827805,), (1351827856,), (1351827967,), (1351828362,), (1351828145,), (1351828182,), (1351828226,), (1351828273,), (1351828294,), (1351828633,), (1351828694,), (1351828754,), (1351828814,), (1351828881,), (1351828921,), (1351829217,), (1351829273,), (1351829834,), (1351829869,), (1351829909,), (1351829932,), (1351829962,), (1351830013,), (1351830498,), (1351830554,), (1351830606,), (1351830835,), (1351830891,), (1351830917,), (1351830948,), (1351830972,), (1351830996,), (1351831153,), (1351831170,), (1351831227,), (1351831238,), (1351831254,), (1351831307,), (1351831316,), (1351831319,), (1351831580,), (1351831622,), (1351831645,), (1351831672,), (1351831700,), (1351832046,), (1351832088,), (1351832113,), (1351832137,), (1351832156,), (1351832213,), (1351832233,), (1351832306,), (1351832547,), (1351832552,), (1351832577,), (1351832602,), (1351832625,), (1351833426,), (1351833531,), (1351833630,), (1351833739,), (1351833776,), (1351834333,), (1351834362,), (1351834395,), (1351834421,), (1351834463,), (1351834499,), (1351834577,), (1351835216,), (1351834605,), (1351834634,), (1351834674,), (1351834838,), (1351834996,), (1351835745,), (1351835801,), (1351835860,), (1351835928,), (1351836679,), (1351836720,), (1351836764,), (1351836844,), (1351837020,), (1351837083,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'11042025': {'nb_upload': 15, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22293155]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1351837083, 1351837020, 1351836844, 1351836764, 1351836720, 1351836679] map_info['map_portfolio_photo'] : {22293155: [1351837083, 1351837020, 1351836844, 1351836764, 1351836720, 1351836679, 1351835928, 1351835860, 1351835801, 1351835745, 1351834996, 1351834838, 1351834674, 1351834634, 1351834605]} final : True mtd_id 4302 list_pids : [1351837083, 1351837020, 1351836844, 1351836764, 1351836720, 1351836679] Looping around the photos to save general results len do output : 1 /22293155Didn'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, '2745906') ('4302', '22293155', '1351837083', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351837020', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836844', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836764', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836720', None, None, None, None, None, '2745906') ('4302', None, None, None, None, None, None, None, '2745906') ('4302', '22293155', '1351836679', None, None, None, None, None, '2745906') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 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, '22293155', 'None', None, None, None, None, '2745906'), ('4302', '22293155', '1351837083', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351837020', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836844', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836764', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836720', None, None, None, None, None, '2745906'), ('4302', '22293155', '1351836679', None, None, None, None, None, '2745906')] time used for this insertion : 0.01658344268798828 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.32997560501098633 time spend to save output : 0.01677989959716797 total time spend for step 5 : 0.3467555046081543 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 (2745906) 1.90user 2.39system 0:06.91elapsed 62%CPU (0avgtext+0avgdata 158088maxresident)k 80inputs+4104outputs (2major+63896minor)pagefaults 0swaps