SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099168) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099169 , 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=22099130 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 (22099169) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099170 , 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=22099130 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='kraft' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099170) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099171 , 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=22099130 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='plastique' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099171) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099172 , 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=22099130 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='mal_croppe' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099172) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099173 , 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=22099130 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='metal' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099173) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099174 , 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=22099130 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 (22099174) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099175 , 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=22099130 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 (22099175) result : ((1350444122,), (1350444756,), (1350444757,), (1350444758,), (1350445135,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099176 , 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=22099130 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 (22099176) result : ((1350444123,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099177 , 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=22099130 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='Carton_gris' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099177) result : ((1350445150,), (1350445152,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099178 , 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=22099130 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='flou' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099178) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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 22099179 , 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=22099130 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='cartonnette' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099179) result : ((1350444124,), (1350444125,), (1350444126,), (1350444127,), (1350444759,), (1350445163,), (1350445164,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22099130) result : ((1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) 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`=22099130 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_brun','kraft','autre_refus','environnement','flou','cartonnette','metal','mal_croppe','plastique','Carton_gris','Teint_Dans_La_Masse')) 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`=22099130 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_brun','kraft','autre_refus','environnement','flou','cartonnette','metal','mal_croppe','plastique','Carton_gris','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 22099130, 'sub_port_id': 22099181, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584217, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'papier': {'main_port_id': 22099130, 'sub_port_id': 22099182, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584218, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'kraft': {'main_port_id': 22099130, 'sub_port_id': 22099183, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584219, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'plastique': {'main_port_id': 22099130, 'sub_port_id': 22099184, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584220, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'mal_croppe': {'main_port_id': 22099130, 'sub_port_id': 22099185, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584221, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'metal': {'main_port_id': 22099130, 'sub_port_id': 22099186, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584222, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'Carton_brun': {'main_port_id': 22099130, 'sub_port_id': 22099187, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584223, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22099130, 'sub_port_id': 22099188, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584224, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'autre_refus': {'main_port_id': 22099130, 'sub_port_id': 22099189, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584225, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'Carton_gris': {'main_port_id': 22099130, 'sub_port_id': 22099190, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584226, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'flou': {'main_port_id': 22099130, 'sub_port_id': 22099191, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584227, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}, 'cartonnette': {'main_port_id': 22099130, 'sub_port_id': 22099192, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14584228, 'last_updated_at': datetime.datetime(2025, 4, 16, 20, 20, 30), 'last_updated_at_desc': datetime.datetime(2025, 4, 16, 20, 20, 30), 'last_updated_at_asc': datetime.datetime(2025, 4, 16, 20, 18, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099181,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099168 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099182,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099169 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099183,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099170 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099184,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099171 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099185,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099172 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099186,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099173 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099187,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099174 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099188,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099175 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099189,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099176 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099190,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099177 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099191,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099178 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22099192,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22099179 lien utilise dans velours : https://www.fotonower.com/velours/22099181,22099182,22099183,22099184,22099185,22099186,22099187,22099188,22099189,22099190,22099191,22099192?tags=environnement,papier,kraft,plastique,mal_croppe,metal,Carton_brun,Teint_Dans_La_Masse,autre_refus,Carton_gris,flou,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22099130]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] map_info['map_portfolio_photo'] : {22099130: [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499, 1350444365, 1350444359, 1350444345, 1350444340, 1350444195, 1350444186, 1350443812, 1350443758, 1350443729, 1350443206, 1350443170, 1350443115, 1350442484, 1350442452, 1350442407]} final : False mtd_id 4302 list_pids : [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] Looping around the photos to save general results len do output : 1 /22099130. 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, '2727591') ('4302', '22099130', '1350444869', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444847', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444841', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444829', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444555', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444527', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444499', None, None, None, None, None, '2727591') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '22099130', "{'environnement': 22099168, 'papier': 22099169, 'kraft': 22099170, 'plastique': 22099171, 'mal_croppe': 22099172, 'metal': 22099173, 'Carton_brun': 22099174, 'Teint_Dans_La_Masse': 22099175, 'autre_refus': 22099176, 'Carton_gris': 22099177, 'flou': 22099178, 'cartonnette': 22099179}", None, None, None, None, '2727591'), ('4302', '22099130', '1350444869', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444847', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444841', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444829', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444555', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444527', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444499', None, None, None, None, None, '2727591')] time used for this insertion : 0.014412879943847656 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4288058280944824 time spend to save output : 0.014836549758911133 total time spend for step 1 : 1.4436423778533936 step2:final Wed Apr 16 20:22:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (22099130) 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 22099130 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350442484,1350442452,1350442407,1350443206,1350443170,1350443115,1350443812,1350443758,1350443729,1350444195,1350444186,1350444365,1350444359,1350444345,1350444340,1350444555,1350444527,1350444499,1350444869,1350444847,1350444841,1350444829); 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([22099130]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} new output for save of step final : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] map_info['map_portfolio_photo'] : {22099130: [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499, 1350444365, 1350444359, 1350444345, 1350444340, 1350444195, 1350444186, 1350443812, 1350443758, 1350443729, 1350443206, 1350443170, 1350443115, 1350442484, 1350442452, 1350442407]} final : False mtd_id 4302 list_pids : [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] Looping around the photos to save general results len do output : 7 /1350444869.Didn't retrieve data . /1350444847.Didn't retrieve data . /1350444841.Didn't retrieve data . /1350444829.Didn't retrieve data . /1350444555.Didn't retrieve data . /1350444527.Didn't retrieve data . /1350444499.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, '2727591') ('4302', '22099130', '1350444869', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444847', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444841', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444829', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444555', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444527', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444499', None, None, None, None, None, '2727591') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 21 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', '22099130', '1350444869', '0.03219270951567851', None, None, None, None, '2727591'), ('4302', '22099130', '1350444847', '0.03219270951567851', None, None, None, None, '2727591'), ('4302', '22099130', '1350444841', '0.03219270951567851', None, None, None, None, '2727591'), ('4302', '22099130', '1350444829', '0.03219270951567851', None, None, None, None, '2727591'), ('4302', '22099130', '1350444555', '0.03219270951567851', None, None, None, None, '2727591'), ('4302', '22099130', '1350444527', '0.03219270951567851', None, None, None, None, '2727591'), ('4302', '22099130', '1350444499', '0.03219270951567851', None, None, None, None, '2727591')] time used for this insertion : 0.015151739120483398 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06823849678039551 time spend to save output : 0.01554107666015625 total time spend for step 2 : 0.08377957344055176 step3:velours_tree Wed Apr 16 20:22:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {22099130: [{'environnement': 22099168, 'papier': 22099169, 'kraft': 22099170, 'plastique': 22099171, 'mal_croppe': 22099172, 'metal': 22099173, 'Carton_brun': 22099174, 'Teint_Dans_La_Masse': 22099175, 'autre_refus': 22099176, 'Carton_gris': 22099177, 'flou': 22099178, 'cartonnette': 22099179}]} input_args_next_step : {22099130: ()} output_args : {22099130: [{'environnement': 22099168, 'papier': 22099169, 'kraft': 22099170, 'plastique': 22099171, 'mal_croppe': 22099172, 'metal': 22099173, 'Carton_brun': 22099174, 'Teint_Dans_La_Masse': 22099175, 'autre_refus': 22099176, 'Carton_gris': 22099177, 'flou': 22099178, 'cartonnette': 22099179}]} args : 22099130 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 : ({'environnement': 22099168, 'papier': 22099169, 'kraft': 22099170, 'plastique': 22099171, 'mal_croppe': 22099172, 'metal': 22099173, 'Carton_brun': 22099174, 'Teint_Dans_La_Masse': 22099175, 'autre_refus': 22099176, 'Carton_gris': 22099177, 'flou': 22099178, 'cartonnette': 22099179},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22099130) 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([22099130]) 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.3775639533996582 time spend to save output : 6.67572021484375e-05 total time spend for step 3 : 0.37763071060180664 step4:send_mail_cod Wed Apr 16 20:22:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} input_args_next_step : {1350444869: ()} output_args : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} args : 1350444869 depend.output_id : 0 input_args_next_step : {1350444869: ('0.03219270951567851',), 1350444847: ()} output_args : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} args : 1350444847 depend.output_id : 0 input_args_next_step : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ()} output_args : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} args : 1350444841 depend.output_id : 0 input_args_next_step : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ()} output_args : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} args : 1350444829 depend.output_id : 0 input_args_next_step : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ()} output_args : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} args : 1350444555 depend.output_id : 0 input_args_next_step : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ()} output_args : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} args : 1350444527 depend.output_id : 0 input_args_next_step : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ()} output_args : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',)} args : 1350444499 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 : {22099130: [{'environnement': 22099168, 'papier': 22099169, 'kraft': 22099170, 'plastique': 22099171, 'mal_croppe': 22099172, 'metal': 22099173, 'Carton_brun': 22099174, 'Teint_Dans_La_Masse': 22099175, 'autre_refus': 22099176, 'Carton_gris': 22099177, 'flou': 22099178, 'cartonnette': 22099179}]} input_args_next_step : {1350444869: ('0.03219270951567851',), 1350444847: ('0.03219270951567851',), 1350444841: ('0.03219270951567851',), 1350444829: ('0.03219270951567851',), 1350444555: ('0.03219270951567851',), 1350444527: ('0.03219270951567851',), 1350444499: ('0.03219270951567851',), 22099130: ()} output_args : {22099130: [{'environnement': 22099168, 'papier': 22099169, 'kraft': 22099170, 'plastique': 22099171, 'mal_croppe': 22099172, 'metal': 22099173, 'Carton_brun': 22099174, 'Teint_Dans_La_Masse': 22099175, 'autre_refus': 22099176, 'Carton_gris': 22099177, 'flou': 22099178, 'cartonnette': 22099179}]} args : 22099130 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 :8, first value : ('0.03219270951567851',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22099130) 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 (1350444869,1350444847,1350444841,1350444829,1350444555,1350444527,1350444499) Found this number of photos: 7 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350444499 begin to download photo : 1350444555 begin to download photo : 1350444841 begin to download photo : 1350444869 download finish for photo 1350444869 download finish for photo 1350444555 begin to download photo : 1350444829 download finish for photo 1350444499 begin to download photo : 1350444527 download finish for photo 1350444841 begin to download photo : 1350444847 download finish for photo 1350444829 download finish for photo 1350444527 download finish for photo 1350444847 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette220991701744827779/ imagette220991711744827779/ imagette220991721744827779/ imagette220991731744827779/ length of list_filenames : 7 ; length of list_pids : 7 ; length of list_args : 7 results_Auto_P22099130_16-04-2025_20_22_59.pdf 22099170 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=22099170 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220991701744827779 22099171 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=22099171 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220991711744827779 22099172 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=22099172 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220991721744827779 22099173 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=22099173 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220991731744827779 22099176 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=22099176 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350444123: '1744827494_2173766_1350442484_fa06fa99554db260b0e816740fa80a21_rle_crop_3750039347_0.png'} change filename to text .imagette220991761744827779/ imagette220991761744827779/1744827494_2173766_1350442484_fa06fa99554db260b0e816740fa80a21_rle_crop_3750039347_0.png.png imagette220991781744827779/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/446ee5546c0dfa6a7cee493af5c1d0db_16442607.png imagette220991761744827779 22099178 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=22099178 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220991781744827779 22099179 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=22099179 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350444124: '1744827494_2173766_1350442452_be602f17c265d47834f382a391b1e95a_rle_crop_3750039362_0.png', 1350444125: '1744827494_2173766_1350442407_16ed8b648ff05f092e66ded49103f8ae_rle_crop_3750039371_0.png', 1350444126: '1744827494_2173766_1350442407_16ed8b648ff05f092e66ded49103f8ae_rle_crop_3750039374_0.png', 1350444127: '1744827494_2173766_1350442407_16ed8b648ff05f092e66ded49103f8ae_rle_crop_3750039372_0.png', 1350444759: '1744827673_2176735_1350444345_b41df1d9ce5df2843e7e8e297204f1da_rle_crop_3750045191_0.png', 1350445163: '1744827733_2177456_1350443170_dd1f531d484a50e8899c0be580f9ed71_rle_crop_3750046143_0.png', 1350445164: '1744827733_2177456_1350443115_cae5bc4539b13f7b62acb6f50b9f20ca_rle_crop_3750046156_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/c7868114e043df04d4f12db7bebda100_47234737.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/8300527f6fdff9ce71dc1a7b29df6741_83162759.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/77e5c5d554b0645fd202b103d5818523_96534642.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/a0c94d5dd01f96e5548a708c82041613_11092428.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/faf4debc5d968343bf5e15b0abf41e18_9827987.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/666623d694cdf61a469595da3b36b2e3_45690088.png change filename to text .imagette220991791744827779/ imagette220991791744827779/1744827494_2173766_1350442407_16ed8b648ff05f092e66ded49103f8ae_rle_crop_3750039371_0.png.png imagette220991791744827779/1744827733_2177456_1350443170_dd1f531d484a50e8899c0be580f9ed71_rle_crop_3750046143_0.png.png imagette220991791744827779/1744827494_2173766_1350442407_16ed8b648ff05f092e66ded49103f8ae_rle_crop_3750039374_0.png.png imagette220991791744827779/1744827733_2177456_1350443115_cae5bc4539b13f7b62acb6f50b9f20ca_rle_crop_3750046156_0.png.png imagette220991791744827779/1744827494_2173766_1350442452_be602f17c265d47834f382a391b1e95a_rle_crop_3750039362_0.png.png imagette220991791744827779/1744827673_2176735_1350444345_b41df1d9ce5df2843e7e8e297204f1da_rle_crop_3750045191_0.png.png imagette220991791744827779/1744827494_2173766_1350442407_16ed8b648ff05f092e66ded49103f8ae_rle_crop_3750039372_0.png.png imagette220991741744827779/ wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/c2236e7242c6fc8384eed2245b09f1ce_81504939.png imagette220991791744827779 22099174 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=22099174 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220991741744827779 22099175 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=22099175 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350444122: '1744827494_2173766_1350442484_fa06fa99554db260b0e816740fa80a21_rle_crop_3750039355_0.png', 1350444756: '1744827673_2176735_1350444359_4a16abdf94d724a54c248bcfe36dbd14_rle_crop_3750045183_0.png', 1350444757: '1744827673_2176735_1350444345_b41df1d9ce5df2843e7e8e297204f1da_rle_crop_3750045192_0.png', 1350444758: '1744827673_2176735_1350444345_b41df1d9ce5df2843e7e8e297204f1da_rle_crop_3750045194_0.png', 1350445135: '1744827733_2177456_1350443170_dd1f531d484a50e8899c0be580f9ed71_rle_crop_3750046146_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/35798294baba433a35f265ee529f0f9f_73385038.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/7cef63c9c91c3b3745023818fb70d735_59414055.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/3775827bfbe4c23cc6e696199db5cd8b_95502299.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/a9919875d438290c16be0e90925247ec_39589078.png change filename to text .imagette220991751744827779/ imagette220991751744827779/1744827673_2176735_1350444345_b41df1d9ce5df2843e7e8e297204f1da_rle_crop_3750045194_0.png.png imagette220991751744827779/1744827673_2176735_1350444345_b41df1d9ce5df2843e7e8e297204f1da_rle_crop_3750045192_0.png.png imagette220991751744827779/1744827673_2176735_1350444359_4a16abdf94d724a54c248bcfe36dbd14_rle_crop_3750045183_0.png.png imagette220991751744827779/1744827733_2177456_1350443170_dd1f531d484a50e8899c0be580f9ed71_rle_crop_3750046146_0.png.png imagette220991751744827779/1744827494_2173766_1350442484_fa06fa99554db260b0e816740fa80a21_rle_crop_3750039355_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/953699aef4496e2121b61fba8c634090_1785755.png imagette220991751744827779 22099177 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=22099177 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350445150: '1744827733_2177456_1350443170_dd1f531d484a50e8899c0be580f9ed71_rle_crop_3750046145_0.png', 1350445152: '1744827733_2177456_1350443115_cae5bc4539b13f7b62acb6f50b9f20ca_rle_crop_3750046165_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/241b5c43efa04458d395610e5260955c_61826596.png change filename to text .imagette220991771744827779/ imagette220991771744827779/1744827733_2177456_1350443115_cae5bc4539b13f7b62acb6f50b9f20ca_rle_crop_3750046165_0.png.png imagette220991771744827779/1744827733_2177456_1350443170_dd1f531d484a50e8899c0be580f9ed71_rle_crop_3750046145_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/604818e4f1f6e8f79691267d5a5ff1dc_99232926.png imagette220991771744827779 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22099130 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22099181,22099182,22099183,22099184,22099185,22099186,22099187,22099188,22099189,22099190,22099191,22099192?tags=environnement,papier,kraft,plastique,mal_croppe,metal,Carton_brun,Teint_Dans_La_Masse,autre_refus,Carton_gris,flou,cartonnette your option no_mail is active, we will not send the real mail to your client args[1350444869] : ('0.03219270951567851',) no score found for photo 1350444869 We are sending mail with results at report@fotonower.com args[1350444847] : ('0.03219270951567851',) no score found for photo 1350444847 We are sending mail with results at report@fotonower.com args[1350444841] : ('0.03219270951567851',) no score found for photo 1350444841 We are sending mail with results at report@fotonower.com args[1350444829] : ('0.03219270951567851',) no score found for photo 1350444829 We are sending mail with results at report@fotonower.com args[1350444555] : ('0.03219270951567851',) no score found for photo 1350444555 We are sending mail with results at report@fotonower.com args[1350444527] : ('0.03219270951567851',) no score found for photo 1350444527 We are sending mail with results at report@fotonower.com args[1350444499] : ('0.03219270951567851',) no score found for photo 1350444499 We are sending mail with results at report@fotonower.com refus_total : 0.03219270951567851 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22099130 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_P22099130_16-04-2025_20_22_59.pdf results_Auto_P22099130_16-04-2025_20_22_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22099130_16-04-2025_20_22_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','22099130','results_Auto_P22099130_16-04-2025_20_22_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22099130_16-04-2025_20_22_59.pdf','pdf','','0.12','0.03219270951567851') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22099130]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] map_info['map_portfolio_photo'] : {22099130: [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499, 1350444365, 1350444359, 1350444345, 1350444340, 1350444195, 1350444186, 1350443812, 1350443758, 1350443729, 1350443206, 1350443170, 1350443115, 1350442484, 1350442452, 1350442407]} final : False mtd_id 4302 list_pids : [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] 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, '2727591') ('4302', '22099130', '1350444869', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444847', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444841', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444829', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444555', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444527', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444499', None, None, None, None, None, '2727591') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22099130', '1350444869', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444847', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444841', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444829', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444555', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444527', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444499', None, None, None, None, None, '2727591')] time used for this insertion : 0.013645172119140625 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.223039388656616 time spend to save output : 0.013948202133178711 total time spend for step 4 : 2.236987590789795 step5:split_time_score Wed Apr 16 20:23:01 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 : ['22099130'] 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 : [('22099130',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22099130) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350444869: {'path': 'temp/1744827778_3382288_1350444869_8f37b01d418b754d62db34c51e6e0569.jpg', 'extension': 'jpg'}, 1350444555: {'path': 'temp/1744827778_3382288_1350444555_c3ece05bbc43bf42c419e0306cfd77c7.jpg', 'extension': 'jpg'}, 1350444829: {'path': 'temp/1744827778_3382288_1350444829_fdac2abecc61e3fa7b1000bc4e4474b3.jpg', 'extension': 'jpg'}, 1350444499: {'path': 'temp/1744827778_3382288_1350444499_ab7187a7aa767dd2bc100ca71e8a40dd.jpg', 'extension': 'jpg'}, 1350444527: {'path': 'temp/1744827778_3382288_1350444527_b6da092122be1176ab0b5c982429bcf2.jpg', 'extension': 'jpg'}, 1350444841: {'path': 'temp/1744827778_3382288_1350444841_102df69955c88f4bf7a15bc7fccf1424.jpg', 'extension': 'jpg'}, 1350444847: {'path': 'temp/1744827778_3382288_1350444847_449409d12b0f3a3ee0c748b0d0b7e674.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 = 22099130; (('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 = 22099130 group by h (('20', 22),) 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=22099130 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 (22099130) 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 (22099130) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 16042025 22099130 Nombre de photos uploadées : 22 / 23040 (0%) 16042025 22099130 Nombre de photos taguées (types de déchets): 0 / 22 (0%) 16042025 22099130 Nombre de photos taguées (volume) : 0 / 22 (0%) [{'photo_id': 1350442484, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/fa06fa99554db260b0e816740fa80a21.jpg', 'username': None, 'uploaded_at': 1744827367, 'text': 'image_16042025_20_15_15_10136.jpg'}, {'photo_id': 1350442452, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/be602f17c265d47834f382a391b1e95a.jpg', 'username': None, 'uploaded_at': 1744827367, 'text': 'image_16042025_20_15_25_10137.jpg'}, {'photo_id': 1350442407, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/16ed8b648ff05f092e66ded49103f8ae.jpg', 'username': None, 'uploaded_at': 1744827367, 'text': 'image_16042025_20_15_44_9127.jpg'}, {'photo_id': 1350443206, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/16/b24673bc349d265fa3efd3e39644a7b1.jpg', 'username': None, 'uploaded_at': 1744827427, 'text': 'image_16042025_20_15_54_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 8.58306884765625e-06 ?????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0012102127075195312 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22099130, '2025-04-16' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1717339,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.029730558395385742 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= 1717339 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1717339, 'dashboard_run_id': 1727983, 'mtr_portfolio_id': 22097466, 'dashboard_result_id': 9900891, '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_P22097466_16-04-2025_20_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22097468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22097469, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22097470, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22097471, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22097472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22097473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22097474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22097475, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22097476, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22097477, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22097478, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22097479, 'pht': 3726}}"}, {'dashboat_entry_day': 1717339, 'dashboard_run_id': 1727983, 'mtr_portfolio_id': 22098075, 'dashboard_result_id': 9900892, '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_P22098075_16-04-2025_20_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22098117, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22098118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22098119, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22098120, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22098121, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22098122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22098123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22098124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22098125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22098126, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22098127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22098128, 'pht': 3726}}"}, {'dashboat_entry_day': 1717339, 'dashboard_run_id': 1727983, 'mtr_portfolio_id': 22099130, 'dashboard_result_id': 9900893, '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_P22099130_16-04-2025_20_20_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22099168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22099169, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22099170, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22099171, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22099172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22099173, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22099174, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22099175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22099176, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22099177, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22099178, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22099179, '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 = 22097466 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': 2727460, 'mtr_portfolio_id': 22097466, 'created_at': datetime.datetime(2025, 4, 16, 20, 2, 59), 'result': '0.04152570338007091', 'result_long': None, 'result_double': None}] Qualite : 0.04152570338007091 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22097466 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22097466_16-04-2025_20_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22097466 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_P22097466_16-04-2025_20_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22097468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22097469, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22097470, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22097471, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22097472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22097473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22097474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22097475, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22097476, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22097477, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22097478, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22097479, 'pht': 3726}}" where mtr_portfolio_id = 22097466 and dashboard_run_id = 1727983 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`=22097466 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9900891, 0.04152570338007091, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22097466_16-04-2025_20_03_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22097468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22097469, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22097470, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22097471, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22097472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22097473, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22097474, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22097475, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22097476, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22097477, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22097478, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22097479, '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 = 22098075 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': 2727542, 'mtr_portfolio_id': 22098075, 'created_at': datetime.datetime(2025, 4, 16, 20, 16, 58), 'result': '0.03756558825373574', 'result_long': None, 'result_double': None}] Qualite : 0.03756558825373574 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22098075 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22098075_16-04-2025_20_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22098075 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_P22098075_16-04-2025_20_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22098117, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22098118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22098119, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22098120, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22098121, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22098122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22098123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22098124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22098125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22098126, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22098127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22098128, 'pht': 3726}}" where mtr_portfolio_id = 22098075 and dashboard_run_id = 1727983 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`=22098075 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9900892, 0.03756558825373574, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22098075_16-04-2025_20_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22098117, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22098118, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22098119, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22098120, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22098121, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22098122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22098123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22098124, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22098125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22098126, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22098127, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22098128, '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 = 22099130 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': 2727591, 'mtr_portfolio_id': 22099130, 'created_at': datetime.datetime(2025, 4, 16, 20, 22, 58), 'result': '0.03219270951567851', 'result_long': None, 'result_double': None}] Qualite : 0.03219270951567851 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22099130 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22099130_16-04-2025_20_22_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22099130 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_P22099130_16-04-2025_20_22_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22099168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22099169, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22099170, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22099171, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22099172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22099173, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22099174, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22099175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22099176, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22099177, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22099178, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22099179, 'pht': 3726}}" where mtr_portfolio_id = 22099130 and dashboard_run_id = 1727983 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`=22099130 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9900893, 0.03219270951567851, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22099130_16-04-2025_20_22_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22099168, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22099169, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22099170, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22099171, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22099172, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22099173, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22099174, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22099175, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22099176, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22099177, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22099178, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22099179, '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 (22097466,22098075,22099130) result : ((1350424115,), (1350427485,), (1350427561,), (1350427650,), (1350427723,), (1350427794,), (1350427844,), (1350428372,), (1350428444,), (1350429546,), (1350429606,), (1350429633,), (1350430263,), (1350430380,), (1350430470,), (1350430562,), (1350430758,), (1350430817,), (1350431124,), (1350431155,), (1350431205,), (1350431636,), (1350431665,), (1350431696,), (1350431725,), (1350431753,), (1350432152,), (1350432178,), (1350432205,), (1350432234,), (1350432268,), (1350432401,), (1350432406,), (1350433030,), (1350433037,), (1350433045,), (1350433331,), (1350433292,), (1350433301,), (1350433663,), (1350433700,), (1350433730,), (1350433747,), (1350433749,), (1350433835,), (1350433869,), (1350433880,), (1350433883,), (1350433887,), (1350434098,), (1350434126,), (1350434155,), (1350434770,), (1350434804,), (1350434888,), (1350435695,), (1350435882,), (1350436209,), (1350436271,), (1350436351,), (1350437079,), (1350437242,), (1350437287,), (1350437389,), (1350437486,), (1350437584,), (1350438235,), (1350438287,), (1350438337,), (1350438393,), (1350438446,), (1350439130,), (1350439160,), (1350439165,), (1350439190,), (1350439588,), (1350439661,), (1350439706,), (1350439752,), (1350439814,), (1350439852,), (1350440503,), (1350440546,), (1350440561,), (1350440571,), (1350440585,), (1350440660,), (1350440664,), (1350440668,), (1350441111,), (1350441164,), (1350441547,), (1350441592,), (1350441624,), (1350441642,), (1350441899,), (1350441929,), (1350441955,), (1350441967,), (1350442516,), (1350442407,), (1350442452,), (1350442484,), (1350443115,), (1350443170,), (1350443206,), (1350443729,), (1350443758,), (1350443812,), (1350444186,), (1350444195,), (1350444340,), (1350444345,), (1350444359,), (1350444365,), (1350444499,), (1350444527,), (1350444555,), (1350444829,), (1350444841,), (1350444847,), (1350444869,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'16042025': {'nb_upload': 22, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22099130]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] map_info['map_portfolio_photo'] : {22099130: [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499, 1350444365, 1350444359, 1350444345, 1350444340, 1350444195, 1350444186, 1350443812, 1350443758, 1350443729, 1350443206, 1350443170, 1350443115, 1350442484, 1350442452, 1350442407]} final : True mtd_id 4302 list_pids : [1350444869, 1350444847, 1350444841, 1350444829, 1350444555, 1350444527, 1350444499] Looping around the photos to save general results len do output : 1 /22099130Didn'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, '2727591') ('4302', '22099130', '1350444869', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444847', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444841', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444829', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444555', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444527', None, None, None, None, None, '2727591') ('4302', None, None, None, None, None, None, None, '2727591') ('4302', '22099130', '1350444499', None, None, None, None, None, '2727591') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '22099130', 'None', None, None, None, None, '2727591'), ('4302', '22099130', '1350444869', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444847', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444841', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444829', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444555', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444527', None, None, None, None, None, '2727591'), ('4302', '22099130', '1350444499', None, None, None, None, None, '2727591')] time used for this insertion : 0.01447606086730957 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.30136919021606445 time spend to save output : 0.014734745025634766 total time spend for step 5 : 0.3161039352416992 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 (2727591) 2.06user 2.52system 0:06.00elapsed 76%CPU (0avgtext+0avgdata 164332maxresident)k 16448inputs+6632outputs (185major+65542minor)pagefaults 0swaps