python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4302 -v ' -s datou_current_4302 -M 0 -S 0 -U 95,95,120 import MySQLdb succeeded Import error (python version) ['/Users/moilerat/Documents/Fotonower/install/caffe/distribute/python', '/home/admin/workarea/git/Velours/python/prod', '/home/admin/workarea/install/caffe_cuda8_python3/python', '/home/admin/workarea/install/darknet', '/home/admin/workarea/git/Velours/python', '/home/admin/workarea/install/caffe_frcnn_python3/py-faster-rcnn/caffe-fast-rcnn/python', '/home/admin/mtr/.credentials', '/home/admin/workarea/install/caffe/python', '/home/admin/workarea/install/caffe_frcnn/py-faster-rcnn/tools', '/home/admin/workarea/git/fotonowerpip', '/home/admin/workarea/install/segment-anything', '/home/admin/workarea/git/pyfvs', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/admin/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Namespace(auto=False, cert_args='/home/fotonower/https/cert.pem', contextDataFile='', custom_size=0, database='', datou_id='4302', datou_id_excluded='', fifo=False, host='', is_cpu_mode=False, job='batch_current', json_args='', key_args='/home/fotonower/https/vision.fotonower.com.key', limit=1000, list_photo_ids='', local='', mtr_current_id=0, mtr_portfolio_ids='', nb_thread=1, no_current=False, offset=0, only_client=False, output_file='', password='', port=5100, rand=0, save=2, use_client=False, user_id=440, username='', verbose=True) process id : 1163986 load datou : 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 ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2722295) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2722295) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041770 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2722295'] with mtr_portfolio_ids : ['22041770'] and first list_photo_ids : [] new path : /proc/1163986/ Name: python3 Umask: 0002 State: R (running) Tgid: 1163986 Ngid: 0 Pid: 1163986 PPid: 1163984 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1163986 NSpid: 1163986 NSpgid: 1160089 NSsid: 1160089 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97528 kB VmRSS: 97528 kB RssAnon: 59764 kB RssFile: 37764 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 620 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 77 nonvoluntary_ctxt_switches: 170 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1163986', 'Ngid': '0', 'Pid': '1163986', 'PPid': '1163984', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1163986', 'NSpid': '1163986', 'NSpgid': '1160089', 'NSsid': '1160089', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97528 kB', 'VmRSS': '97528 kB', 'RssAnon': '59764 kB', 'RssFile': '37764 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '620 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '77', 'nonvoluntary_ctxt_switches': '170'} ('datou_batch_current', '1163986', '1106928', '0', '1106928', '865676', '97528', b'', 'marlene', '2722295') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (22041770) and hide_status = 0 ) AND ph.photo_id not in (SELECT mtr_photo_id from MTRPhoto.mtr_datou_result_search where mtr_current_id in (2722295 ) ) ORDER BY ph.photo_id DESC LIMIT 0, 200 We have 1 , {} SELECT mtr_photo_id, mtr_portfolio_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (22041770) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1349912319, 'portfolio_id': 22041770}, {'photo_id': 1349912309, 'portfolio_id': 22041770}, {'photo_id': 1349912307, 'portfolio_id': 22041770}, {'photo_id': 1349912270, 'portfolio_id': 22041770}, {'photo_id': 1349912236, 'portfolio_id': 22041770}, {'photo_id': 1349912177, 'portfolio_id': 22041770}, {'photo_id': 1349912127, 'portfolio_id': 22041770}, {'photo_id': 1349912026, 'portfolio_id': 22041770}, {'photo_id': 1349911950, 'portfolio_id': 22041770}, {'photo_id': 1349911883, 'portfolio_id': 22041770}, {'photo_id': 1349911828, 'portfolio_id': 22041770}, {'photo_id': 1349911789, 'portfolio_id': 22041770}, {'photo_id': 1349911691, 'portfolio_id': 22041770}, {'photo_id': 1349911655, 'portfolio_id': 22041770}, {'photo_id': 1349911616, 'portfolio_id': 22041770}, {'photo_id': 1349911612, 'portfolio_id': 22041770}, {'photo_id': 1349911600, 'portfolio_id': 22041770}, {'photo_id': 1349911584, 'portfolio_id': 22041770}, {'photo_id': 1349911455, 'portfolio_id': 22041770}] map_portfolio_id_photo_id: {22041770: [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026, 1349911950, 1349911883, 1349911828, 1349911789, 1349911691, 1349911655, 1349911616, 1349911612, 1349911600, 1349911584, 1349911455]} ##### Call download_photos : nb_thread : 1 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos ##### After load_data_input time to download the photos : 0.046178579330444336 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Apr 3 23:36:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22041770) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} beginning of datou step ventilate_hashtags_in_portfolio : To implement ! To do loadFromThcl(), then load ParamDescType : thcl2725 get_desc_type_from_thcl : type of cat SELECT id, mtr_user_id, name, pb_hashtag_id, hashtag_id_list, button_legend_list, portfolio_id_lists, photo_hashtag_type, photo_desc_type, svm_limit, limit_tagging, is_public, live, created_at, updated_at, type_classification FROM MTRDatou.classification_theme WHERE `id` IN (2725) thcls : [{'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'}] thcl {'id': 2725, 'mtr_user_id': 31, 'name': 'learn_qualipapia_rle_210302_2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Carton_brun,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement,kraft,metal,papier,plastique', 'svm_portfolios_learning': '3460440,3460441,3460446,3460434,3460439,3467416,3460442,3460443,3486028,3460445', 'photo_hashtag_type': 3410, 'photo_desc_type': 5186, 'type_classification': 'caffe', 'hashtag_id_list': '2107753024,2107753020,2107752385,2107752406,702398920,493012381,493202403,492628673,492668766,492725882'} Update svm_hashtag_type_desc : 5186 remove imagettes from duplicated photo Iterating over portfolio : 22041770 get user id for portfolio 22041770 get sub ptf for main ptf 22041770, type 3726 and hashtags ['mal_croppe', 'flou', 'cartonnette', 'Carton_gris', 'Teint_Dans_La_Masse', 'metal', 'Carton_brun', 'papier', 'plastique', 'autre_refus', 'environnement', 'kraft'] 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`=22041770 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','metal','Carton_brun','papier','plastique','autre_refus','environnement','kraft')) 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`=22041770 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','metal','Carton_brun','papier','plastique','autre_refus','environnement','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 22041770, 'sub_port_id': 22041789, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533670, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22041770, 'sub_port_id': 22041790, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533671, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'environnement': {'main_port_id': 22041770, 'sub_port_id': 22041792, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533672, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'autre_refus': {'main_port_id': 22041770, 'sub_port_id': 22041793, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533673, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'Carton_brun': {'main_port_id': 22041770, 'sub_port_id': 22041794, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533674, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'metal': {'main_port_id': 22041770, 'sub_port_id': 22041795, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533675, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'mal_croppe': {'main_port_id': 22041770, 'sub_port_id': 22041796, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533676, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'papier': {'main_port_id': 22041770, 'sub_port_id': 22041797, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533677, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'plastique': {'main_port_id': 22041770, 'sub_port_id': 22041798, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533678, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'flou': {'main_port_id': 22041770, 'sub_port_id': 22041799, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533679, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'Carton_gris': {'main_port_id': 22041770, 'sub_port_id': 22041800, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533680, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}, 'cartonnette': {'main_port_id': 22041770, 'sub_port_id': 22041801, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533681, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 34, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041789 , 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=22041770 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 (22041789) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041790 , 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=22041770 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 (22041790) result : ((1349912383,), (1349912515,), (1349912517,), (1349912520,), (1349912521,), (1349912522,), (1349912523,), (1349912524,), (1349912525,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041792 , 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=22041770 AND mpp.mtr_photo_id=chi.photo_id AND chi.id=csp.crop_hashtag_id AND chi.score>0.5 AND chi.type=3726 AND chi.hashtag_id=h.hashtag_id AND h.hashtag='environnement' GROUP BY csp.crop_hashtag_id, csp.created_at order by csp.created_at desc) as a group by crop_hashtag_id; SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041792) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041793 , 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=22041770 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 (22041793) result : ((1349912395,), (1349912535,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041794 , 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=22041770 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 (22041794) result : ((1349912442,), (1349912445,), (1349912549,), (1349912550,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041795 , 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=22041770 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 (22041795) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041796 , 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=22041770 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 (22041796) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041797 , 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=22041770 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 (22041797) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041798 , 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=22041770 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 (22041798) result : ((1349912547,), (1349912577,), (1349912578,), (1349912579,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041799 , 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=22041770 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 (22041799) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041800 , 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=22041770 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 (22041800) result : ((1349912407,), (1349912537,), (1349912538,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22041801 , 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=22041770 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 (22041801) result : ((1349912425,), (1349912428,), (1349912546,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22041770) result : ((1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) 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 (1349911600) and cspi.crop_hashtag_id = chi.id; 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`=22041770 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','metal','Carton_brun','papier','plastique','autre_refus','environnement','kraft')) 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`=22041770 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','flou','cartonnette','Carton_gris','Teint_Dans_La_Masse','metal','Carton_brun','papier','plastique','autre_refus','environnement','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 22041770, 'sub_port_id': 22041802, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533682, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 22041770, 'sub_port_id': 22041803, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533683, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'environnement': {'main_port_id': 22041770, 'sub_port_id': 22041804, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533684, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'autre_refus': {'main_port_id': 22041770, 'sub_port_id': 22041805, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533685, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'Carton_brun': {'main_port_id': 22041770, 'sub_port_id': 22041806, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533686, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'metal': {'main_port_id': 22041770, 'sub_port_id': 22041807, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533687, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'mal_croppe': {'main_port_id': 22041770, 'sub_port_id': 22041808, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533688, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'papier': {'main_port_id': 22041770, 'sub_port_id': 22041809, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533689, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'plastique': {'main_port_id': 22041770, 'sub_port_id': 22041810, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533690, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'flou': {'main_port_id': 22041770, 'sub_port_id': 22041811, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533691, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'Carton_gris': {'main_port_id': 22041770, 'sub_port_id': 22041812, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533692, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}, 'cartonnette': {'main_port_id': 22041770, 'sub_port_id': 22041813, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14533693, 'last_updated_at': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_desc': datetime.datetime(2025, 4, 3, 23, 35), 'last_updated_at_asc': datetime.datetime(2025, 4, 3, 23, 35)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041802,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041789 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041803,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041790 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041804,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041792 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041805,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041793 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041806,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041794 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041807,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041795 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041808,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041796 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041809,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041797 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041810,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041798 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041811,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041799 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041812,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041800 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22041813,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22041801 lien utilise dans velours : https://www.fotonower.com/velours/22041802,22041803,22041804,22041805,22041806,22041807,22041808,22041809,22041810,22041811,22041812,22041813?tags=kraft,Teint_Dans_La_Masse,environnement,autre_refus,Carton_brun,metal,mal_croppe,papier,plastique,flou,Carton_gris,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22041770]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] map_info['map_portfolio_photo'] : {22041770: [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026, 1349911950, 1349911883, 1349911828, 1349911789, 1349911691, 1349911655, 1349911616, 1349911612, 1349911600, 1349911584, 1349911455]} final : False mtd_id 4302 list_pids : [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] Looping around the photos to save general results len do output : 1 /22041770. 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, '2722295') ('4302', '22041770', '1349912319', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912309', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912307', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912270', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912236', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912177', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912127', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912026', None, None, None, None, None, '2722295') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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, '22041770', "{'kraft': 22041789, 'Teint_Dans_La_Masse': 22041790, 'environnement': 22041792, 'autre_refus': 22041793, 'Carton_brun': 22041794, 'metal': 22041795, 'mal_croppe': 22041796, 'papier': 22041797, 'plastique': 22041798, 'flou': 22041799, 'Carton_gris': 22041800, 'cartonnette': 22041801}", None, None, None, None, '2722295'), ('4302', '22041770', '1349912319', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912309', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912307', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912270', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912236', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912177', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912127', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912026', None, None, None, None, None, '2722295')] time used for this insertion : 0.04368090629577637 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.3260016441345215 time spend to save output : 0.04408836364746094 total time spend for step 1 : 3.3700900077819824 step2:final Thu Apr 3 23:37:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (22041770) 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 22041770 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349911455,1349911691,1349911655,1349911616,1349911612,1349911600,1349911584,1349911950,1349911883,1349911828,1349911789,1349912270,1349912236,1349912177,1349912127,1349912026,1349912319,1349912309,1349912307); 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([22041770]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} new output for save of step final : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] map_info['map_portfolio_photo'] : {22041770: [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026, 1349911950, 1349911883, 1349911828, 1349911789, 1349911691, 1349911655, 1349911616, 1349911612, 1349911600, 1349911584, 1349911455]} final : False mtd_id 4302 list_pids : [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] Looping around the photos to save general results len do output : 8 /1349912319.Didn't retrieve data . /1349912309.Didn't retrieve data . /1349912307.Didn't retrieve data . /1349912270.Didn't retrieve data . /1349912236.Didn't retrieve data . /1349912177.Didn't retrieve data . /1349912127.Didn't retrieve data . /1349912026.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, '2722295') ('4302', '22041770', '1349912319', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912309', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912307', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912270', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912236', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912177', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912127', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912026', None, None, None, None, None, '2722295') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 24 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', '22041770', '1349912319', '0.04933216462453647', None, None, None, None, '2722295'), ('4302', '22041770', '1349912309', '0.04933216462453647', None, None, None, None, '2722295'), ('4302', '22041770', '1349912307', '0.04933216462453647', None, None, None, None, '2722295'), ('4302', '22041770', '1349912270', '0.04933216462453647', None, None, None, None, '2722295'), ('4302', '22041770', '1349912236', '0.04933216462453647', None, None, None, None, '2722295'), ('4302', '22041770', '1349912177', '0.04933216462453647', None, None, None, None, '2722295'), ('4302', '22041770', '1349912127', '0.04933216462453647', None, None, None, None, '2722295'), ('4302', '22041770', '1349912026', '0.04933216462453647', None, None, None, None, '2722295')] time used for this insertion : 0.04098343849182129 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2805056571960449 time spend to save output : 0.04154229164123535 total time spend for step 2 : 0.3220479488372803 step3:velours_tree Thu Apr 3 23:37:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22041770: [{'kraft': 22041789, 'Teint_Dans_La_Masse': 22041790, 'environnement': 22041792, 'autre_refus': 22041793, 'Carton_brun': 22041794, 'metal': 22041795, 'mal_croppe': 22041796, 'papier': 22041797, 'plastique': 22041798, 'flou': 22041799, 'Carton_gris': 22041800, 'cartonnette': 22041801}]} input_args_next_step : {22041770: ()} output_args : {22041770: [{'kraft': 22041789, 'Teint_Dans_La_Masse': 22041790, 'environnement': 22041792, 'autre_refus': 22041793, 'Carton_brun': 22041794, 'metal': 22041795, 'mal_croppe': 22041796, 'papier': 22041797, 'plastique': 22041798, 'flou': 22041799, 'Carton_gris': 22041800, 'cartonnette': 22041801}]} args : 22041770 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 : ({'kraft': 22041789, 'Teint_Dans_La_Masse': 22041790, 'environnement': 22041792, 'autre_refus': 22041793, 'Carton_brun': 22041794, 'metal': 22041795, 'mal_croppe': 22041796, 'papier': 22041797, 'plastique': 22041798, 'flou': 22041799, 'Carton_gris': 22041800, 'cartonnette': 22041801},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22041770) 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([22041770]) 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.37629246711730957 time spend to save output : 0.00011038780212402344 total time spend for step 3 : 0.3764028549194336 step4:send_mail_cod Thu Apr 3 23:37:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} input_args_next_step : {1349912319: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912319 depend.output_id : 0 input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912309 depend.output_id : 0 input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912307 depend.output_id : 0 input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912270 depend.output_id : 0 input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912236 depend.output_id : 0 input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912177 depend.output_id : 0 input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912127 depend.output_id : 0 input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ()} output_args : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',)} args : 1349912026 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 : {22041770: [{'kraft': 22041789, 'Teint_Dans_La_Masse': 22041790, 'environnement': 22041792, 'autre_refus': 22041793, 'Carton_brun': 22041794, 'metal': 22041795, 'mal_croppe': 22041796, 'papier': 22041797, 'plastique': 22041798, 'flou': 22041799, 'Carton_gris': 22041800, 'cartonnette': 22041801}]} input_args_next_step : {1349912319: ('0.04933216462453647',), 1349912309: ('0.04933216462453647',), 1349912307: ('0.04933216462453647',), 1349912270: ('0.04933216462453647',), 1349912236: ('0.04933216462453647',), 1349912177: ('0.04933216462453647',), 1349912127: ('0.04933216462453647',), 1349912026: ('0.04933216462453647',), 22041770: ()} output_args : {22041770: [{'kraft': 22041789, 'Teint_Dans_La_Masse': 22041790, 'environnement': 22041792, 'autre_refus': 22041793, 'Carton_brun': 22041794, 'metal': 22041795, 'mal_croppe': 22041796, 'papier': 22041797, 'plastique': 22041798, 'flou': 22041799, 'Carton_gris': 22041800, 'cartonnette': 22041801}]} args : 22041770 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 :9, first value : ('0.04933216462453647',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22041770) 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 (1349912319,1349912309,1349912307,1349912270,1349912236,1349912177,1349912127,1349912026) Found this number of photos: 8 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349912026 begin to download photo : 1349912177 begin to download photo : 1349912270 begin to download photo : 1349912309 download finish for photo 1349912026 begin to download photo : 1349912127 download finish for photo 1349912270 begin to download photo : 1349912307 download finish for photo 1349912309 begin to download photo : 1349912319 download finish for photo 1349912177 begin to download photo : 1349912236 download finish for photo 1349912307 download finish for photo 1349912319 download finish for photo 1349912236 download finish for photo 1349912127 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette220417891743716223/ length of list_filenames : 8 ; length of list_pids : 8 ; length of list_args : 8 results_Auto_P22041770_03-04-2025_23_37_03.pdf 22041789 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=22041789 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220417891743716223 22041793 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=22041793 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349912395: '1743716133_1163406_1349911789_20561ee788465e96c244bd97fa89b5b4_rle_crop_3746935437_0.png', 1349912535: '1743716134_2702322_1349911950_24bc21dbfef318e29db3e02e03047183_rle_crop_3746935522_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/e6ee4c13a3b8034b94db94386068011f_84950220.png change filename to text .imagette220417931743716223/ imagette220417931743716223/1743716133_1163406_1349911789_20561ee788465e96c244bd97fa89b5b4_rle_crop_3746935437_0.png.png imagette220417931743716223/1743716134_2702322_1349911950_24bc21dbfef318e29db3e02e03047183_rle_crop_3746935522_0.png.png imagette220417951743716224/ imagette220417961743716224/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/780f5908df211dc7002ae826d45073c3_87918359.png imagette220417931743716223 22041795 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=22041795 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220417951743716224 22041796 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=22041796 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220417961743716224 22041798 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=22041798 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349912547: '1743716151_2702453_1349911691_6cb1320ff181f77129496fc3fc9af18a_rle_crop_3746935703_0.png', 1349912577: '1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935576_0.png', 1349912578: '1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935581_0.png', 1349912579: '1743716134_2702322_1349911612_53696e7354aed7f41dd9902de4f342de_rle_crop_3746935619_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/9a5eb2f8005eacad5053b54f1de619cb_2921711.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/5336fe9ad8eed4c666e8b7a56a7fbe18_31643939.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/1be585ba1a1aa7250e8366718d347d81_57433390.png change filename to text .imagette220417981743716224/ imagette220417981743716224/1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935576_0.png.png imagette220417981743716224/1743716151_2702453_1349911691_6cb1320ff181f77129496fc3fc9af18a_rle_crop_3746935703_0.png.png imagette220417981743716224/1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935581_0.png.png imagette220417981743716224/1743716134_2702322_1349911612_53696e7354aed7f41dd9902de4f342de_rle_crop_3746935619_0.png.png imagette220417991743716224/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/6f118ad7f7820d3d3db94f4a8c1bf66e_1114353.png imagette220417981743716224 22041799 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=22041799 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220417991743716224 22041801 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=22041801 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349912425: '1743716133_1163406_1349911883_d708493e7e636735cd3a72be4e2d71bb_rle_crop_3746935410_0.png', 1349912428: '1743716133_1163406_1349911828_a227b3203ffa245c122037b1382b5944_rle_crop_3746935422_0.png', 1349912546: '1743716134_2702322_1349911584_580a673393836343748f5841d5ecb3ca_rle_crop_3746935721_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/ebc82a55f0ef1f88b4ecf1578baafc98_23603160.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/cb9bdd039daac2fa3f95edd2d736554d_11821850.png change filename to text .imagette220418011743716224/ imagette220418011743716224/1743716133_1163406_1349911883_d708493e7e636735cd3a72be4e2d71bb_rle_crop_3746935410_0.png.png imagette220418011743716224/1743716133_1163406_1349911828_a227b3203ffa245c122037b1382b5944_rle_crop_3746935422_0.png.png imagette220418011743716224/1743716134_2702322_1349911584_580a673393836343748f5841d5ecb3ca_rle_crop_3746935721_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/b191b721a19acb005c82012a8f140305_15925473.png imagette220418011743716224 22041790 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=22041790 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349912383: '1743716133_1163406_1349911789_20561ee788465e96c244bd97fa89b5b4_rle_crop_3746935447_0.png', 1349912515: '1743716151_2702453_1349911455_d56bb78ada7822811557d26b03f00917_rle_crop_3746935733_0.png', 1349912517: '1743716134_2702322_1349911950_24bc21dbfef318e29db3e02e03047183_rle_crop_3746935526_0.png', 1349912520: '1743716134_2702322_1349911950_24bc21dbfef318e29db3e02e03047183_rle_crop_3746935525_0.png', 1349912521: '1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935583_0.png', 1349912522: '1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935582_0.png', 1349912523: '1743716134_2702322_1349911600_f79ef02a050d6bec37657ef7088441f1_rle_crop_3746935692_0.png', 1349912524: '1743716134_2702322_1349911584_580a673393836343748f5841d5ecb3ca_rle_crop_3746935722_0.png', 1349912525: '1743716134_2702322_1349911584_580a673393836343748f5841d5ecb3ca_rle_crop_3746935719_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/cec4f1892b2d7c1e539724b5ca5d8ba7_52831969.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/a85da5e0ba43076e9a9975438b4b7c7f_7348605.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/178acc586acc361334befc75cc523b61_76689341.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/16061d221c86c987882f6e10c20842bd_10965183.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/96f6ab8719452a24eb2383ff69c3ca60_1096241.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/21b2cabc6352aefecdc5a0329220b013_99566047.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/4df2fff590aead92cea7f5449b75e85b_28176668.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/5826da298020418d2b994ee85b07c123_49659167.png change filename to text .imagette220417901743716224/ imagette220417901743716224/1743716134_2702322_1349911950_24bc21dbfef318e29db3e02e03047183_rle_crop_3746935526_0.png.png imagette220417901743716224/1743716134_2702322_1349911584_580a673393836343748f5841d5ecb3ca_rle_crop_3746935722_0.png.png imagette220417901743716224/1743716134_2702322_1349911950_24bc21dbfef318e29db3e02e03047183_rle_crop_3746935525_0.png.png imagette220417901743716224/1743716151_2702453_1349911455_d56bb78ada7822811557d26b03f00917_rle_crop_3746935733_0.png.png imagette220417901743716224/1743716133_1163406_1349911789_20561ee788465e96c244bd97fa89b5b4_rle_crop_3746935447_0.png.png imagette220417901743716224/1743716134_2702322_1349911584_580a673393836343748f5841d5ecb3ca_rle_crop_3746935719_0.png.png imagette220417901743716224/1743716134_2702322_1349911600_f79ef02a050d6bec37657ef7088441f1_rle_crop_3746935692_0.png.png imagette220417901743716224/1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935582_0.png.png imagette220417901743716224/1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935583_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/7bbe3cc4d5df09027af3f76a3cdae4a1_44469205.png imagette220417901743716224 22041794 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=22041794 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349912442: '1743716133_1163406_1349911883_d708493e7e636735cd3a72be4e2d71bb_rle_crop_3746935407_0.png', 1349912445: '1743716133_1163406_1349911789_20561ee788465e96c244bd97fa89b5b4_rle_crop_3746935439_0.png', 1349912549: '1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935580_0.png', 1349912550: '1743716134_2702322_1349911612_53696e7354aed7f41dd9902de4f342de_rle_crop_3746935610_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/e6b333ea2ff8857f271f154f9268d37b_88382724.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/f15dbb2ef63f1bb783bec65416bdd974_85003171.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/ab773ca0044aaa336c71274c0aaa91df_51708896.png change filename to text .imagette220417941743716225/ imagette220417941743716225/1743716133_1163406_1349911789_20561ee788465e96c244bd97fa89b5b4_rle_crop_3746935439_0.png.png imagette220417941743716225/1743716134_2702322_1349911612_53696e7354aed7f41dd9902de4f342de_rle_crop_3746935610_0.png.png imagette220417941743716225/1743716134_2702322_1349911655_359190a391c78cd45e7ce04e78f52a01_rle_crop_3746935580_0.png.png imagette220417941743716225/1743716133_1163406_1349911883_d708493e7e636735cd3a72be4e2d71bb_rle_crop_3746935407_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/b564a43a7041b49e948df2865cbfba63_38186887.png imagette220417941743716225 22041800 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=22041800 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349912407: '1743716133_1163406_1349911883_d708493e7e636735cd3a72be4e2d71bb_rle_crop_3746935406_0.png', 1349912537: '1743716151_2702453_1349911455_d56bb78ada7822811557d26b03f00917_rle_crop_3746935732_0.png', 1349912538: '1743716151_2702453_1349911455_d56bb78ada7822811557d26b03f00917_rle_crop_3746935739_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/da7e789ed5c9c59e2f3c65f6a0d18622_74217892.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/23add1682368bfa4f1c9cab46675b0c9_49739044.png change filename to text .imagette220418001743716225/ imagette220418001743716225/1743716151_2702453_1349911455_d56bb78ada7822811557d26b03f00917_rle_crop_3746935739_0.png.png imagette220418001743716225/1743716133_1163406_1349911883_d708493e7e636735cd3a72be4e2d71bb_rle_crop_3746935406_0.png.png imagette220418001743716225/1743716151_2702453_1349911455_d56bb78ada7822811557d26b03f00917_rle_crop_3746935732_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/af967ec648251bd01ed4271ad33c9eb6_66981927.png imagette220418001743716225 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22041770 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22041802,22041803,22041804,22041805,22041806,22041807,22041808,22041809,22041810,22041811,22041812,22041813?tags=kraft,Teint_Dans_La_Masse,environnement,autre_refus,Carton_brun,metal,mal_croppe,papier,plastique,flou,Carton_gris,cartonnette your option no_mail is active, we will not send the real mail to your client args[1349912319] : ('0.04933216462453647',) no score found for photo 1349912319 We are sending mail with results at report@fotonower.com args[1349912309] : ('0.04933216462453647',) no score found for photo 1349912309 We are sending mail with results at report@fotonower.com args[1349912307] : ('0.04933216462453647',) no score found for photo 1349912307 We are sending mail with results at report@fotonower.com args[1349912270] : ('0.04933216462453647',) no score found for photo 1349912270 We are sending mail with results at report@fotonower.com args[1349912236] : ('0.04933216462453647',) no score found for photo 1349912236 We are sending mail with results at report@fotonower.com args[1349912177] : ('0.04933216462453647',) no score found for photo 1349912177 We are sending mail with results at report@fotonower.com args[1349912127] : ('0.04933216462453647',) no score found for photo 1349912127 We are sending mail with results at report@fotonower.com args[1349912026] : ('0.04933216462453647',) no score found for photo 1349912026 We are sending mail with results at report@fotonower.com refus_total : 0.04933216462453647 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=22041770 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_P22041770_03-04-2025_23_37_03.pdf results_Auto_P22041770_03-04-2025_23_37_03.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041770_03-04-2025_23_37_03.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','22041770','results_Auto_P22041770_03-04-2025_23_37_03.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041770_03-04-2025_23_37_03.pdf','pdf','','0.16','0.04933216462453647') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22041770]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] map_info['map_portfolio_photo'] : {22041770: [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026, 1349911950, 1349911883, 1349911828, 1349911789, 1349911691, 1349911655, 1349911616, 1349911612, 1349911600, 1349911584, 1349911455]} final : False mtd_id 4302 list_pids : [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] 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, '2722295') ('4302', '22041770', '1349912319', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912309', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912307', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912270', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912236', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912177', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912127', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912026', None, None, None, None, None, '2722295') 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', '22041770', '1349912319', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912309', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912307', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912270', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912236', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912177', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912127', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912026', None, None, None, None, None, '2722295')] time used for this insertion : 0.040920257568359375 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.768646717071533 time spend to save output : 0.041214942932128906 total time spend for step 4 : 3.809861660003662 step5:split_time_score Thu Apr 3 23:37:07 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22041770'] 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 : [('22041770',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22041770) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349912270: {'path': 'temp/1743716223_1163986_1349912270_c00324f675169bd3797c1b0cda2fe292.jpg', 'extension': 'jpg'}, 1349912307: {'path': 'temp/1743716223_1163986_1349912307_b7284fc5d947d7cfa515948904404adf.jpg', 'extension': 'jpg'}, 1349912309: {'path': 'temp/1743716223_1163986_1349912309_07e632dd160e6da8e855ed5dc9dd3297.jpg', 'extension': 'jpg'}, 1349912319: {'path': 'temp/1743716223_1163986_1349912319_2e2b0ae97cd12c2d9f798cbf6529f223.jpg', 'extension': 'jpg'}, 1349912177: {'path': 'temp/1743716223_1163986_1349912177_a049aa70ce3ab6098a21bb8295c2458d.jpg', 'extension': 'jpg'}, 1349912236: {'path': 'temp/1743716223_1163986_1349912236_052fe8bc07c48c74c012403a03bd1058.jpg', 'extension': 'jpg'}, 1349912026: {'path': 'temp/1743716223_1163986_1349912026_9726db09950106f446e9472d485ce451.jpg', 'extension': 'jpg'}, 1349912127: {'path': 'temp/1743716223_1163986_1349912127_35e8bda905cfe8b369a5c536c956adfa.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 = 22041770; (('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 = 22041770 group by h (('23', 19),) 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=22041770 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 (22041770) 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 (22041770) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 03042025 22041770 Nombre de photos uploadées : 19 / 23040 (0%) 03042025 22041770 Nombre de photos taguées (types de déchets): 0 / 19 (0%) 03042025 22041770 Nombre de photos taguées (volume) : 0 / 19 (0%) [{'photo_id': 1349911455, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/d56bb78ada7822811557d26b03f00917.jpg', 'username': None, 'uploaded_at': 1743715868, 'text': 'image_03042025_23_30_03_9143.jpg'}, {'photo_id': 1349911691, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/6cb1320ff181f77129496fc3fc9af18a.jpg', 'username': None, 'uploaded_at': 1743715928, 'text': 'image_03042025_23_30_14_10142.jpg'}, {'photo_id': 1349911655, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/359190a391c78cd45e7ce04e78f52a01.jpg', 'username': None, 'uploaded_at': 1743715928, 'text': 'image_03042025_23_31_04_10159.jpg'}, {'photo_id': 1349911616, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/3/3b36c1437886dcf5b9d60a06cec36689.jpg', 'username': None, 'uploaded_at': 1743715928, 'text': 'image_03042025_23_31_13_9135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 7.867813110351562e-06 ??????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002276182174682617 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22041770, '2025-04-03' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1712161,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.07943415641784668 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= 1712161 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1712161, 'dashboard_run_id': 1723078, 'mtr_portfolio_id': 22039469, 'dashboard_result_id': 9862309, '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_P22039469_03-04-2025_23_03_34.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22039535, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22039536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22039537, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22039538, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22039539, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22039540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22039541, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22039542, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22039543, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22039544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22039545, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22039546, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1723078, 'mtr_portfolio_id': 22040415, 'dashboard_result_id': 9862310, '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_P22040415_03-04-2025_23_14_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22040488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22040489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22040490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22040491, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22040492, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22040493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22040494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22040495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22040496, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22040497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22040498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22040499, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1723078, 'mtr_portfolio_id': 22041005, 'dashboard_result_id': 9862311, '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_P22041005_03-04-2025_23_33_05.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041010, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041015, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041018, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041019, 'pht': 3726}}"}, {'dashboat_entry_day': 1712161, 'dashboard_run_id': 1723078, 'mtr_portfolio_id': 22041770, 'dashboard_result_id': 9862312, '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_P22041770_03-04-2025_23_35_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041797, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041799, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041800, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041801, '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 = 22039469 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': 2722151, 'mtr_portfolio_id': 22039469, 'created_at': datetime.datetime(2025, 4, 3, 23, 3, 33), 'result': '0.05351375771395628', 'result_long': None, 'result_double': None}] Qualite : 0.05351375771395628 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22039469 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22039469_03-04-2025_23_03_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22039469 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_P22039469_03-04-2025_23_03_34.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22039535, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22039536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22039537, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22039538, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22039539, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22039540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22039541, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22039542, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22039543, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22039544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22039545, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22039546, 'pht': 3726}}" where mtr_portfolio_id = 22039469 and dashboard_run_id = 1723078 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`=22039469 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9862309, 0.05351375771395628, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22039469_03-04-2025_23_03_34.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22039535, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22039536, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22039537, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22039538, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22039539, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22039540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22039541, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22039542, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22039543, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22039544, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22039545, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22039546, '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 = 22040415 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': 2722205, 'mtr_portfolio_id': 22040415, 'created_at': datetime.datetime(2025, 4, 3, 23, 14, 34), 'result': '0.04144667212071482', 'result_long': None, 'result_double': None}] Qualite : 0.04144667212071482 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22040415 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22040415_03-04-2025_23_14_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22040415 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_P22040415_03-04-2025_23_14_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22040488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22040489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22040490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22040491, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22040492, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22040493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22040494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22040495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22040496, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22040497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22040498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22040499, 'pht': 3726}}" where mtr_portfolio_id = 22040415 and dashboard_run_id = 1723078 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`=22040415 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9862310, 0.04144667212071482, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22040415_03-04-2025_23_14_35.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22040488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22040489, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22040490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22040491, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22040492, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22040493, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22040494, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22040495, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22040496, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22040497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22040498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22040499, '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 = 22041005 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': 2722253, 'mtr_portfolio_id': 22041005, 'created_at': datetime.datetime(2025, 4, 3, 23, 33, 5), 'result': '0.05620358030875997', 'result_long': None, 'result_double': None}] Qualite : 0.05620358030875997 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22041005 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041005_03-04-2025_23_33_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22041005 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_P22041005_03-04-2025_23_33_05.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041010, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041015, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041018, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041019, 'pht': 3726}}" where mtr_portfolio_id = 22041005 and dashboard_run_id = 1723078 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`=22041005 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9862311, 0.05620358030875997, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041005_03-04-2025_23_33_05.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041008, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041010, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041011, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041013, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041014, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041015, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041016, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041017, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041018, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041019, '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 = 22041770 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': 2722295, 'mtr_portfolio_id': 22041770, 'created_at': datetime.datetime(2025, 4, 3, 23, 37, 3), 'result': '0.04933216462453647', 'result_long': None, 'result_double': None}] Qualite : 0.04933216462453647 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22041770 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041770_03-04-2025_23_37_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22041770 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_P22041770_03-04-2025_23_37_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041797, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041799, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041800, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041801, 'pht': 3726}}" where mtr_portfolio_id = 22041770 and dashboard_run_id = 1723078 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`=22041770 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9862312, 0.04933216462453647, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22041770_03-04-2025_23_37_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22041789, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22041790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22041792, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22041793, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22041794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22041795, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22041796, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22041797, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22041798, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22041799, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22041800, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22041801, '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 (22039469,22040415,22041005,22041770) result : ((1349900579,), (1349900609,), (1349900629,), (1349900734,), (1349900992,), (1349901162,), (1349901179,), (1349901197,), (1349901208,), (1349901294,), (1349901305,), (1349901311,), (1349901320,), (1349901340,), (1349901366,), (1349901451,), (1349901489,), (1349901508,), (1349901514,), (1349901586,), (1349901611,), (1349901641,), (1349901693,), (1349901712,), (1349901730,), (1349901795,), (1349901803,), (1349901819,), (1349901826,), (1349901841,), (1349901846,), (1349901865,), (1349901884,), (1349901890,), (1349901905,), (1349901989,), (1349902015,), (1349902033,), (1349902061,), (1349902094,), (1349902134,), (1349902239,), (1349902279,), (1349902381,), (1349902387,), (1349902406,), (1349902430,), (1349902458,), (1349902477,), (1349902499,), (1349902532,), (1349902610,), (1349902636,), (1349902641,), (1349902658,), (1349902742,), (1349902745,), (1349902749,), (1349902752,), (1349902757,), (1349902759,), (1349902787,), (1349902816,), (1349902826,), (1349902830,), (1349902868,), (1349902873,), (1349902877,), (1349902882,), (1349902886,), (1349902966,), (1349902989,), (1349903010,), (1349903042,), (1349903057,), (1349903082,), (1349903315,), (1349903321,), (1349903328,), (1349903354,), (1349903628,), (1349903562,), (1349903594,), (1349903953,), (1349903984,), (1349903999,), (1349904026,), (1349904056,), (1349904099,), (1349904352,), (1349904438,), (1349904469,), (1349904502,), (1349904527,), (1349904553,), (1349904756,), (1349904792,), (1349904812,), (1349905073,), (1349905162,), (1349905218,), (1349905241,), (1349905332,), (1349905376,), (1349905520,), (1349905556,), (1349905767,), (1349905814,), (1349905864,), (1349905903,), (1349905935,), (1349906200,), (1349906242,), (1349906283,), (1349906309,), (1349906339,), (1349906590,), (1349906623,), (1349906657,), (1349906686,), (1349906708,), (1349906918,), (1349906952,), (1349906976,), (1349907009,), (1349907032,), (1349907282,), (1349907323,), (1349907348,), (1349907374,), (1349907406,), (1349907442,), (1349907700,), (1349907715,), (1349907721,), (1349907725,), (1349907729,), (1349907819,), (1349907822,), (1349907827,), (1349907831,), (1349907835,), (1349907839,), (1349908041,), (1349908070,), (1349908097,), (1349908120,), (1349908334,), (1349908340,), (1349908350,), (1349908374,), (1349908395,), (1349908400,), (1349908507,), (1349908476,), (1349908492,), (1349908499,), (1349908503,), (1349908536,), (1349908544,), (1349908550,), (1349908556,), (1349908562,), (1349908613,), (1349908617,), (1349908622,), (1349908631,), (1349908678,), (1349908681,), (1349908687,), (1349908743,), (1349908756,), (1349908761,), (1349908951,), (1349908954,), (1349908961,), (1349908965,), (1349908972,), (1349908975,), (1349909072,), (1349909088,), (1349909104,), (1349909109,), (1349909141,), (1349909150,), (1349909161,), (1349909182,), (1349909186,), (1349909199,), (1349910101,), (1349910116,), (1349910129,), (1349910133,), (1349910136,), (1349910874,), (1349910924,), (1349910974,), (1349911020,), (1349911058,), (1349911457,), (1349911455,), (1349911584,), (1349911600,), (1349911612,), (1349911616,), (1349911655,), (1349911691,), (1349911789,), (1349911828,), (1349911883,), (1349911950,), (1349912026,), (1349912127,), (1349912177,), (1349912236,), (1349912270,), (1349912307,), (1349912309,), (1349912319,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03042025': {'nb_upload': 19, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22041770]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] map_info['map_portfolio_photo'] : {22041770: [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026, 1349911950, 1349911883, 1349911828, 1349911789, 1349911691, 1349911655, 1349911616, 1349911612, 1349911600, 1349911584, 1349911455]} final : True mtd_id 4302 list_pids : [1349912319, 1349912309, 1349912307, 1349912270, 1349912236, 1349912177, 1349912127, 1349912026] Looping around the photos to save general results len do output : 1 /22041770Didn'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, '2722295') ('4302', '22041770', '1349912319', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912309', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912307', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912270', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912236', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912177', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912127', None, None, None, None, None, '2722295') ('4302', None, None, None, None, None, None, None, '2722295') ('4302', '22041770', '1349912026', None, None, None, None, None, '2722295') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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, '22041770', 'None', None, None, None, None, '2722295'), ('4302', '22041770', '1349912319', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912309', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912307', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912270', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912236', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912177', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912127', None, None, None, None, None, '2722295'), ('4302', '22041770', '1349912026', None, None, None, None, None, '2722295')] time used for this insertion : 0.04342770576477051 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9517173767089844 time spend to save output : 0.04375958442687988 total time spend for step 5 : 1.9954769611358643 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 (2722295) 2.26user 2.08system 0:14.82elapsed 29%CPU (0avgtext+0avgdata 158540maxresident)k 1104inputs+8400outputs (28major+74596minor)pagefaults 0swaps