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 : 376465 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 (2688693) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2688693) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685604 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2688693'] with mtr_portfolio_ids : ['21685604'] and first list_photo_ids : [] new path : /proc/376465/ Name: python3 Umask: 0002 State: R (running) Tgid: 376465 Ngid: 0 Pid: 376465 PPid: 376464 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 376465 NSpid: 376465 NSpgid: 373023 NSsid: 373023 VmPeak: 1106932 kB VmSize: 1106932 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98808 kB VmRSS: 98808 kB RssAnon: 59752 kB RssFile: 39056 kB RssShmem: 0 kB VmData: 865680 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 588 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: 51 nonvoluntary_ctxt_switches: 96 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '376465', 'Ngid': '0', 'Pid': '376465', 'PPid': '376464', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '376465', 'NSpid': '376465', 'NSpgid': '373023', 'NSsid': '373023', 'VmPeak': '1106932 kB', 'VmSize': '1106932 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98808 kB', 'VmRSS': '98808 kB', 'RssAnon': '59752 kB', 'RssFile': '39056 kB', 'RssShmem': '0 kB', 'VmData': '865680 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '588 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': '51', 'nonvoluntary_ctxt_switches': '96'} ('datou_batch_current', '376465', '1106932', '0', '1106932', '865680', '98808', b'', 'marlene', '2688693') 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 (21685604) 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 (2688693 ) ) 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 (21685604) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1347120508, 'portfolio_id': 21685604}, {'photo_id': 1347120440, 'portfolio_id': 21685604}, {'photo_id': 1347120432, 'portfolio_id': 21685604}, {'photo_id': 1347120426, 'portfolio_id': 21685604}, {'photo_id': 1347120420, 'portfolio_id': 21685604}, {'photo_id': 1347120413, 'portfolio_id': 21685604}, {'photo_id': 1347120213, 'portfolio_id': 21685604}, {'photo_id': 1347120209, 'portfolio_id': 21685604}, {'photo_id': 1347120205, 'portfolio_id': 21685604}, {'photo_id': 1347120042, 'portfolio_id': 21685604}, {'photo_id': 1347120035, 'portfolio_id': 21685604}, {'photo_id': 1347120028, 'portfolio_id': 21685604}, {'photo_id': 1347120013, 'portfolio_id': 21685604}, {'photo_id': 1347119813, 'portfolio_id': 21685604}, {'photo_id': 1347119807, 'portfolio_id': 21685604}, {'photo_id': 1347119793, 'portfolio_id': 21685604}, {'photo_id': 1347119776, 'portfolio_id': 21685604}, {'photo_id': 1347119738, 'portfolio_id': 21685604}] map_portfolio_id_photo_id: {21685604: [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205, 1347120042, 1347120035, 1347120028, 1347120013, 1347119813, 1347119807, 1347119793, 1347119776, 1347119738]} ##### 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.015771150588989258 #### 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 Tue Mar 25 08:37:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21685604) 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 : 21685604 get user id for portfolio 21685604 get sub ptf for main ptf 21685604, type 3726 and hashtags ['plastique', 'mal_croppe', 'Carton_brun', 'Carton_gris', 'metal', 'flou', 'autre_refus', 'environnement', 'cartonnette', 'kraft', 'papier', 'Teint_Dans_La_Masse'] 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`=21685604 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','Carton_gris','metal','flou','autre_refus','environnement','cartonnette','kraft','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21685604 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','Carton_gris','metal','flou','autre_refus','environnement','cartonnette','kraft','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21685604, 'sub_port_id': 21685657, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217887, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'metal': {'main_port_id': 21685604, 'sub_port_id': 21685658, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217888, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'kraft': {'main_port_id': 21685604, 'sub_port_id': 21685659, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217889, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'papier': {'main_port_id': 21685604, 'sub_port_id': 21685660, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217890, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'Carton_gris': {'main_port_id': 21685604, 'sub_port_id': 21685661, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217891, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'mal_croppe': {'main_port_id': 21685604, 'sub_port_id': 21685662, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217892, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 21685604, 'sub_port_id': 21685663, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217893, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'cartonnette': {'main_port_id': 21685604, 'sub_port_id': 21685664, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217894, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'Carton_brun': {'main_port_id': 21685604, 'sub_port_id': 21685665, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217895, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'plastique': {'main_port_id': 21685604, 'sub_port_id': 21685666, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217896, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'autre_refus': {'main_port_id': 21685604, 'sub_port_id': 21685667, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217897, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}, 'flou': {'main_port_id': 21685604, 'sub_port_id': 21685668, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217898, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 28), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685657 , 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=21685604 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 (21685657) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685658 , 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=21685604 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 (21685658) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685659 , 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=21685604 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 (21685659) result : ((1347120698,), (1347120699,), (1347120700,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685660 , 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=21685604 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 (21685660) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685661 , 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=21685604 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 (21685661) result : ((1347120684,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685662 , 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=21685604 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 (21685662) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685663 , 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=21685604 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 (21685663) result : ((1347120670,), (1347120671,), (1347120673,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685664 , 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=21685604 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 (21685664) result : ((1347120687,), (1347120689,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685665 , 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=21685604 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 (21685665) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685666 , 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=21685604 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 (21685666) result : ((1347120691,), (1347120692,), (1347120693,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685667 , 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=21685604 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 (21685667) result : ((1347120678,), (1347120679,), (1347120680,), (1347120681,), (1347120682,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21685668 , 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=21685604 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 (21685668) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21685604) result : ((1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21685604 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','Carton_gris','metal','flou','autre_refus','environnement','cartonnette','kraft','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21685604 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','mal_croppe','Carton_brun','Carton_gris','metal','flou','autre_refus','environnement','cartonnette','kraft','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21685604, 'sub_port_id': 21685669, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217899, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'metal': {'main_port_id': 21685604, 'sub_port_id': 21685670, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217900, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'kraft': {'main_port_id': 21685604, 'sub_port_id': 21685671, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217901, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'papier': {'main_port_id': 21685604, 'sub_port_id': 21685672, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217902, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'Carton_gris': {'main_port_id': 21685604, 'sub_port_id': 21685673, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217903, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'mal_croppe': {'main_port_id': 21685604, 'sub_port_id': 21685674, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217904, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 21685604, 'sub_port_id': 21685675, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217905, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'cartonnette': {'main_port_id': 21685604, 'sub_port_id': 21685676, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217906, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'Carton_brun': {'main_port_id': 21685604, 'sub_port_id': 21685677, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217907, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'plastique': {'main_port_id': 21685604, 'sub_port_id': 21685678, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217908, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'autre_refus': {'main_port_id': 21685604, 'sub_port_id': 21685679, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217909, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}, 'flou': {'main_port_id': 21685604, 'sub_port_id': 21685680, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14217910, 'last_updated_at': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 25, 8, 34, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 25, 8, 34, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685669,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685657 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685670,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685658 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685671,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685659 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685672,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685660 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685673,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685661 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685674,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685662 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685675,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685663 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685676,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685664 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685677,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685665 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685678,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685666 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685679,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685667 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21685680,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21685668 lien utilise dans velours : https://www.fotonower.com/velours/21685669,21685670,21685671,21685672,21685673,21685674,21685675,21685676,21685677,21685678,21685679,21685680?tags=environnement,metal,kraft,papier,Carton_gris,mal_croppe,Teint_Dans_La_Masse,cartonnette,Carton_brun,plastique,autre_refus,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21685604]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] map_info['map_portfolio_photo'] : {21685604: [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205, 1347120042, 1347120035, 1347120028, 1347120013, 1347119813, 1347119807, 1347119793, 1347119776, 1347119738]} final : False mtd_id 4302 list_pids : [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] Looping around the photos to save general results len do output : 1 /21685604. 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, '2688693') ('4302', '21685604', '1347120508', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120440', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120432', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120426', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120420', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120413', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120213', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120209', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120205', None, None, None, None, None, '2688693') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '21685604', "{'environnement': 21685657, 'metal': 21685658, 'kraft': 21685659, 'papier': 21685660, 'Carton_gris': 21685661, 'mal_croppe': 21685662, 'Teint_Dans_La_Masse': 21685663, 'cartonnette': 21685664, 'Carton_brun': 21685665, 'plastique': 21685666, 'autre_refus': 21685667, 'flou': 21685668}", None, None, None, None, '2688693'), ('4302', '21685604', '1347120508', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120440', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120432', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120426', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120420', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120413', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120213', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120209', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120205', None, None, None, None, None, '2688693')] time used for this insertion : 0.015129327774047852 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6167662143707275 time spend to save output : 0.015358209609985352 total time spend for step 1 : 1.632124423980713 step2:final Tue Mar 25 08:37:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (21685604) 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 21685604 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1347119813,1347119807,1347119793,1347119776,1347119738,1347120042,1347120035,1347120028,1347120013,1347120213,1347120209,1347120205,1347120508,1347120440,1347120432,1347120426,1347120420,1347120413); 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([21685604]) Inside saveOutput : final : False verbose : True original output for save of step final : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} new output for save of step final : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] map_info['map_portfolio_photo'] : {21685604: [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205, 1347120042, 1347120035, 1347120028, 1347120013, 1347119813, 1347119807, 1347119793, 1347119776, 1347119738]} final : False mtd_id 4302 list_pids : [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] Looping around the photos to save general results len do output : 9 /1347120508.Didn't retrieve data . /1347120440.Didn't retrieve data . /1347120432.Didn't retrieve data . /1347120426.Didn't retrieve data . /1347120420.Didn't retrieve data . /1347120413.Didn't retrieve data . /1347120213.Didn't retrieve data . /1347120209.Didn't retrieve data . /1347120205.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, '2688693') ('4302', '21685604', '1347120508', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120440', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120432', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120426', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120420', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120413', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120213', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120209', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120205', None, None, None, None, None, '2688693') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '21685604', '1347120508', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120440', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120432', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120426', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120420', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120413', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120213', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120209', '0.07366617817303381', None, None, None, None, '2688693'), ('4302', '21685604', '1347120205', '0.07366617817303381', None, None, None, None, '2688693')] time used for this insertion : 0.013620853424072266 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06471419334411621 time spend to save output : 0.014165163040161133 total time spend for step 2 : 0.07887935638427734 step3:velours_tree Tue Mar 25 08:37:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21685604: [{'environnement': 21685657, 'metal': 21685658, 'kraft': 21685659, 'papier': 21685660, 'Carton_gris': 21685661, 'mal_croppe': 21685662, 'Teint_Dans_La_Masse': 21685663, 'cartonnette': 21685664, 'Carton_brun': 21685665, 'plastique': 21685666, 'autre_refus': 21685667, 'flou': 21685668}]} input_args_next_step : {21685604: ()} output_args : {21685604: [{'environnement': 21685657, 'metal': 21685658, 'kraft': 21685659, 'papier': 21685660, 'Carton_gris': 21685661, 'mal_croppe': 21685662, 'Teint_Dans_La_Masse': 21685663, 'cartonnette': 21685664, 'Carton_brun': 21685665, 'plastique': 21685666, 'autre_refus': 21685667, 'flou': 21685668}]} args : 21685604 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 21685657, 'metal': 21685658, 'kraft': 21685659, 'papier': 21685660, 'Carton_gris': 21685661, 'mal_croppe': 21685662, 'Teint_Dans_La_Masse': 21685663, 'cartonnette': 21685664, 'Carton_brun': 21685665, 'plastique': 21685666, 'autre_refus': 21685667, 'flou': 21685668},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21685604) 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([21685604]) 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.3455493450164795 time spend to save output : 6.151199340820312e-05 total time spend for step 3 : 0.3456108570098877 step4:send_mail_cod Tue Mar 25 08: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 ! complete output_args for input 2 : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} input_args_next_step : {1347120508: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120508 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120440 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120432 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120426 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120420 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120413 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120213 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120209 depend.output_id : 0 input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ()} output_args : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',)} args : 1347120205 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 : {21685604: [{'environnement': 21685657, 'metal': 21685658, 'kraft': 21685659, 'papier': 21685660, 'Carton_gris': 21685661, 'mal_croppe': 21685662, 'Teint_Dans_La_Masse': 21685663, 'cartonnette': 21685664, 'Carton_brun': 21685665, 'plastique': 21685666, 'autre_refus': 21685667, 'flou': 21685668}]} input_args_next_step : {1347120508: ('0.07366617817303381',), 1347120440: ('0.07366617817303381',), 1347120432: ('0.07366617817303381',), 1347120426: ('0.07366617817303381',), 1347120420: ('0.07366617817303381',), 1347120413: ('0.07366617817303381',), 1347120213: ('0.07366617817303381',), 1347120209: ('0.07366617817303381',), 1347120205: ('0.07366617817303381',), 21685604: ()} output_args : {21685604: [{'environnement': 21685657, 'metal': 21685658, 'kraft': 21685659, 'papier': 21685660, 'Carton_gris': 21685661, 'mal_croppe': 21685662, 'Teint_Dans_La_Masse': 21685663, 'cartonnette': 21685664, 'Carton_brun': 21685665, 'plastique': 21685666, 'autre_refus': 21685667, 'flou': 21685668}]} args : 21685604 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 :10, first value : ('0.07366617817303381',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21685604) 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 (1347120508,1347120440,1347120432,1347120426,1347120420,1347120413,1347120213,1347120209,1347120205) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1347120205 begin to download photo : 1347120213 begin to download photo : 1347120420 begin to download photo : 1347120432 begin to download photo : 1347120508 download finish for photo 1347120432 begin to download photo : 1347120440 download finish for photo 1347120213 begin to download photo : 1347120413 download finish for photo 1347120420 begin to download photo : 1347120426 download finish for photo 1347120205 begin to download photo : 1347120209 download finish for photo 1347120508 download finish for photo 1347120440 download finish for photo 1347120426 download finish for photo 1347120413 download finish for photo 1347120209 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette216856581742888222/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P21685604_25-03-2025_08_37_02.pdf 21685658 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=21685658 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216856581742888222 21685659 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=21685659 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347120698: '1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713758_0.png', 1347120699: '1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713784_0.png', 1347120700: '1742888113_247833_1347119776_7ce152143207ea7660fe3b8323da5b6d_rle_crop_3728713803_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/1ed33bbb8881402efef991bfde6ec94f_20283510.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/d93dd8996264b8094bffd39a0711979b_13912808.png change filename to text .imagette216856591742888222/ imagette216856591742888222/1742888113_247833_1347119776_7ce152143207ea7660fe3b8323da5b6d_rle_crop_3728713803_0.png.png imagette216856591742888222/1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713784_0.png.png imagette216856591742888222/1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713758_0.png.png imagette216856621742888222/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/44fa68ac9c27a7c839e478385fd7eefc_44180463.png imagette216856591742888222 21685662 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=21685662 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216856621742888222 21685664 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=21685664 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347120687: '1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713738_0.png', 1347120689: '1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713782_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/4caaa8e866b08bcc6dab72c904d25fed_54559836.png change filename to text .imagette216856641742888222/ imagette216856641742888222/1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713738_0.png.png imagette216856641742888222/1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713782_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/368fd0486aa7d1b38f86a7235212e49a_51845194.png imagette216856641742888222 21685666 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=21685666 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347120691: '1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713737_0.png', 1347120692: '1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713769_0.png', 1347120693: '1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713796_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/b8b7df74a9f1ac2786841446b54c8fd5_26670446.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/74c9ca8216f2ccb3893766e252a4a58d_85767209.png change filename to text .imagette216856661742888222/ imagette216856661742888222/1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713737_0.png.png imagette216856661742888222/1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713796_0.png.png imagette216856661742888222/1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713769_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/2b6525ea44c8c66dee2cf0820dde2c85_59108279.png imagette216856661742888222 21685667 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=21685667 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347120678: '1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713746_0.png', 1347120679: '1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713741_0.png', 1347120680: '1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713766_0.png', 1347120681: '1742888113_247833_1347119776_7ce152143207ea7660fe3b8323da5b6d_rle_crop_3728713802_0.png', 1347120682: '1742888113_247833_1347119738_2364e057a8fe4799bd09e605b6780ed8_rle_crop_3728714120_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/b758145a75009c17f852316fb1309f6a_87823646.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/d36f0b8d00f9eb7c049fb965f15aa51d_77187818.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/0a49d33cd763257d934757732e265841_63223492.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/1d998f773371540a2103e0e7c813a50a_99661556.png change filename to text .imagette216856671742888222/ imagette216856671742888222/1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713766_0.png.png imagette216856671742888222/1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713741_0.png.png imagette216856671742888222/1742888113_247833_1347119776_7ce152143207ea7660fe3b8323da5b6d_rle_crop_3728713802_0.png.png imagette216856671742888222/1742888113_247833_1347119738_2364e057a8fe4799bd09e605b6780ed8_rle_crop_3728714120_0.png.png imagette216856671742888222/1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713746_0.png.png imagette216856681742888223/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/c6b80015641192d13d32963de894f4aa_22098099.png imagette216856671742888222 21685668 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=21685668 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216856681742888223 21685661 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=21685661 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347120684: '1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713760_0.png'} change filename to text .imagette216856611742888223/ imagette216856611742888223/1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713760_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/f4d8466b26f95044bcd9310fe597198c_2055227.png imagette216856611742888223 21685663 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=21685663 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1347120670: '1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713748_0.png', 1347120671: '1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713764_0.png', 1347120673: '1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713788_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/e106af0b19c82a5c8ba96f1aca97d46f_8865398.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/44f0b7afcff71a1bee56daa4cb572423_30327875.png change filename to text .imagette216856631742888223/ imagette216856631742888223/1742888113_247833_1347119807_a09a8e252958c1b5094b794f783f47b6_rle_crop_3728713764_0.png.png imagette216856631742888223/1742888113_247833_1347119793_3c739385162f2099b7637996037b09e8_rle_crop_3728713788_0.png.png imagette216856631742888223/1742888113_247833_1347119813_73b064e8529292cdd59dd3b12eb0eea1_rle_crop_3728713748_0.png.png imagette216856651742888223/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/8374d33a9dd9071da8041c71984409ab_52526717.png imagette216856631742888223 21685665 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=21685665 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette216856651742888223 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21685604 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21685669,21685670,21685671,21685672,21685673,21685674,21685675,21685676,21685677,21685678,21685679,21685680?tags=environnement,metal,kraft,papier,Carton_gris,mal_croppe,Teint_Dans_La_Masse,cartonnette,Carton_brun,plastique,autre_refus,flou your option no_mail is active, we will not send the real mail to your client args[1347120508] : ('0.07366617817303381',) no score found for photo 1347120508 We are sending mail with results at report@fotonower.com args[1347120440] : ('0.07366617817303381',) no score found for photo 1347120440 We are sending mail with results at report@fotonower.com args[1347120432] : ('0.07366617817303381',) no score found for photo 1347120432 We are sending mail with results at report@fotonower.com args[1347120426] : ('0.07366617817303381',) no score found for photo 1347120426 We are sending mail with results at report@fotonower.com args[1347120420] : ('0.07366617817303381',) no score found for photo 1347120420 We are sending mail with results at report@fotonower.com args[1347120413] : ('0.07366617817303381',) no score found for photo 1347120413 We are sending mail with results at report@fotonower.com args[1347120213] : ('0.07366617817303381',) no score found for photo 1347120213 We are sending mail with results at report@fotonower.com args[1347120209] : ('0.07366617817303381',) no score found for photo 1347120209 We are sending mail with results at report@fotonower.com args[1347120205] : ('0.07366617817303381',) no score found for photo 1347120205 We are sending mail with results at report@fotonower.com refus_total : 0.07366617817303381 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=21685604 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_P21685604_25-03-2025_08_37_02.pdf results_Auto_P21685604_25-03-2025_08_37_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21685604_25-03-2025_08_37_02.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','21685604','results_Auto_P21685604_25-03-2025_08_37_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21685604_25-03-2025_08_37_02.pdf','pdf','','0.16','0.07366617817303381') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21685604]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] map_info['map_portfolio_photo'] : {21685604: [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205, 1347120042, 1347120035, 1347120028, 1347120013, 1347119813, 1347119807, 1347119793, 1347119776, 1347119738]} final : False mtd_id 4302 list_pids : [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] 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, '2688693') ('4302', '21685604', '1347120508', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120440', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120432', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120426', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120420', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120413', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120213', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120209', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120205', None, None, None, None, None, '2688693') 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', '21685604', '1347120508', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120440', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120432', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120426', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120420', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120413', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120213', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120209', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120205', None, None, None, None, None, '2688693')] time used for this insertion : 0.01488947868347168 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.6889846324920654 time spend to save output : 0.015131711959838867 total time spend for step 4 : 2.7041163444519043 step5:split_time_score Tue Mar 25 08:37:04 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 : ['21685604'] 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 : [('21685604',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21685604) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1347120508: {'path': 'temp/1742888222_376465_1347120508_2875b8d8bf776afbb586a8687cb071d1.jpg', 'extension': 'jpg'}, 1347120432: {'path': 'temp/1742888222_376465_1347120432_42993f1c2f05ead1b08f0791aa066638.jpg', 'extension': 'jpg'}, 1347120440: {'path': 'temp/1742888222_376465_1347120440_c2c5178a836e12ec3aa08c16e89bc54e.jpg', 'extension': 'jpg'}, 1347120420: {'path': 'temp/1742888222_376465_1347120420_0ca12588f88b67417b3c9458750169b2.jpg', 'extension': 'jpg'}, 1347120426: {'path': 'temp/1742888222_376465_1347120426_134001f208dc42c0399193645db0dcad.jpg', 'extension': 'jpg'}, 1347120213: {'path': 'temp/1742888222_376465_1347120213_ad10ed73d46ec939965d6654077b3619.jpg', 'extension': 'jpg'}, 1347120413: {'path': 'temp/1742888222_376465_1347120413_02133412cf9de0c3ba8882dc646b0da0.jpg', 'extension': 'jpg'}, 1347120205: {'path': 'temp/1742888222_376465_1347120205_419fb3be04ba5bbf346ac3a88f453480.jpg', 'extension': 'jpg'}, 1347120209: {'path': 'temp/1742888222_376465_1347120209_53f27bc0cb6f2357c485ad3c99120702.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 = 21685604; (('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 = 21685604 group by h (('08', 18),) 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=21685604 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 (21685604) 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 (21685604) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 25032025 21685604 Nombre de photos uploadées : 18 / 23040 (0%) 25032025 21685604 Nombre de photos taguées (types de déchets): 0 / 18 (0%) 25032025 21685604 Nombre de photos taguées (volume) : 0 / 18 (0%) [{'photo_id': 1347119813, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/73b064e8529292cdd59dd3b12eb0eea1.jpg', 'username': None, 'uploaded_at': 1742887931, 'text': 'image_25032025_08_30_04_9132.jpg'}, {'photo_id': 1347119807, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/a09a8e252958c1b5094b794f783f47b6.jpg', 'username': None, 'uploaded_at': 1742887931, 'text': 'image_25032025_08_30_14_10137.jpg'}, {'photo_id': 1347119793, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/3c739385162f2099b7637996037b09e8.jpg', 'username': None, 'uploaded_at': 1742887931, 'text': 'image_25032025_08_30_24_10138.jpg'}, {'photo_id': 1347119776, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/25/7ce152143207ea7660fe3b8323da5b6d.jpg', 'username': None, 'uploaded_at': 1742887931, 'text': 'image_25032025_08_30_34_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 8.344650268554688e-06 ?????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0015723705291748047 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21685604, '2025-03-25' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1685799,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.029196500778198242 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= 1685799 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1685799, 'dashboard_run_id': 1694328, 'mtr_portfolio_id': 21683084, 'dashboard_result_id': 9606694, '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_P21683084_25-03-2025_08_05_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21683085, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21683086, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21683087, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21683088, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21683089, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21683090, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21683091, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21683092, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21683093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21683094, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21683095, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21683096, 'pht': 3726}}"}, {'dashboat_entry_day': 1685799, 'dashboard_run_id': 1694328, 'mtr_portfolio_id': 21683744, 'dashboard_result_id': 9606695, '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_P21683744_25-03-2025_08_21_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21683745, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21683746, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21683747, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21683748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21683749, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21683750, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21683751, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21683752, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21683753, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21683754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21683755, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21683756, 'pht': 3726}}"}, {'dashboat_entry_day': 1685799, 'dashboard_run_id': 1694328, 'mtr_portfolio_id': 21684719, 'dashboard_result_id': 9606696, '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_P21684719_25-03-2025_08_33_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21684747, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21684748, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21684749, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21684750, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21684751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21684752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21684753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21684754, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21684755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21684756, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21684757, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21684758, 'pht': 3726}}"}, {'dashboat_entry_day': 1685799, 'dashboard_run_id': 1694328, 'mtr_portfolio_id': 21685604, 'dashboard_result_id': 9606697, '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_P21685604_25-03-2025_08_34_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21685657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21685658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21685659, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21685660, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21685661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21685662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21685663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21685664, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21685665, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21685666, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21685667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21685668, '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 = 21683084 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': 2688453, 'mtr_portfolio_id': 21683084, 'created_at': datetime.datetime(2025, 3, 25, 8, 5, 31), 'result': '0.08025751073227201', 'result_long': None, 'result_double': None}] Qualite : 0.08025751073227201 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21683084 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21683084_25-03-2025_08_05_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21683084 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_P21683084_25-03-2025_08_05_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21683085, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21683086, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21683087, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21683088, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21683089, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21683090, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21683091, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21683092, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21683093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21683094, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21683095, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21683096, 'pht': 3726}}" where mtr_portfolio_id = 21683084 and dashboard_run_id = 1694328 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`=21683084 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9606694, 0.08025751073227201, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21683084_25-03-2025_08_05_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21683085, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21683086, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21683087, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21683088, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21683089, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21683090, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21683091, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21683092, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21683093, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21683094, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21683095, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21683096, '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 = 21683744 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': 2688544, 'mtr_portfolio_id': 21683744, 'created_at': datetime.datetime(2025, 3, 25, 8, 20, 59), 'result': '0.07941035170903972', 'result_long': None, 'result_double': None}] Qualite : 0.07941035170903972 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21683744 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21683744_25-03-2025_08_21_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21683744 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_P21683744_25-03-2025_08_21_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21683745, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21683746, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21683747, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21683748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21683749, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21683750, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21683751, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21683752, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21683753, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21683754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21683755, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21683756, 'pht': 3726}}" where mtr_portfolio_id = 21683744 and dashboard_run_id = 1694328 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`=21683744 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9606695, 0.07941035170903972, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21683744_25-03-2025_08_21_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21683745, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21683746, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21683747, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21683748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21683749, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21683750, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21683751, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21683752, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21683753, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21683754, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21683755, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21683756, '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 = 21684719 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': 2688618, 'mtr_portfolio_id': 21684719, 'created_at': datetime.datetime(2025, 3, 25, 8, 33, 59), 'result': '0.0681636400198088', 'result_long': None, 'result_double': None}] Qualite : 0.0681636400198088 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21684719 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21684719_25-03-2025_08_33_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21684719 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_P21684719_25-03-2025_08_33_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21684747, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21684748, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21684749, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21684750, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21684751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21684752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21684753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21684754, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21684755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21684756, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21684757, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21684758, 'pht': 3726}}" where mtr_portfolio_id = 21684719 and dashboard_run_id = 1694328 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`=21684719 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9606696, 0.0681636400198088, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21684719_25-03-2025_08_33_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21684747, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21684748, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21684749, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21684750, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21684751, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21684752, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21684753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21684754, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21684755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21684756, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21684757, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21684758, '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 = 21685604 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': 2688693, 'mtr_portfolio_id': 21685604, 'created_at': datetime.datetime(2025, 3, 25, 8, 37, 1), 'result': '0.07366617817303381', 'result_long': None, 'result_double': None}] Qualite : 0.07366617817303381 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21685604 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21685604_25-03-2025_08_37_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21685604 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_P21685604_25-03-2025_08_37_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21685657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21685658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21685659, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21685660, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21685661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21685662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21685663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21685664, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21685665, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21685666, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21685667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21685668, 'pht': 3726}}" where mtr_portfolio_id = 21685604 and dashboard_run_id = 1694328 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`=21685604 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9606697, 0.07366617817303381, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21685604_25-03-2025_08_37_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21685657, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21685658, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21685659, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21685660, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21685661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21685662, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21685663, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21685664, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21685665, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21685666, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21685667, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21685668, '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 (21683084,21683744,21684719,21685604) result : ((1347107610,), (1347107619,), (1347107671,), (1347107768,), (1347107773,), (1347107778,), (1347107784,), (1347107789,), (1347107817,), (1347107967,), (1347108010,), (1347108018,), (1347108105,), (1347108109,), (1347108113,), (1347108119,), (1347108177,), (1347108179,), (1347108180,), (1347108186,), (1347108293,), (1347108297,), (1347108301,), (1347108311,), (1347108322,), (1347108544,), (1347108555,), (1347108562,), (1347108570,), (1347108580,), (1347108842,), (1347108849,), (1347108901,), (1347108905,), (1347108910,), (1347108970,), (1347108976,), (1347108980,), (1347108988,), (1347108992,), (1347108997,), (1347109304,), (1347109342,), (1347109414,), (1347109433,), (1347109565,), (1347109566,), (1347109583,), (1347109646,), (1347109717,), (1347109801,), (1347110063,), (1347110066,), (1347110070,), (1347110093,), (1347110108,), (1347110116,), (1347110195,), (1347110206,), (1347110209,), (1347110212,), (1347110239,), (1347110243,), (1347111070,), (1347111101,), (1347111156,), (1347111205,), (1347111255,), (1347111654,), (1347111485,), (1347111538,), (1347111605,), (1347111872,), (1347111913,), (1347112024,), (1347112166,), (1347112235,), (1347112304,), (1347112619,), (1347112676,), (1347112705,), (1347112721,), (1347113014,), (1347113024,), (1347113036,), (1347113075,), (1347113083,), (1347113088,), (1347113137,), (1347113302,), (1347113448,), (1347113535,), (1347113566,), (1347113583,), (1347113868,), (1347113908,), (1347114256,), (1347114278,), (1347114302,), (1347114327,), (1347114348,), (1347114365,), (1347114414,), (1347114418,), (1347114424,), (1347114430,), (1347114439,), (1347114446,), (1347114516,), (1347114532,), (1347114544,), (1347114550,), (1347114679,), (1347114684,), (1347114701,), (1347114707,), (1347114735,), (1347114749,), (1347115304,), (1347115332,), (1347115350,), (1347115356,), (1347115363,), (1347115390,), (1347115468,), (1347115530,), (1347115589,), (1347115612,), (1347115637,), (1347115780,), (1347115680,), (1347115684,), (1347115693,), (1347115728,), (1347115756,), (1347116011,), (1347116046,), (1347116113,), (1347116176,), (1347116226,), (1347116461,), (1347116470,), (1347116495,), (1347116511,), (1347116558,), (1347116604,), (1347116759,), (1347116828,), (1347116854,), (1347116903,), (1347116919,), (1347117074,), (1347117092,), (1347117104,), (1347117123,), (1347117129,), (1347117212,), (1347117238,), (1347117268,), (1347117319,), (1347117334,), (1347117366,), (1347117369,), (1347117418,), (1347117433,), (1347117738,), (1347117751,), (1347117781,), (1347117811,), (1347117868,), (1347117906,), (1347118059,), (1347118067,), (1347118074,), (1347118079,), (1347118091,), (1347118098,), (1347118191,), (1347118203,), (1347118303,), (1347118338,), (1347118350,), (1347118360,), (1347118371,), (1347118393,), (1347118535,), (1347118556,), (1347118575,), (1347118581,), (1347118587,), (1347118772,), (1347118799,), (1347118824,), (1347118828,), (1347118836,), (1347118923,), (1347118952,), (1347118980,), (1347119013,), (1347119061,), (1347119089,), (1347119490,), (1347119518,), (1347119544,), (1347119574,), (1347119820,), (1347119738,), (1347119776,), (1347119793,), (1347119807,), (1347119813,), (1347120013,), (1347120028,), (1347120035,), (1347120042,), (1347120205,), (1347120209,), (1347120213,), (1347120413,), (1347120420,), (1347120426,), (1347120432,), (1347120440,), (1347120508,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'25032025': {'nb_upload': 18, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21685604]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] map_info['map_portfolio_photo'] : {21685604: [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205, 1347120042, 1347120035, 1347120028, 1347120013, 1347119813, 1347119807, 1347119793, 1347119776, 1347119738]} final : True mtd_id 4302 list_pids : [1347120508, 1347120440, 1347120432, 1347120426, 1347120420, 1347120413, 1347120213, 1347120209, 1347120205] Looping around the photos to save general results len do output : 1 /21685604Didn'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, '2688693') ('4302', '21685604', '1347120508', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120440', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120432', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120426', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120420', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120413', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120213', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120209', None, None, None, None, None, '2688693') ('4302', None, None, None, None, None, None, None, '2688693') ('4302', '21685604', '1347120205', None, None, None, None, None, '2688693') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '21685604', 'None', None, None, None, None, '2688693'), ('4302', '21685604', '1347120508', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120440', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120432', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120426', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120420', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120413', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120213', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120209', None, None, None, None, None, '2688693'), ('4302', '21685604', '1347120205', None, None, None, None, None, '2688693')] time used for this insertion : 0.016959667205810547 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3684678077697754 time spend to save output : 0.01724839210510254 total time spend for step 5 : 0.38571619987487793 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 (2688693) 2.01user 2.48system 0:09.39elapsed 47%CPU (0avgtext+0avgdata 160636maxresident)k 744inputs+8864outputs (8major+64062minor)pagefaults 0swaps