(1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22451825 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22451813 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='papier' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451825) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451813) result : ((1353917205,), (1353917291,), (1353917373,), (1353917764,), (1353917792,), (1353917825,), (1353917877,), (1353917986,), (1353918038,), (1353918116,), (1353918134,), (1353918139,), (1353918380,), (1353918405,), (1353918408,), (1353918411,), (1353918412,), (1353918415,), (1353918463,), (1353918466,), (1353918531,), (1353918533,), (1353918535,), (1353918584,), (1353918589,), (1353918594,), (1353918597,), (1353918849,), (1353918878,), (1353919252,), (1353919970,), (1353920028,), (1353920064,), (1353920093,), (1353920124,), (1353920158,), (1353920160,), (1353920179,), (1353920189,), (1353920198,), (1353920207,), (1353920374,), (1353920377,), (1353920391,), (1353920604,), (1353920655,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22451826 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22451813 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_brun' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451826) result : ((1353918286,), (1353918287,), (1353918470,), (1353918760,), (1353919047,), (1353920020,), (1353920022,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451813) result : ((1353917205,), (1353917291,), (1353917373,), (1353917764,), (1353917792,), (1353917825,), (1353917877,), (1353917986,), (1353918038,), (1353918116,), (1353918134,), (1353918139,), (1353918380,), (1353918405,), (1353918408,), (1353918411,), (1353918412,), (1353918415,), (1353918463,), (1353918466,), (1353918531,), (1353918533,), (1353918535,), (1353918584,), (1353918589,), (1353918594,), (1353918597,), (1353918849,), (1353918878,), (1353919252,), (1353919970,), (1353920028,), (1353920064,), (1353920093,), (1353920124,), (1353920158,), (1353920160,), (1353920179,), (1353920189,), (1353920198,), (1353920207,), (1353920374,), (1353920377,), (1353920391,), (1353920604,), (1353920655,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22451827 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22451813 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='autre_refus' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451827) result : ((1353918469,), (1353918566,), (1353918718,), (1353919041,), (1353919042,), (1353919532,), (1353920009,), (1353921441,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451813) result : ((1353917205,), (1353917291,), (1353917373,), (1353917764,), (1353917792,), (1353917825,), (1353917877,), (1353917986,), (1353918038,), (1353918116,), (1353918134,), (1353918139,), (1353918380,), (1353918405,), (1353918408,), (1353918411,), (1353918412,), (1353918415,), (1353918463,), (1353918466,), (1353918531,), (1353918533,), (1353918535,), (1353918584,), (1353918589,), (1353918594,), (1353918597,), (1353918849,), (1353918878,), (1353919252,), (1353919970,), (1353920028,), (1353920064,), (1353920093,), (1353920124,), (1353920158,), (1353920160,), (1353920179,), (1353920189,), (1353920198,), (1353920207,), (1353920374,), (1353920377,), (1353920391,), (1353920604,), (1353920655,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22451828 , sub_photo_id, 979,now() FROM (SELECT csp.sub_photo_id, csp.crop_hashtag_id, csp.created_at FROM MTRPhoto.crop_sub_photo_ids csp, MTRPhoto.crop_hashtag_ids chi, MTRBack.hashtags h, MTRUser.mtr_portfolio_photos mpp WHERE mpp.mtr_portfolio_id=22451813 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Teint_Dans_La_Masse' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451828) result : ((1353918282,), (1353920213,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451813) result : ((1353917205,), (1353917291,), (1353917373,), (1353917764,), (1353917792,), (1353917825,), (1353917877,), (1353917986,), (1353918038,), (1353918116,), (1353918134,), (1353918139,), (1353918380,), (1353918405,), (1353918408,), (1353918411,), (1353918412,), (1353918415,), (1353918463,), (1353918466,), (1353918531,), (1353918533,), (1353918535,), (1353918584,), (1353918589,), (1353918594,), (1353918597,), (1353918849,), (1353918878,), (1353919252,), (1353919970,), (1353920028,), (1353920064,), (1353920093,), (1353920124,), (1353920158,), (1353920160,), (1353920179,), (1353920189,), (1353920198,), (1353920207,), (1353920374,), (1353920377,), (1353920391,), (1353920604,), (1353920655,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22451813 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','Carton_brun','papier','autre_refus','environnement','mal_croppe','flou','Teint_Dans_La_Masse','plastique','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22451813 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','Carton_brun','papier','autre_refus','environnement','mal_croppe','flou','Teint_Dans_La_Masse','plastique','kraft','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 22451813, 'sub_port_id': 22451829, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895978, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'plastique': {'main_port_id': 22451813, 'sub_port_id': 22451830, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895979, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'kraft': {'main_port_id': 22451813, 'sub_port_id': 22451831, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895980, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'cartonnette': {'main_port_id': 22451813, 'sub_port_id': 22451832, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895981, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'metal': {'main_port_id': 22451813, 'sub_port_id': 22451833, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895982, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'Carton_gris': {'main_port_id': 22451813, 'sub_port_id': 22451834, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895983, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'environnement': {'main_port_id': 22451813, 'sub_port_id': 22451835, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895984, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'mal_croppe': {'main_port_id': 22451813, 'sub_port_id': 22451836, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895985, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'papier': {'main_port_id': 22451813, 'sub_port_id': 22451837, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895986, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'Carton_brun': {'main_port_id': 22451813, 'sub_port_id': 22451838, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895987, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'autre_refus': {'main_port_id': 22451813, 'sub_port_id': 22451839, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895988, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 22451813, 'sub_port_id': 22451840, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14895989, 'last_updated_at': datetime.datetime(2025, 4, 28, 14, 13), 'last_updated_at_desc': datetime.datetime(2025, 4, 28, 14, 13), 'last_updated_at_asc': datetime.datetime(2025, 4, 28, 14, 4, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451829,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451817 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451830,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451818 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451831,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451819 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451832,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451820 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451833,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451821 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451834,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451822 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451835,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451823 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451836,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451824 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451837,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451825 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451838,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451826 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451839,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451827 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22451840,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22451828 lien utilise dans velours : https://www.fotonower.com/velours/22451829,22451830,22451831,22451832,22451833,22451834,22451835,22451836,22451837,22451838,22451839,22451840?tags=flou,plastique,kraft,cartonnette,metal,Carton_gris,environnement,mal_croppe,papier,Carton_brun,autre_refus,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22451813]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] map_info['map_portfolio_photo'] : {22451813: [1353920655, 1353920604, 1353920391, 1353920377, 1353920374, 1353920207, 1353920198, 1353920189, 1353920179, 1353920160, 1353920158, 1353920124, 1353920093, 1353920064, 1353920028, 1353919970, 1353919252, 1353918878, 1353918849, 1353918597, 1353918594, 1353918589, 1353918584, 1353918535, 1353918533, 1353918531, 1353918466, 1353918463, 1353918415, 1353918412, 1353918411, 1353918408, 1353918405, 1353918380, 1353918139, 1353918134, 1353918116, 1353918038, 1353917986, 1353917877, 1353917825, 1353917792, 1353917764, 1353917373, 1353917291, 1353917205]} final : False mtd_id 4302 list_pids : [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] Looping around the photos to save general results len do output : 1 /22451813. 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, '2764353') ('4302', '22451813', '1353920655', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920604', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920391', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920377', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920374', None, None, None, None, None, '2764353') 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', None, '22451813', "{'flou': 22451817, 'plastique': 22451818, 'kraft': 22451819, 'cartonnette': 22451820, 'metal': 22451821, 'Carton_gris': 22451822, 'environnement': 22451823, 'mal_croppe': 22451824, 'papier': 22451825, 'Carton_brun': 22451826, 'autre_refus': 22451827, 'Teint_Dans_La_Masse': 22451828}", None, None, None, None, '2764353'), ('4302', '22451813', '1353920655', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920604', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920391', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920377', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920374', None, None, None, None, None, '2764353')] time used for this insertion : 0.012002229690551758 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4400310516357422 time spend to save output : 0.01237630844116211 total time spend for step 1 : 1.4524073600769043 step2:final Mon Apr 28 14:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (22451813) 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 22451813 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1353917373,1353917291,1353917205,1353918038,1353917986,1353917877,1353917825,1353917792,1353917764,1353918139,1353918134,1353918116,1353918415,1353918412,1353918411,1353918408,1353918405,1353918380,1353918466,1353918463,1353918535,1353918533,1353918531,1353918597,1353918594,1353918589,1353918584,1353918878,1353918849,1353919252,1353920124,1353920093,1353920064,1353920028,1353919970,1353920207,1353920198,1353920189,1353920179,1353920160,1353920158,1353920391,1353920377,1353920374,1353920655,1353920604); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22451813]) Inside saveOutput : final : False verbose : True original output for save of step final : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} new output for save of step final : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] map_info['map_portfolio_photo'] : {22451813: [1353920655, 1353920604, 1353920391, 1353920377, 1353920374, 1353920207, 1353920198, 1353920189, 1353920179, 1353920160, 1353920158, 1353920124, 1353920093, 1353920064, 1353920028, 1353919970, 1353919252, 1353918878, 1353918849, 1353918597, 1353918594, 1353918589, 1353918584, 1353918535, 1353918533, 1353918531, 1353918466, 1353918463, 1353918415, 1353918412, 1353918411, 1353918408, 1353918405, 1353918380, 1353918139, 1353918134, 1353918116, 1353918038, 1353917986, 1353917877, 1353917825, 1353917792, 1353917764, 1353917373, 1353917291, 1353917205]} final : False mtd_id 4302 list_pids : [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] Looping around the photos to save general results len do output : 5 /1353920655.Didn't retrieve data . /1353920604.Didn't retrieve data . /1353920391.Didn't retrieve data . /1353920377.Didn't retrieve data . /1353920374.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, '2764353') ('4302', '22451813', '1353920655', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920604', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920391', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920377', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920374', None, None, None, None, None, '2764353') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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', '22451813', '1353920655', '0.06739529525952345', None, None, None, None, '2764353'), ('4302', '22451813', '1353920604', '0.06739529525952345', None, None, None, None, '2764353'), ('4302', '22451813', '1353920391', '0.06739529525952345', None, None, None, None, '2764353'), ('4302', '22451813', '1353920377', '0.06739529525952345', None, None, None, None, '2764353'), ('4302', '22451813', '1353920374', '0.06739529525952345', None, None, None, None, '2764353')] time used for this insertion : 0.012624979019165039 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06691169738769531 time spend to save output : 0.012974977493286133 total time spend for step 2 : 0.07988667488098145 step3:velours_tree Mon Apr 28 14:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {22451813: [{'flou': 22451817, 'plastique': 22451818, 'kraft': 22451819, 'cartonnette': 22451820, 'metal': 22451821, 'Carton_gris': 22451822, 'environnement': 22451823, 'mal_croppe': 22451824, 'papier': 22451825, 'Carton_brun': 22451826, 'autre_refus': 22451827, 'Teint_Dans_La_Masse': 22451828}]} input_args_next_step : {22451813: ()} output_args : {22451813: [{'flou': 22451817, 'plastique': 22451818, 'kraft': 22451819, 'cartonnette': 22451820, 'metal': 22451821, 'Carton_gris': 22451822, 'environnement': 22451823, 'mal_croppe': 22451824, 'papier': 22451825, 'Carton_brun': 22451826, 'autre_refus': 22451827, 'Teint_Dans_La_Masse': 22451828}]} args : 22451813 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 : ({'flou': 22451817, 'plastique': 22451818, 'kraft': 22451819, 'cartonnette': 22451820, 'metal': 22451821, 'Carton_gris': 22451822, 'environnement': 22451823, 'mal_croppe': 22451824, 'papier': 22451825, 'Carton_brun': 22451826, 'autre_refus': 22451827, 'Teint_Dans_La_Masse': 22451828},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22451813) 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([22451813]) 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.3857855796813965 time spend to save output : 7.200241088867188e-05 total time spend for step 3 : 0.38585758209228516 step4:send_mail_cod Mon Apr 28 14:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} input_args_next_step : {1353920655: ()} output_args : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} args : 1353920655 depend.output_id : 0 input_args_next_step : {1353920655: ('0.06739529525952345',), 1353920604: ()} output_args : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} args : 1353920604 depend.output_id : 0 input_args_next_step : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ()} output_args : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} args : 1353920391 depend.output_id : 0 input_args_next_step : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ()} output_args : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} args : 1353920377 depend.output_id : 0 input_args_next_step : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ()} output_args : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',)} args : 1353920374 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 : {22451813: [{'flou': 22451817, 'plastique': 22451818, 'kraft': 22451819, 'cartonnette': 22451820, 'metal': 22451821, 'Carton_gris': 22451822, 'environnement': 22451823, 'mal_croppe': 22451824, 'papier': 22451825, 'Carton_brun': 22451826, 'autre_refus': 22451827, 'Teint_Dans_La_Masse': 22451828}]} input_args_next_step : {1353920655: ('0.06739529525952345',), 1353920604: ('0.06739529525952345',), 1353920391: ('0.06739529525952345',), 1353920377: ('0.06739529525952345',), 1353920374: ('0.06739529525952345',), 22451813: ()} output_args : {22451813: [{'flou': 22451817, 'plastique': 22451818, 'kraft': 22451819, 'cartonnette': 22451820, 'metal': 22451821, 'Carton_gris': 22451822, 'environnement': 22451823, 'mal_croppe': 22451824, 'papier': 22451825, 'Carton_brun': 22451826, 'autre_refus': 22451827, 'Teint_Dans_La_Masse': 22451828}]} args : 22451813 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 :6, first value : ('0.06739529525952345',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22451813) 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 (1353920655,1353920604,1353920391,1353920377,1353920374) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1353920374 begin to download photo : 1353920391 begin to download photo : 1353920655 download finish for photo 1353920374 begin to download photo : 1353920377 download finish for photo 1353920655 download finish for photo 1353920391 begin to download photo : 1353920604 download finish for photo 1353920377 download finish for photo 1353920604 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette224518171745842499/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P22451813_28-04-2025_14_14_59.pdf Dont find os.environ['TEMPS'] 22451817 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=22451817 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224518171745842499 22451818 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=22451818 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353918289: '1745841792_3285884_1353917373_326039c508bbe8bc5da0541f6d081d6b_rle_crop_3770995443_0.png', 1353918290: '1745841792_3285884_1353917291_43740f9108cce182a34b3cdb93fc11f8_rle_crop_3770995448_0.png', 1353918291: '1745841792_3285884_1353917205_b1e452acdcadcc3a4f0ea674f21834ed_rle_crop_3770995475_0.png', 1353918572: '1745841973_3287809_1353917764_99c0a7cf4b00781c3aa3da81c9001ceb_rle_crop_3770997828_0.png', 1353919537: '1745842152_3289615_1353918594_ca8d1cc74e426f1064a41a9c7f4f6a33_rle_crop_3770999814_0.png', 1353920029: '1745842212_3290225_1353918463_60ab78ed248167c6a2f7f3681b16970e_rle_crop_3771000413_0.png', 1353921454: '1745842452_3292912_1353918038_6f7860eb6378b7536717cf2b8882afe4_rle_crop_3771001644_0.png', 1353921456: '1745842452_3292912_1353918038_6f7860eb6378b7536717cf2b8882afe4_rle_crop_3771001642_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/e3be7ea9652c73479432331cec296bcd_44293470.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/a1868f6682bc2ba20bc814f144598cf8_45656182.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/336b04bb726c863531f0b600fe516a59_69192911.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/08c6d2bad982283753dfce8d33f87456_62161070.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/6b761d78f82ad2e7e806a1375dddff13_17550143.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/b5664852a98b9e635e2d74e172bb4c60_55995997.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/3e9ee2730b5ad9b7df2742af888736e9_66436480.png change filename to text .imagette224518181745842499/ imagette224518181745842499/1745841792_3285884_1353917373_326039c508bbe8bc5da0541f6d081d6b_rle_crop_3770995443_0.png.png imagette224518181745842499/1745842152_3289615_1353918594_ca8d1cc74e426f1064a41a9c7f4f6a33_rle_crop_3770999814_0.png.png imagette224518181745842499/1745842452_3292912_1353918038_6f7860eb6378b7536717cf2b8882afe4_rle_crop_3771001644_0.png.png imagette224518181745842499/1745841973_3287809_1353917764_99c0a7cf4b00781c3aa3da81c9001ceb_rle_crop_3770997828_0.png.png imagette224518181745842499/1745841792_3285884_1353917205_b1e452acdcadcc3a4f0ea674f21834ed_rle_crop_3770995475_0.png.png imagette224518181745842499/1745842212_3290225_1353918463_60ab78ed248167c6a2f7f3681b16970e_rle_crop_3771000413_0.png.png imagette224518181745842499/1745842452_3292912_1353918038_6f7860eb6378b7536717cf2b8882afe4_rle_crop_3771001642_0.png.png imagette224518181745842499/1745841792_3285884_1353917291_43740f9108cce182a34b3cdb93fc11f8_rle_crop_3770995448_0.png.png imagette224518191745842500/ wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/b11b15b8271713a2c74d9618e9c9b233_39450991.png imagette224518181745842499 22451819 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=22451819 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224518191745842500 22451820 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=22451820 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353918570: '1745841973_3287809_1353917877_e47cedd516be8e9bc88f552ed1dc60d4_rle_crop_3770997793_0.png', 1353918747: '1745842031_3288404_1353918466_fec5c3f5c839f702f32d0fe58a763e08_rle_crop_3770998130_0.png', 1353918748: '1745842031_3288404_1353918411_24ad6eb59e790b07c1d984c12036ec64_rle_crop_3770998156_0.png', 1353918749: '1745842031_3288404_1353918408_845bcf2be6d5cc7a870d9c228822b5c0_rle_crop_3770998183_0.png', 1353918751: '1745842031_3288404_1353918380_8bab5b36cc51003e0f22e26a92560b0c_rle_crop_3770998237_0.png', 1353918752: '1745842031_3288404_1353918380_8bab5b36cc51003e0f22e26a92560b0c_rle_crop_3770998235_0.png', 1353920215: '1745842272_3291001_1353919252_d79eaeee7b2f65c47d2ed1064e94f256_rle_crop_3771001151_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/babaad61531780a13460b4660e94c66e_16859905.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/d1e3932677ce4e9e57da8be646620033_92593028.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/382be0d1731d83539233445e9a1b1a49_23030513.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/0054dcbc98d39a42879ce8d40fa987e0_68655775.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/c2665fb70d5b2eb78c41fab6a29380c2_50254891.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/630ce5105ebb30d5920f44dc6498534d_50887496.png change filename to text .imagette224518201745842500/ imagette224518201745842500/1745842031_3288404_1353918411_24ad6eb59e790b07c1d984c12036ec64_rle_crop_3770998156_0.png.png imagette224518201745842500/1745842272_3291001_1353919252_d79eaeee7b2f65c47d2ed1064e94f256_rle_crop_3771001151_0.png.png imagette224518201745842500/1745842031_3288404_1353918408_845bcf2be6d5cc7a870d9c228822b5c0_rle_crop_3770998183_0.png.png imagette224518201745842500/1745841973_3287809_1353917877_e47cedd516be8e9bc88f552ed1dc60d4_rle_crop_3770997793_0.png.png imagette224518201745842500/1745842031_3288404_1353918380_8bab5b36cc51003e0f22e26a92560b0c_rle_crop_3770998235_0.png.png imagette224518201745842500/1745842031_3288404_1353918380_8bab5b36cc51003e0f22e26a92560b0c_rle_crop_3770998237_0.png.png imagette224518201745842500/1745842031_3288404_1353918466_fec5c3f5c839f702f32d0fe58a763e08_rle_crop_3770998130_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/e40a05b385960dfe01ab9ecb47eefd0f_61588658.png imagette224518201745842500 22451821 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=22451821 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353918292: '1745841792_3285884_1353917205_b1e452acdcadcc3a4f0ea674f21834ed_rle_crop_3770995467_0.png'} change filename to text .imagette224518211745842500/ imagette224518211745842500/1745841792_3285884_1353917205_b1e452acdcadcc3a4f0ea674f21834ed_rle_crop_3770995467_0.png.png imagette224518241745842500/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/56e9de6d4e27d94ef01d210a0a1941ed_21342698.png imagette224518211745842500 22451824 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=22451824 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette224518241745842500 22451827 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=22451827 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353918469: '1745841910_3287232_1353918116_b5e04d6a8a441446141400ec2e5d9818_rle_crop_3770996087_0.png', 1353918566: '1745841973_3287809_1353917825_fa56e38e4a2b2deba7f837ec34548a0c_rle_crop_3770997799_0.png', 1353918718: '1745842031_3288404_1353918405_ab2c1fd2b1e51dee7998c07fe8c7d40f_rle_crop_3770998204_0.png', 1353919041: '1745842091_3288939_1353918415_af1e75a1a99e279fe171ab866a5b3c83_rle_crop_3770998774_0.png', 1353919042: '1745842091_3288939_1353918415_af1e75a1a99e279fe171ab866a5b3c83_rle_crop_3770998776_0.png', 1353919532: '1745842152_3289615_1353918594_ca8d1cc74e426f1064a41a9c7f4f6a33_rle_crop_3770999815_0.png', 1353920009: '1745842212_3290225_1353918463_60ab78ed248167c6a2f7f3681b16970e_rle_crop_3771000412_0.png', 1353921441: '1745842452_3292912_1353918038_6f7860eb6378b7536717cf2b8882afe4_rle_crop_3771001638_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/44b73c7fd3ab8130c8ead09ccb8735a9_46850183.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/68c27c1c3c301c11e0e08d076af111b1_94282611.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/7b4aaaeb6ef7e87201d6580e5fb90c24_3230500.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/6ee129f0e546fb361e0748f025bd0aff_38680301.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/e7459866ab01ad4151998f55d54059b3_16809192.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/ea81411f62ec634d4066a4d41b249aa6_85373789.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/4c917f7df022cc62a55b588ca540c77e_27045649.png change filename to text .imagette224518271745842500/ imagette224518271745842500/1745841910_3287232_1353918116_b5e04d6a8a441446141400ec2e5d9818_rle_crop_3770996087_0.png.png imagette224518271745842500/1745842212_3290225_1353918463_60ab78ed248167c6a2f7f3681b16970e_rle_crop_3771000412_0.png.png imagette224518271745842500/1745841973_3287809_1353917825_fa56e38e4a2b2deba7f837ec34548a0c_rle_crop_3770997799_0.png.png imagette224518271745842500/1745842091_3288939_1353918415_af1e75a1a99e279fe171ab866a5b3c83_rle_crop_3770998774_0.png.png imagette224518271745842500/1745842152_3289615_1353918594_ca8d1cc74e426f1064a41a9c7f4f6a33_rle_crop_3770999815_0.png.png imagette224518271745842500/1745842091_3288939_1353918415_af1e75a1a99e279fe171ab866a5b3c83_rle_crop_3770998776_0.png.png imagette224518271745842500/1745842452_3292912_1353918038_6f7860eb6378b7536717cf2b8882afe4_rle_crop_3771001638_0.png.png imagette224518271745842500/1745842031_3288404_1353918405_ab2c1fd2b1e51dee7998c07fe8c7d40f_rle_crop_3770998204_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/b10b45d005d93b0bdaaedd4fbf66f67b_35728667.png imagette224518271745842500 22451822 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=22451822 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353918568: '1745841973_3287809_1353917825_fa56e38e4a2b2deba7f837ec34548a0c_rle_crop_3770997805_0.png', 1353918569: '1745841973_3287809_1353917792_7786bd8ccdf53d4bc39fdd719a97bc93_rle_crop_3770997818_0.png', 1353918731: '1745842031_3288404_1353918411_24ad6eb59e790b07c1d984c12036ec64_rle_crop_3770998162_0.png', 1353918732: '1745842031_3288404_1353918411_24ad6eb59e790b07c1d984c12036ec64_rle_crop_3770998160_0.png', 1353918733: '1745842031_3288404_1353918408_845bcf2be6d5cc7a870d9c228822b5c0_rle_crop_3770998178_0.png', 1353918734: '1745842031_3288404_1353918408_845bcf2be6d5cc7a870d9c228822b5c0_rle_crop_3770998177_0.png', 1353918735: '1745842031_3288404_1353918405_ab2c1fd2b1e51dee7998c07fe8c7d40f_rle_crop_3770998205_0.png', 1353918736: '1745842031_3288404_1353918380_8bab5b36cc51003e0f22e26a92560b0c_rle_crop_3770998239_0.png', 1353920214: '1745842272_3291001_1353918849_88a025ba45d96076c2aae32498e91ed0_rle_crop_3771001166_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/c7bdb06080fa966bbfeb8edc2b84bb22_76985947.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/5f55153dcf2e4b4900a76f248dd2a1b9_89114591.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/68b6f8e9fa898760e4ede3b3357cdfe9_21558391.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/c8ec5d0a6b93f8e299f60e2f11c1dfdf_92583392.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/c4156cf30b29af76fe80d7a268eff82c_12536368.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/1b08d9dd55a8200a1511d093d91eb593_25715905.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/45d77f2a13171150e12bd57fd01aec4b_89142549.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/73bf97cd495a2a76c1caa83554f5190a_41692685.png change filename to text .imagette224518221745842501/ imagette224518221745842501/1745842031_3288404_1353918411_24ad6eb59e790b07c1d984c12036ec64_rle_crop_3770998160_0.png.png imagette224518221745842501/1745842272_3291001_1353918849_88a025ba45d96076c2aae32498e91ed0_rle_crop_3771001166_0.png.png imagette224518221745842501/1745842031_3288404_1353918405_ab2c1fd2b1e51dee7998c07fe8c7d40f_rle_crop_3770998205_0.png.png imagette224518221745842501/1745842031_3288404_1353918380_8bab5b36cc51003e0f22e26a92560b0c_rle_crop_3770998239_0.png.png imagette224518221745842501/1745842031_3288404_1353918408_845bcf2be6d5cc7a870d9c228822b5c0_rle_crop_3770998177_0.png.png imagette224518221745842501/1745841973_3287809_1353917825_fa56e38e4a2b2deba7f837ec34548a0c_rle_crop_3770997805_0.png.png imagette224518221745842501/1745842031_3288404_1353918411_24ad6eb59e790b07c1d984c12036ec64_rle_crop_3770998162_0.png.png imagette224518221745842501/1745842031_3288404_1353918408_845bcf2be6d5cc7a870d9c228822b5c0_rle_crop_3770998178_0.png.png imagette224518221745842501/1745841973_3287809_1353917792_7786bd8ccdf53d4bc39fdd719a97bc93_rle_crop_3770997818_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/5e6360a1b2f51143a3be695440817ca7_16005223.png imagette224518221745842501 22451826 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=22451826 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353918286: '1745841792_3285884_1353917373_326039c508bbe8bc5da0541f6d081d6b_rle_crop_3770995438_0.png', 1353918287: '1745841792_3285884_1353917291_43740f9108cce182a34b3cdb93fc11f8_rle_crop_3770995453_0.png', 1353918470: '1745841910_3287232_1353918116_b5e04d6a8a441446141400ec2e5d9818_rle_crop_3770996084_0.png', 1353918760: '1745842031_3288404_1353918466_fec5c3f5c839f702f32d0fe58a763e08_rle_crop_3770998126_0.png', 1353919047: '1745842091_3288939_1353918415_af1e75a1a99e279fe171ab866a5b3c83_rle_crop_3770998777_0.png', 1353920020: '1745842212_3290225_1353918535_37a854220c2faac3b877ec21eef604d3_rle_crop_3771000399_0.png', 1353920022: '1745842212_3290225_1353918535_37a854220c2faac3b877ec21eef604d3_rle_crop_3771000398_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/7fd6582f7799d2580cd7d655f88c19ed_58300105.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/083492517a31ac2bb0e612931846b4a0_77887383.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/25ef6760695e58745468359b9e9ea3a8_76223712.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/9ae8edecbd15f14cd91816b38e77dd2c_31097844.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/b55bb6daf06b8975f05dc6445f8abbd0_91568132.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/2593a9fabd3f5f65181c0de721d8f61c_92334507.png change filename to text .imagette224518261745842501/ imagette224518261745842501/1745841792_3285884_1353917291_43740f9108cce182a34b3cdb93fc11f8_rle_crop_3770995453_0.png.png imagette224518261745842501/1745841792_3285884_1353917373_326039c508bbe8bc5da0541f6d081d6b_rle_crop_3770995438_0.png.png imagette224518261745842501/1745842212_3290225_1353918535_37a854220c2faac3b877ec21eef604d3_rle_crop_3771000398_0.png.png imagette224518261745842501/1745842091_3288939_1353918415_af1e75a1a99e279fe171ab866a5b3c83_rle_crop_3770998777_0.png.png imagette224518261745842501/1745841910_3287232_1353918116_b5e04d6a8a441446141400ec2e5d9818_rle_crop_3770996084_0.png.png imagette224518261745842501/1745842031_3288404_1353918466_fec5c3f5c839f702f32d0fe58a763e08_rle_crop_3770998126_0.png.png imagette224518261745842501/1745842212_3290225_1353918535_37a854220c2faac3b877ec21eef604d3_rle_crop_3771000399_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/cc8a36e9f7ff9b4f5ddb97c139d6184d_16028009.png imagette224518261745842501 22451828 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=22451828 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1353918282: '1745841792_3285884_1353917373_326039c508bbe8bc5da0541f6d081d6b_rle_crop_3770995435_0.png', 1353920213: '1745842272_3291001_1353919252_d79eaeee7b2f65c47d2ed1064e94f256_rle_crop_3771001152_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/4d286ff8c474f6fa457d2c0b2ecb3978_50218638.png change filename to text .imagette224518281745842502/ imagette224518281745842502/1745842272_3291001_1353919252_d79eaeee7b2f65c47d2ed1064e94f256_rle_crop_3771001152_0.png.png imagette224518281745842502/1745841792_3285884_1353917373_326039c508bbe8bc5da0541f6d081d6b_rle_crop_3770995435_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/f668ec3ddf04d9f45fe65592666e34d5_67186844.png imagette224518281745842502 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22451813 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22451829,22451830,22451831,22451832,22451833,22451834,22451835,22451836,22451837,22451838,22451839,22451840?tags=flou,plastique,kraft,cartonnette,metal,Carton_gris,environnement,mal_croppe,papier,Carton_brun,autre_refus,Teint_Dans_La_Masse Dont find os.environ['TEMPS'] your option no_mail is active, we will not send the real mail to your client args[1353920655] : ('0.06739529525952345',) no score found for photo 1353920655 We are sending mail with results at report@fotonower.com args[1353920604] : ('0.06739529525952345',) no score found for photo 1353920604 We are sending mail with results at report@fotonower.com args[1353920391] : ('0.06739529525952345',) no score found for photo 1353920391 We are sending mail with results at report@fotonower.com args[1353920377] : ('0.06739529525952345',) no score found for photo 1353920377 We are sending mail with results at report@fotonower.com args[1353920374] : ('0.06739529525952345',) no score found for photo 1353920374 We are sending mail with results at report@fotonower.com refus_total : 0.06739529525952345 2022-04-13 10:29:59 0 Dont find os.environ['TEMPS'] 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=22451813 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_P22451813_28-04-2025_14_14_59.pdf results_Auto_P22451813_28-04-2025_14_14_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451813_28-04-2025_14_14_59.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','22451813','results_Auto_P22451813_28-04-2025_14_14_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451813_28-04-2025_14_14_59.pdf','pdf','','0.21','0.06739529525952345') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22451813]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] map_info['map_portfolio_photo'] : {22451813: [1353920655, 1353920604, 1353920391, 1353920377, 1353920374, 1353920207, 1353920198, 1353920189, 1353920179, 1353920160, 1353920158, 1353920124, 1353920093, 1353920064, 1353920028, 1353919970, 1353919252, 1353918878, 1353918849, 1353918597, 1353918594, 1353918589, 1353918584, 1353918535, 1353918533, 1353918531, 1353918466, 1353918463, 1353918415, 1353918412, 1353918411, 1353918408, 1353918405, 1353918380, 1353918139, 1353918134, 1353918116, 1353918038, 1353917986, 1353917877, 1353917825, 1353917792, 1353917764, 1353917373, 1353917291, 1353917205]} final : False mtd_id 4302 list_pids : [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] 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, '2764353') ('4302', '22451813', '1353920655', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920604', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920391', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920377', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920374', None, None, None, None, None, '2764353') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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', '22451813', '1353920655', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920604', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920391', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920377', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920374', None, None, None, None, None, '2764353')] time used for this insertion : 0.012000799179077148 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.790398597717285 time spend to save output : 0.012184858322143555 total time spend for step 4 : 3.8025834560394287 step5:split_time_score Mon Apr 28 14:15:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22451813'] 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 : [('22451813',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22451813) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1353920655: {'path': 'temp/1745842499_2173501_1353920655_ff07966c90b53415b0cbfd8cb117d3bf.jpg', 'extension': 'jpg'}, 1353920374: {'path': 'temp/1745842499_2173501_1353920374_218d0a40b829a66631fb095b42fe2507.jpg', 'extension': 'jpg'}, 1353920377: {'path': 'temp/1745842499_2173501_1353920377_56482eaa0e31e5b980e8a2c031e77063.jpg', 'extension': 'jpg'}, 1353920391: {'path': 'temp/1745842499_2173501_1353920391_1ccdf7a3c9f3b72065153d630839a062.jpg', 'extension': 'jpg'}, 1353920604: {'path': 'temp/1745842499_2173501_1353920604_aae7c0b8ee3951e4fabb5bb20bcd2696.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 = 22451813; (('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 = 22451813 group by h (('14', 46),) 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=22451813 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 (22451813) 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 (22451813) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 28042025 22451813 Nombre de photos uploadées : 46 / 23040 (0%) 28042025 22451813 Nombre de photos taguées (types de déchets): 0 / 46 (0%) 28042025 22451813 Nombre de photos taguées (volume) : 0 / 46 (0%) [{'photo_id': 1353917373, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/326039c508bbe8bc5da0541f6d081d6b.jpg', 'username': None, 'uploaded_at': 1745841697, 'text': 'image_28042025_14_00_14_010197m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1353917291, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/43740f9108cce182a34b3cdb93fc11f8.jpg', 'username': None, 'uploaded_at': 1745841697, 'text': 'image_28042025_14_00_24_010138m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1353917205, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/b1e452acdcadcc3a4f0ea674f21834ed.jpg', 'username': None, 'uploaded_at': 1745841697, 'text': 'image_28042025_14_00_34_010134m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1353918038, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/28/6f7860eb6378b7536717cf2b8882afe4.jpg', 'username': None, 'uploaded_at': 1745841757, 'text': 'image_28042025_14_00_44_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.4836273193359375e-06 ?????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001470327377319336 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22451813, '2025-04-28' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1750587,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.026669025421142578 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= 1750587 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1750587, 'dashboard_run_id': 1758592, 'mtr_portfolio_id': 22451062, 'dashboard_result_id': 10113941, '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_P22451062_28-04-2025_13_48_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451113, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451116, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22451117, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451118, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451119, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22451121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451123, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451124, 'pht': 3726}}"}, {'dashboat_entry_day': 1750587, 'dashboard_run_id': 1758592, 'mtr_portfolio_id': 22451421, 'dashboard_result_id': 10113942, '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_P22451421_28-04-2025_14_02_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22451449, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451451, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451452, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22451453, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451456, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451457, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451458, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451460, 'pht': 3726}}"}, {'dashboat_entry_day': 1750587, 'dashboard_run_id': 1758592, 'mtr_portfolio_id': 22451813, 'dashboard_result_id': 10113943, '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_P22451813_28-04-2025_14_13_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22451817, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451818, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451819, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451820, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451821, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451822, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451823, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451824, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22451825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451826, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451827, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451828, '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 = 22451062 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': 2764258, 'mtr_portfolio_id': 22451062, 'created_at': datetime.datetime(2025, 4, 28, 13, 48, 29), 'result': '0.13513462623445294', 'result_long': None, 'result_double': None}] Qualite : 0.13513462623445294 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22451062 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451062_28-04-2025_13_48_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22451062 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_P22451062_28-04-2025_13_48_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451113, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451116, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22451117, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451118, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451119, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22451121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451123, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451124, 'pht': 3726}}" where mtr_portfolio_id = 22451062 and dashboard_run_id = 1758592 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`=22451062 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10113941, 0.13513462623445294, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451062_28-04-2025_13_48_29.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451113, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451114, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451115, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451116, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22451117, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451118, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451119, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451120, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22451121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451123, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451124, '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 = 22451421 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': 2764296, 'mtr_portfolio_id': 22451421, 'created_at': datetime.datetime(2025, 4, 28, 14, 2, 28), 'result': '0.05807227511360044', 'result_long': None, 'result_double': None}] Qualite : 0.05807227511360044 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22451421 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451421_28-04-2025_14_02_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22451421 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_P22451421_28-04-2025_14_02_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22451449, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451451, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451452, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22451453, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451456, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451457, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451458, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451460, 'pht': 3726}}" where mtr_portfolio_id = 22451421 and dashboard_run_id = 1758592 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`=22451421 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10113942, 0.05807227511360044, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451421_28-04-2025_14_02_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22451449, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451450, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451451, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451452, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22451453, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451454, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451455, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451456, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451457, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451458, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451460, '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 = 22451813 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': 2764353, 'mtr_portfolio_id': 22451813, 'created_at': datetime.datetime(2025, 4, 28, 14, 14, 59), 'result': '0.06739529525952345', 'result_long': None, 'result_double': None}] Qualite : 0.06739529525952345 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22451813 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451813_28-04-2025_14_14_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22451813 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_P22451813_28-04-2025_14_14_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22451817, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451818, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451819, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451820, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451821, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451822, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451823, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451824, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22451825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451826, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451827, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451828, 'pht': 3726}}" where mtr_portfolio_id = 22451813 and dashboard_run_id = 1758592 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`=22451813 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10113943, 0.06739529525952345, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22451813_28-04-2025_14_14_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22451817, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22451818, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22451819, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22451820, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22451821, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22451822, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22451823, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22451824, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22451825, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22451826, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22451827, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22451828, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22451062,22451421,22451813) result : ((1353910329,), (1353910359,), (1353910394,), (1353910454,), (1353910462,), (1353910635,), (1353910636,), (1353910638,), (1353910641,), (1353910644,), (1353911409,), (1353911413,), (1353911417,), (1353911428,), (1353911496,), (1353911500,), (1353911569,), (1353911585,), (1353911591,), (1353912204,), (1353912208,), (1353912212,), (1353912216,), (1353912221,), (1353912264,), (1353912268,), (1353912326,), (1353912330,), (1353912334,), (1353912450,), (1353912587,), (1353912642,), (1353912646,), (1353912656,), (1353912659,), (1353912972,), (1353913008,), (1353913049,), (1353913082,), (1353913113,), (1353913522,), (1353913555,), (1353913592,), (1353913623,), (1353913732,), (1353913737,), (1353913742,), (1353913918,), (1353913969,), (1353914000,), (1353914034,), (1353914562,), (1353914576,), (1353914592,), (1353914634,), (1353914662,), (1353914720,), (1353914721,), (1353914729,), (1353914733,), (1353914735,), (1353914739,), (1353914742,), (1353914746,), (1353914785,), (1353914791,), (1353914797,), (1353914856,), (1353914863,), (1353914869,), (1353914871,), (1353914889,), (1353914895,), (1353914909,), (1353914917,), (1353914935,), (1353914941,), (1353915601,), (1353915680,), (1353915766,), (1353917420,), (1353917205,), (1353917291,), (1353917373,), (1353917764,), (1353917792,), (1353917825,), (1353917877,), (1353917986,), (1353918038,), (1353918116,), (1353918134,), (1353918139,), (1353918380,), (1353918405,), (1353918408,), (1353918411,), (1353918412,), (1353918415,), (1353918463,), (1353918466,), (1353918531,), (1353918533,), (1353918535,), (1353918584,), (1353918589,), (1353918594,), (1353918597,), (1353918849,), (1353918878,), (1353919252,), (1353919970,), (1353920028,), (1353920064,), (1353920093,), (1353920124,), (1353920158,), (1353920160,), (1353920179,), (1353920189,), (1353920198,), (1353920207,), (1353920374,), (1353920377,), (1353920391,), (1353920604,), (1353920655,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'28042025': {'nb_upload': 46, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22451813]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] map_info['map_portfolio_photo'] : {22451813: [1353920655, 1353920604, 1353920391, 1353920377, 1353920374, 1353920207, 1353920198, 1353920189, 1353920179, 1353920160, 1353920158, 1353920124, 1353920093, 1353920064, 1353920028, 1353919970, 1353919252, 1353918878, 1353918849, 1353918597, 1353918594, 1353918589, 1353918584, 1353918535, 1353918533, 1353918531, 1353918466, 1353918463, 1353918415, 1353918412, 1353918411, 1353918408, 1353918405, 1353918380, 1353918139, 1353918134, 1353918116, 1353918038, 1353917986, 1353917877, 1353917825, 1353917792, 1353917764, 1353917373, 1353917291, 1353917205]} final : True mtd_id 4302 list_pids : [1353920655, 1353920604, 1353920391, 1353920377, 1353920374] Looping around the photos to save general results len do output : 1 /22451813Didn'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, '2764353') ('4302', '22451813', '1353920655', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920604', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920391', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920377', None, None, None, None, None, '2764353') ('4302', None, None, None, None, None, None, None, '2764353') ('4302', '22451813', '1353920374', None, None, None, None, None, '2764353') 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', None, '22451813', 'None', None, None, None, None, '2764353'), ('4302', '22451813', '1353920655', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920604', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920391', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920377', None, None, None, None, None, '2764353'), ('4302', '22451813', '1353920374', None, None, None, None, None, '2764353')] time used for this insertion : 0.012649297714233398 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3186821937561035 time spend to save output : 0.012801408767700195 total time spend for step 5 : 0.3314836025238037 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 (2764353) 2.00user 2.36system 0:08.63elapsed 50%CPU (0avgtext+0avgdata 158084maxresident)k 5592inputs+10208outputs (101major+64042minor)pagefaults 0swaps