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 : 2907886 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 (2659701) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2659701) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21310997 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2659701'] with mtr_portfolio_ids : ['21310997'] and first list_photo_ids : [] new path : /proc/2907886/ Name: python3 Umask: 0002 State: R (running) Tgid: 2907886 Ngid: 0 Pid: 2907886 PPid: 2907885 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2907886 NSpid: 2907886 NSpgid: 2904915 NSsid: 2904915 VmPeak: 1106844 kB VmSize: 1106844 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98992 kB VmRSS: 98992 kB RssAnon: 59760 kB RssFile: 39232 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 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: 61 nonvoluntary_ctxt_switches: 176 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2907886', 'Ngid': '0', 'Pid': '2907886', 'PPid': '2907885', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2907886', 'NSpid': '2907886', 'NSpgid': '2904915', 'NSsid': '2904915', 'VmPeak': '1106844 kB', 'VmSize': '1106844 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98992 kB', 'VmRSS': '98992 kB', 'RssAnon': '59760 kB', 'RssFile': '39232 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 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': '61', 'nonvoluntary_ctxt_switches': '176'} ('datou_batch_current', '2907886', '1106844', '0', '1106844', '865592', '98992', b'', 'marlene', '2659701') 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 (21310997) 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 (2659701 ) ) 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 (21310997) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1343211388, 'portfolio_id': 21310997}, {'photo_id': 1343211373, 'portfolio_id': 21310997}, {'photo_id': 1343211364, 'portfolio_id': 21310997}, {'photo_id': 1343211345, 'portfolio_id': 21310997}, {'photo_id': 1343211319, 'portfolio_id': 21310997}, {'photo_id': 1343211291, 'portfolio_id': 21310997}, {'photo_id': 1343211113, 'portfolio_id': 21310997}, {'photo_id': 1343211110, 'portfolio_id': 21310997}, {'photo_id': 1343211106, 'portfolio_id': 21310997}, {'photo_id': 1343211099, 'portfolio_id': 21310997}, {'photo_id': 1343211027, 'portfolio_id': 21310997}, {'photo_id': 1343211025, 'portfolio_id': 21310997}, {'photo_id': 1343211020, 'portfolio_id': 21310997}, {'photo_id': 1343211017, 'portfolio_id': 21310997}, {'photo_id': 1343211011, 'portfolio_id': 21310997}, {'photo_id': 1343210995, 'portfolio_id': 21310997}, {'photo_id': 1343210920, 'portfolio_id': 21310997}, {'photo_id': 1343210911, 'portfolio_id': 21310997}, {'photo_id': 1343210882, 'portfolio_id': 21310997}, {'photo_id': 1343210868, 'portfolio_id': 21310997}, {'photo_id': 1343210690, 'portfolio_id': 21310997}, {'photo_id': 1343210683, 'portfolio_id': 21310997}, {'photo_id': 1343210676, 'portfolio_id': 21310997}, {'photo_id': 1343210663, 'portfolio_id': 21310997}, {'photo_id': 1343210655, 'portfolio_id': 21310997}, {'photo_id': 1343210282, 'portfolio_id': 21310997}, {'photo_id': 1343210168, 'portfolio_id': 21310997}, {'photo_id': 1343210139, 'portfolio_id': 21310997}, {'photo_id': 1343209676, 'portfolio_id': 21310997}, {'photo_id': 1343209659, 'portfolio_id': 21310997}, {'photo_id': 1343209607, 'portfolio_id': 21310997}, {'photo_id': 1343209520, 'portfolio_id': 21310997}, {'photo_id': 1343209518, 'portfolio_id': 21310997}, {'photo_id': 1343209514, 'portfolio_id': 21310997}, {'photo_id': 1343209509, 'portfolio_id': 21310997}, {'photo_id': 1343209504, 'portfolio_id': 21310997}, {'photo_id': 1343209500, 'portfolio_id': 21310997}, {'photo_id': 1343209457, 'portfolio_id': 21310997}, {'photo_id': 1343209448, 'portfolio_id': 21310997}, {'photo_id': 1343209418, 'portfolio_id': 21310997}, {'photo_id': 1343209416, 'portfolio_id': 21310997}, {'photo_id': 1343209411, 'portfolio_id': 21310997}, {'photo_id': 1343209378, 'portfolio_id': 21310997}, {'photo_id': 1343209342, 'portfolio_id': 21310997}, {'photo_id': 1343209289, 'portfolio_id': 21310997}, {'photo_id': 1343209283, 'portfolio_id': 21310997}, {'photo_id': 1343209277, 'portfolio_id': 21310997}, {'photo_id': 1343209233, 'portfolio_id': 21310997}, {'photo_id': 1343209229, 'portfolio_id': 21310997}, {'photo_id': 1343209222, 'portfolio_id': 21310997}, {'photo_id': 1343209091, 'portfolio_id': 21310997}, {'photo_id': 1343209024, 'portfolio_id': 21310997}, {'photo_id': 1343209006, 'portfolio_id': 21310997}, {'photo_id': 1343208973, 'portfolio_id': 21310997}, {'photo_id': 1343208916, 'portfolio_id': 21310997}, {'photo_id': 1343208840, 'portfolio_id': 21310997}, {'photo_id': 1343208766, 'portfolio_id': 21310997}, {'photo_id': 1343208746, 'portfolio_id': 21310997}, {'photo_id': 1343208743, 'portfolio_id': 21310997}, {'photo_id': 1343208739, 'portfolio_id': 21310997}, {'photo_id': 1343208736, 'portfolio_id': 21310997}, {'photo_id': 1343208679, 'portfolio_id': 21310997}, {'photo_id': 1343208673, 'portfolio_id': 21310997}, {'photo_id': 1343208669, 'portfolio_id': 21310997}, {'photo_id': 1343208655, 'portfolio_id': 21310997}] map_portfolio_id_photo_id: {21310997: [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099, 1343211027, 1343211025, 1343211020, 1343211017, 1343211011, 1343210995, 1343210920, 1343210911, 1343210882, 1343210868, 1343210690, 1343210683, 1343210676, 1343210663, 1343210655, 1343210282, 1343210168, 1343210139, 1343209676, 1343209659, 1343209607, 1343209520, 1343209518, 1343209514, 1343209509, 1343209504, 1343209500, 1343209457, 1343209448, 1343209418, 1343209416, 1343209411, 1343209378, 1343209342, 1343209289, 1343209283, 1343209277, 1343209233, 1343209229, 1343209222, 1343209091, 1343209024, 1343209006, 1343208973, 1343208916, 1343208840, 1343208766, 1343208746, 1343208743, 1343208739, 1343208736, 1343208679, 1343208673, 1343208669, 1343208655]} ##### 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.020036935806274414 #### 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 11 21:46:56 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 (21310997) 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 : 21310997 get user id for portfolio 21310997 get sub ptf for main ptf 21310997, type 3726 and hashtags ['Carton_gris', 'autre_refus', 'cartonnette', 'mal_croppe', 'papier', 'kraft', 'Carton_brun', 'plastique', 'Teint_Dans_La_Masse', 'environnement', 'metal', 'flou'] 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`=21310997 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','autre_refus','cartonnette','mal_croppe','papier','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','flou')) 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`=21310997 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','autre_refus','cartonnette','mal_croppe','papier','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','flou')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 21310997, 'sub_port_id': 21311019, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894536, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'papier': {'main_port_id': 21310997, 'sub_port_id': 21311020, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894537, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 21310997, 'sub_port_id': 21311021, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894538, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'Carton_brun': {'main_port_id': 21310997, 'sub_port_id': 21311022, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894539, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'environnement': {'main_port_id': 21310997, 'sub_port_id': 21311023, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894540, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'kraft': {'main_port_id': 21310997, 'sub_port_id': 21311024, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894541, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'autre_refus': {'main_port_id': 21310997, 'sub_port_id': 21311025, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894542, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'plastique': {'main_port_id': 21310997, 'sub_port_id': 21311027, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894543, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'metal': {'main_port_id': 21310997, 'sub_port_id': 21311028, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894544, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'cartonnette': {'main_port_id': 21310997, 'sub_port_id': 21311029, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894545, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'flou': {'main_port_id': 21310997, 'sub_port_id': 21311030, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894546, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}, 'Carton_gris': {'main_port_id': 21310997, 'sub_port_id': 21311031, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894547, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 30)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311019 , 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=21310997 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 (21311019) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311020 , 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=21310997 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 (21311020) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311021 , 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=21310997 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 (21311021) result : ((1343209253,), (1343209255,), (1343209446,), (1343210343,), (1343210352,), (1343210358,), (1343210434,), (1343210435,), (1343210874,), (1343210876,), (1343210925,), (1343211392,), (1343211393,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311022 , 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=21310997 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 (21311022) result : ((1343209456,), (1343211178,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311023 , 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=21310997 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 (21311023) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311024 , 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=21310997 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 (21311024) result : ((1343209458,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311025 , 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=21310997 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 (21311025) result : ((1343209259,), (1343209260,), (1343209261,), (1343209262,), (1343209425,), (1343209426,), (1343209427,), (1343209449,), (1343209450,), (1343209522,), (1343209575,), (1343209576,), (1343209577,), (1343209578,), (1343209579,), (1343210365,), (1343210437,), (1343210438,), (1343210881,), (1343211157,), (1343211158,), (1343211159,), (1343211394,), (1343211395,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311027 , 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=21310997 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 (21311027) result : ((1343209430,), (1343209431,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311028 , 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=21310997 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 (21311028) result : ((1343209580,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311029 , 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=21310997 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 (21311029) result : ((1343209266,), (1343209267,), (1343209268,), (1343209454,), (1343210442,), (1343210886,), (1343210887,), (1343211171,), (1343211396,), (1343211397,), (1343211398,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311030 , 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=21310997 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 (21311030) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21311031 , 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=21310997 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 (21311031) result : ((1343209429,), (1343210440,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21310997) result : ((1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) 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 (1343209500) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21310997 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','autre_refus','cartonnette','mal_croppe','papier','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','flou')) 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`=21310997 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','autre_refus','cartonnette','mal_croppe','papier','kraft','Carton_brun','plastique','Teint_Dans_La_Masse','environnement','metal','flou')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 21310997, 'sub_port_id': 21311033, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894548, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'papier': {'main_port_id': 21310997, 'sub_port_id': 21311034, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894549, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'Teint_Dans_La_Masse': {'main_port_id': 21310997, 'sub_port_id': 21311035, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894550, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'Carton_brun': {'main_port_id': 21310997, 'sub_port_id': 21311036, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894551, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'environnement': {'main_port_id': 21310997, 'sub_port_id': 21311037, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894552, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'kraft': {'main_port_id': 21310997, 'sub_port_id': 21311038, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894553, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'autre_refus': {'main_port_id': 21310997, 'sub_port_id': 21311039, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894554, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'plastique': {'main_port_id': 21310997, 'sub_port_id': 21311040, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894555, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'metal': {'main_port_id': 21310997, 'sub_port_id': 21311041, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894556, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'cartonnette': {'main_port_id': 21310997, 'sub_port_id': 21311042, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894557, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'flou': {'main_port_id': 21310997, 'sub_port_id': 21311043, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894558, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 33, 37), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}, 'Carton_gris': {'main_port_id': 21310997, 'sub_port_id': 21311044, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13894559, 'last_updated_at': datetime.datetime(2025, 3, 11, 21, 45, 1), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 21, 45, 1), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 21, 33, 37)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311033,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311019 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311034,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311020 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311035,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311021 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311036,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311022 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311037,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311023 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311038,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311024 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311039,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311025 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311040,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311027 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311041,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311028 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311042,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311029 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311043,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311030 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21311044,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21311031 lien utilise dans velours : https://www.fotonower.com/velours/21311033,21311034,21311035,21311036,21311037,21311038,21311039,21311040,21311041,21311042,21311043,21311044?tags=mal_croppe,papier,Teint_Dans_La_Masse,Carton_brun,environnement,kraft,autre_refus,plastique,metal,cartonnette,flou,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21310997]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] map_info['map_portfolio_photo'] : {21310997: [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099, 1343211027, 1343211025, 1343211020, 1343211017, 1343211011, 1343210995, 1343210920, 1343210911, 1343210882, 1343210868, 1343210690, 1343210683, 1343210676, 1343210663, 1343210655, 1343210282, 1343210168, 1343210139, 1343209676, 1343209659, 1343209607, 1343209520, 1343209518, 1343209514, 1343209509, 1343209504, 1343209500, 1343209457, 1343209448, 1343209418, 1343209416, 1343209411, 1343209378, 1343209342, 1343209289, 1343209283, 1343209277, 1343209233, 1343209229, 1343209222, 1343209091, 1343209024, 1343209006, 1343208973, 1343208916, 1343208840, 1343208766, 1343208746, 1343208743, 1343208739, 1343208736, 1343208679, 1343208673, 1343208669, 1343208655]} final : False mtd_id 4302 list_pids : [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] Looping around the photos to save general results len do output : 1 /21310997. 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, '2659701') ('4302', '21310997', '1343211388', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211373', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211364', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211345', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211319', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211291', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211113', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211110', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211106', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211099', None, None, None, None, None, '2659701') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '21310997', "{'mal_croppe': 21311019, 'papier': 21311020, 'Teint_Dans_La_Masse': 21311021, 'Carton_brun': 21311022, 'environnement': 21311023, 'kraft': 21311024, 'autre_refus': 21311025, 'plastique': 21311027, 'metal': 21311028, 'cartonnette': 21311029, 'flou': 21311030, 'Carton_gris': 21311031}", None, None, None, None, '2659701'), ('4302', '21310997', '1343211388', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211373', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211364', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211345', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211319', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211291', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211113', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211110', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211106', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211099', None, None, None, None, None, '2659701')] time used for this insertion : 0.06376981735229492 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5768985748291016 time spend to save output : 0.06409239768981934 total time spend for step 1 : 0.6409909725189209 step2:final Tue Mar 11 21:46:57 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 (21310997) 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 21310997 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1343208679,1343208673,1343208669,1343208655,1343208766,1343208746,1343208743,1343208739,1343208736,1343209091,1343209024,1343209006,1343208973,1343208916,1343208840,1343209233,1343209229,1343209222,1343209289,1343209283,1343209277,1343209418,1343209416,1343209411,1343209378,1343209342,1343209457,1343209448,1343209520,1343209518,1343209514,1343209509,1343209504,1343209500,1343209676,1343209659,1343209607,1343210282,1343210168,1343210139,1343210690,1343210683,1343210676,1343210663,1343210655,1343210920,1343210911,1343210882,1343210868,1343211027,1343211025,1343211020,1343211017,1343211011,1343210995,1343211113,1343211110,1343211106,1343211099,1343211388,1343211373,1343211364,1343211345,1343211319,1343211291); 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([21310997]) Inside saveOutput : final : False verbose : True original output for save of step final : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} new output for save of step final : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] map_info['map_portfolio_photo'] : {21310997: [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099, 1343211027, 1343211025, 1343211020, 1343211017, 1343211011, 1343210995, 1343210920, 1343210911, 1343210882, 1343210868, 1343210690, 1343210683, 1343210676, 1343210663, 1343210655, 1343210282, 1343210168, 1343210139, 1343209676, 1343209659, 1343209607, 1343209520, 1343209518, 1343209514, 1343209509, 1343209504, 1343209500, 1343209457, 1343209448, 1343209418, 1343209416, 1343209411, 1343209378, 1343209342, 1343209289, 1343209283, 1343209277, 1343209233, 1343209229, 1343209222, 1343209091, 1343209024, 1343209006, 1343208973, 1343208916, 1343208840, 1343208766, 1343208746, 1343208743, 1343208739, 1343208736, 1343208679, 1343208673, 1343208669, 1343208655]} final : False mtd_id 4302 list_pids : [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] Looping around the photos to save general results len do output : 10 /1343211388.Didn't retrieve data . /1343211373.Didn't retrieve data . /1343211364.Didn't retrieve data . /1343211345.Didn't retrieve data . /1343211319.Didn't retrieve data . /1343211291.Didn't retrieve data . /1343211113.Didn't retrieve data . /1343211110.Didn't retrieve data . /1343211106.Didn't retrieve data . /1343211099.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, '2659701') ('4302', '21310997', '1343211388', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211373', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211364', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211345', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211319', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211291', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211113', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211110', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211106', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211099', None, None, None, None, None, '2659701') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '21310997', '1343211388', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211373', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211364', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211345', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211319', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211291', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211113', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211110', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211106', '0.06385766272624296', None, None, None, None, '2659701'), ('4302', '21310997', '1343211099', '0.06385766272624296', None, None, None, None, '2659701')] time used for this insertion : 0.013269901275634766 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.0721900463104248 time spend to save output : 0.013790369033813477 total time spend for step 2 : 0.08598041534423828 step3:velours_tree Tue Mar 11 21:46:57 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 : {21310997: [{'mal_croppe': 21311019, 'papier': 21311020, 'Teint_Dans_La_Masse': 21311021, 'Carton_brun': 21311022, 'environnement': 21311023, 'kraft': 21311024, 'autre_refus': 21311025, 'plastique': 21311027, 'metal': 21311028, 'cartonnette': 21311029, 'flou': 21311030, 'Carton_gris': 21311031}]} input_args_next_step : {21310997: ()} output_args : {21310997: [{'mal_croppe': 21311019, 'papier': 21311020, 'Teint_Dans_La_Masse': 21311021, 'Carton_brun': 21311022, 'environnement': 21311023, 'kraft': 21311024, 'autre_refus': 21311025, 'plastique': 21311027, 'metal': 21311028, 'cartonnette': 21311029, 'flou': 21311030, 'Carton_gris': 21311031}]} args : 21310997 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 : ({'mal_croppe': 21311019, 'papier': 21311020, 'Teint_Dans_La_Masse': 21311021, 'Carton_brun': 21311022, 'environnement': 21311023, 'kraft': 21311024, 'autre_refus': 21311025, 'plastique': 21311027, 'metal': 21311028, 'cartonnette': 21311029, 'flou': 21311030, 'Carton_gris': 21311031},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21310997) 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([21310997]) 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.32241320610046387 time spend to save output : 6.4849853515625e-05 total time spend for step 3 : 0.3224780559539795 step4:send_mail_cod Tue Mar 11 21:46:57 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 : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} input_args_next_step : {1343211388: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211388 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211373 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211364 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211345 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211319 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211291 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211113 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211110 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211106 depend.output_id : 0 input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ()} output_args : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',)} args : 1343211099 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 : {21310997: [{'mal_croppe': 21311019, 'papier': 21311020, 'Teint_Dans_La_Masse': 21311021, 'Carton_brun': 21311022, 'environnement': 21311023, 'kraft': 21311024, 'autre_refus': 21311025, 'plastique': 21311027, 'metal': 21311028, 'cartonnette': 21311029, 'flou': 21311030, 'Carton_gris': 21311031}]} input_args_next_step : {1343211388: ('0.06385766272624296',), 1343211373: ('0.06385766272624296',), 1343211364: ('0.06385766272624296',), 1343211345: ('0.06385766272624296',), 1343211319: ('0.06385766272624296',), 1343211291: ('0.06385766272624296',), 1343211113: ('0.06385766272624296',), 1343211110: ('0.06385766272624296',), 1343211106: ('0.06385766272624296',), 1343211099: ('0.06385766272624296',), 21310997: ()} output_args : {21310997: [{'mal_croppe': 21311019, 'papier': 21311020, 'Teint_Dans_La_Masse': 21311021, 'Carton_brun': 21311022, 'environnement': 21311023, 'kraft': 21311024, 'autre_refus': 21311025, 'plastique': 21311027, 'metal': 21311028, 'cartonnette': 21311029, 'flou': 21311030, 'Carton_gris': 21311031}]} args : 21310997 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 :11, first value : ('0.06385766272624296',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21310997) 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 (1343211388,1343211373,1343211364,1343211345,1343211319,1343211291,1343211113,1343211110,1343211106,1343211099) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1343211099 begin to download photo : 1343211113 begin to download photo : 1343211345 begin to download photo : 1343211388 download finish for photo 1343211099 begin to download photo : 1343211106 download finish for photo 1343211345 begin to download photo : 1343211364 download finish for photo 1343211113 begin to download photo : 1343211291 download finish for photo 1343211388 download finish for photo 1343211364 begin to download photo : 1343211373 download finish for photo 1343211106 begin to download photo : 1343211110 download finish for photo 1343211291 begin to download photo : 1343211319 download finish for photo 1343211373 download finish for photo 1343211110 download finish for photo 1343211319 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette213110191741726017/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P21310997_11-03-2025_21_46_57.pdf 21311019 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=21311019 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette213110191741726017 21311024 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=21311024 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209458: '1741725390_2535016_1343209233_dd9e156b2f17b0f98d012b406cad75c1_rle_crop_3706417923_0.png'} change filename to text .imagette213110241741726017/ imagette213110241741726017/1741725390_2535016_1343209233_dd9e156b2f17b0f98d012b406cad75c1_rle_crop_3706417923_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/d2222e77e319691a372fb2ffc0d45e5b_5656814.png imagette213110241741726017 21311025 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=21311025 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209577: '1741725490_1780535_1343209411_609293aafcc844de2a19bea2527b2fbe_rle_crop_3706420137_0.png', 1343211395: '1741725892_1783764_1343210683_7ed97a3cebed803235ef6e0628d69d34_rle_crop_3706428384_0.png', 1343211394: '1741725892_1783764_1343210920_86dbcc02bf712b1ef1b82949110a6657_rle_crop_3706428132_0.png', 1343211159: '1741725873_1783578_1343210868_a79baf6885f85bf7206d5e3829d50a06_rle_crop_3706428077_0.png', 1343211158: '1741725873_1783578_1343210882_6ab3f4d0847ae9d5559ff57dbdf6edb1_rle_crop_3706428068_0.png', 1343211157: '1741725873_1783578_1343210911_d4cbdddc741d422409903684e03d7f95_rle_crop_3706428055_0.png', 1343210881: '1741725711_1782129_1343209607_148cd51df435267cda1193b61fc80b04_rle_crop_3706422719_0.png', 1343210438: '1741725613_1781437_1343209509_4052c9d14dc0e9e1a4bf0415238d7bdc_rle_crop_3706421440_0.png', 1343210437: '1741725613_1781437_1343209514_db83936f026f72c187a664e4f7fbd1cc_rle_crop_3706421422_0.png', 1343210365: '1741725631_2541041_1343209448_913181ee472be93bf9556d327232d741_rle_crop_3706421349_0.png', 1343209579: '1741725490_1780535_1343209342_b52f7ebb72d7629d56b44e0d5b713d0d_rle_crop_3706420290_0.png', 1343209578: '1741725490_1780535_1343209378_e5cdf3085837dd267848d9c9e375c1ed_rle_crop_3706420216_0.png', 1343209259: '1741725253_1778305_1343208766_2d9c9587e33be2fc7a6ab53792464a26_rle_crop_3706415947_0.png', 1343209576: '1741725490_1780535_1343209411_609293aafcc844de2a19bea2527b2fbe_rle_crop_3706420143_0.png', 1343209575: '1741725490_1780535_1343209416_ea759e5b1b5bb3d093bd533c9bec0df1_rle_crop_3706420108_0.png', 1343209522: '1741725507_2538024_1343209283_e75abc1889ef2d49768f75f97b723e09_rle_crop_3706420093_0.png', 1343209450: '1741725390_2535016_1343208840_39e54fcaa6a63f285623a5e1a0ef4e28_rle_crop_3706419220_0.png', 1343209449: '1741725390_2535016_1343209024_0405c04af1ed63d5eee7bed087752904_rle_crop_3706417974_0.png', 1343209427: '1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417984_0.png', 1343209426: '1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417981_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/b390dbbe0293c22d8c9d783cfe687794_66674708.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/9192d90a777e4d04b08ddb0622903c03_34451474.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/feb3dc076130fd92b150b68ec0e49dbf_7462353.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/a73b9e9ba61e174a3e4d4bd91b925dab_92866085.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/a2c9c7e0f959eadc89517eaff7ebc280_35165274.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/61cb6342db1b47d1125598e375b64c90_81943587.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/c6edd2fdd01f773d13f61125491f9433_99415174.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/59736916ab7d0b49885ec8d75872d212_63769991.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/5c1cc54f8405e1fbd60aaf37c28e6fe6_85889333.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/cae96b74876b480e50ca14beb1c069dc_69506804.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/524b9d0e382c9588324a06eb6f824cca_3920909.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/64bf75e5d0af9c0f9c79d774bf42241b_80209052.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/276f55d0774994337ae5d073a85de35b_88081901.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/931d4bbfeefb480b4e987d387b7e9e0b_37508351.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/ae8c9e969c591ebfb94d32d785487bc1_19413462.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/ef8a6686d0647a4d145375d632309923_35636353.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/b1bb238f3f6005e2da0ca9df11fb81ed_8546062.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/736f554f6e94d3321e4499392754dfeb_58541797.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/9fdf654fea3ed41cdacb7cce6e1295cd_62776238.png change filename to text .imagette213110251741726017/ imagette213110251741726017/1741725613_1781437_1343209514_db83936f026f72c187a664e4f7fbd1cc_rle_crop_3706421422_0.png.png imagette213110251741726017/1741725490_1780535_1343209378_e5cdf3085837dd267848d9c9e375c1ed_rle_crop_3706420216_0.png.png imagette213110251741726017/1741725507_2538024_1343209283_e75abc1889ef2d49768f75f97b723e09_rle_crop_3706420093_0.png.png imagette213110251741726017/1741725390_2535016_1343209024_0405c04af1ed63d5eee7bed087752904_rle_crop_3706417974_0.png.png imagette213110251741726017/1741725711_1782129_1343209607_148cd51df435267cda1193b61fc80b04_rle_crop_3706422719_0.png.png imagette213110251741726017/1741725631_2541041_1343209448_913181ee472be93bf9556d327232d741_rle_crop_3706421349_0.png.png imagette213110251741726017/1741725490_1780535_1343209411_609293aafcc844de2a19bea2527b2fbe_rle_crop_3706420143_0.png.png imagette213110251741726017/1741725253_1778305_1343208766_2d9c9587e33be2fc7a6ab53792464a26_rle_crop_3706415947_0.png.png imagette213110251741726017/1741725490_1780535_1343209342_b52f7ebb72d7629d56b44e0d5b713d0d_rle_crop_3706420290_0.png.png imagette213110251741726017/1741725490_1780535_1343209416_ea759e5b1b5bb3d093bd533c9bec0df1_rle_crop_3706420108_0.png.png imagette213110251741726017/1741725873_1783578_1343210911_d4cbdddc741d422409903684e03d7f95_rle_crop_3706428055_0.png.png imagette213110251741726017/1741725892_1783764_1343210920_86dbcc02bf712b1ef1b82949110a6657_rle_crop_3706428132_0.png.png imagette213110251741726017/1741725490_1780535_1343209411_609293aafcc844de2a19bea2527b2fbe_rle_crop_3706420137_0.png.png imagette213110251741726017/1741725390_2535016_1343208840_39e54fcaa6a63f285623a5e1a0ef4e28_rle_crop_3706419220_0.png.png imagette213110251741726017/1741725892_1783764_1343210683_7ed97a3cebed803235ef6e0628d69d34_rle_crop_3706428384_0.png.png imagette213110251741726017/1741725613_1781437_1343209509_4052c9d14dc0e9e1a4bf0415238d7bdc_rle_crop_3706421440_0.png.png imagette213110251741726017/1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417984_0.png.png imagette213110251741726017/1741725873_1783578_1343210882_6ab3f4d0847ae9d5559ff57dbdf6edb1_rle_crop_3706428068_0.png.png imagette213110251741726017/1741725873_1783578_1343210868_a79baf6885f85bf7206d5e3829d50a06_rle_crop_3706428077_0.png.png imagette213110251741726017/1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417981_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/8c2e7b66e39411350c8bf2f60fec68c5_83813265.png imagette213110251741726017 21311027 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=21311027 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209430: '1741725376_1779319_1343209229_d1aee15c6461ae3fb665d3d6069413ea_rle_crop_3706417944_0.png', 1343209431: '1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417979_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/b95463eb2b417f49b5839cbde998d153_46081004.png change filename to text .imagette213110271741726019/ imagette213110271741726019/1741725376_1779319_1343209229_d1aee15c6461ae3fb665d3d6069413ea_rle_crop_3706417944_0.png.png imagette213110271741726019/1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417979_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/4999e01e95ea16b7d0f7349e210e365f_86011916.png imagette213110271741726019 21311028 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=21311028 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209580: '1741725490_1780535_1343209378_e5cdf3085837dd267848d9c9e375c1ed_rle_crop_3706420217_0.png'} change filename to text .imagette213110281741726019/ imagette213110281741726019/1741725490_1780535_1343209378_e5cdf3085837dd267848d9c9e375c1ed_rle_crop_3706420217_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/5de607e5d515281ba59dc14b152a47dd_8967694.png imagette213110281741726019 21311029 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=21311029 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209266: '1741725253_1778305_1343208766_2d9c9587e33be2fc7a6ab53792464a26_rle_crop_3706415946_0.png', 1343209267: '1741725253_1778305_1343208679_0b6b73c6f1510cd85b41b0de3f00aa77_rle_crop_3706415955_0.png', 1343209268: '1741725253_1778305_1343208673_7ad0c196a1c3ae5ab697d9cb915c07c4_rle_crop_3706415974_0.png', 1343209454: '1741725390_2535016_1343208973_53d763e64c6282a959ae7210d9920204_rle_crop_3706419183_0.png', 1343210442: '1741725613_1781437_1343209504_7f8c179389c8414d41301e5701d5d320_rle_crop_3706421454_0.png', 1343210886: '1741725711_1782129_1343210282_38cc34a644047c4420a9b12e13d2be28_rle_crop_3706422654_0.png', 1343210887: '1741725711_1782129_1343210282_38cc34a644047c4420a9b12e13d2be28_rle_crop_3706422655_0.png', 1343211171: '1741725873_1783578_1343210882_6ab3f4d0847ae9d5559ff57dbdf6edb1_rle_crop_3706428064_0.png', 1343211396: '1741725892_1783764_1343210920_86dbcc02bf712b1ef1b82949110a6657_rle_crop_3706428127_0.png', 1343211397: '1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428389_0.png', 1343211398: '1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428394_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/3af99e7ce23f5be1398eb82e27d8c893_95718230.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/1aa716676916519547a09f0184705fe6_43781020.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/4f813bc05ca270e447ada7fbbcfaf5ef_12579032.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/2d3a5008b3ffc86a682674a1c3d0be98_10075982.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/6208ac646abe52231e0fddfdef3b4960_21436757.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/526f5ee95897ad7b6af733a84f4c69d5_31778906.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/b5ac0ee63a090ba66a6c7f8f9e47799b_49226524.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/136f1e381a28ef0e7adeede2e8a3471b_16404173.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/c6bd329d806eb591d21e2c24a248b7cd_94417101.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/51dc7cc46c8f6e0f354a43bba7617649_4307459.png change filename to text .imagette213110291741726019/ imagette213110291741726019/1741725253_1778305_1343208679_0b6b73c6f1510cd85b41b0de3f00aa77_rle_crop_3706415955_0.png.png imagette213110291741726019/1741725613_1781437_1343209504_7f8c179389c8414d41301e5701d5d320_rle_crop_3706421454_0.png.png imagette213110291741726019/1741725711_1782129_1343210282_38cc34a644047c4420a9b12e13d2be28_rle_crop_3706422654_0.png.png imagette213110291741726019/1741725390_2535016_1343208973_53d763e64c6282a959ae7210d9920204_rle_crop_3706419183_0.png.png imagette213110291741726019/1741725892_1783764_1343210920_86dbcc02bf712b1ef1b82949110a6657_rle_crop_3706428127_0.png.png imagette213110291741726019/1741725253_1778305_1343208673_7ad0c196a1c3ae5ab697d9cb915c07c4_rle_crop_3706415974_0.png.png imagette213110291741726019/1741725253_1778305_1343208766_2d9c9587e33be2fc7a6ab53792464a26_rle_crop_3706415946_0.png.png imagette213110291741726019/1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428394_0.png.png imagette213110291741726019/1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428389_0.png.png imagette213110291741726019/1741725711_1782129_1343210282_38cc34a644047c4420a9b12e13d2be28_rle_crop_3706422655_0.png.png imagette213110291741726019/1741725873_1783578_1343210882_6ab3f4d0847ae9d5559ff57dbdf6edb1_rle_crop_3706428064_0.png.png imagette213110301741726019/ wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/d3a2a6974ca856762799875320f81bc2_10317658.png imagette213110291741726019 21311030 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=21311030 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette213110301741726019 21311021 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=21311021 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209253: '1741725253_1778305_1343208766_2d9c9587e33be2fc7a6ab53792464a26_rle_crop_3706415944_0.png', 1343209255: '1741725253_1778305_1343208655_9070b879fb5ffeeb477a25e6a9d9e4cd_rle_crop_3706416008_0.png', 1343209446: '1741725390_2535016_1343209024_0405c04af1ed63d5eee7bed087752904_rle_crop_3706417969_0.png', 1343210343: '1741725631_2541041_1343209520_2478f834ff7bacb651235501815116f2_rle_crop_3706421332_0.png', 1343210352: '1741725631_2541041_1343209520_2478f834ff7bacb651235501815116f2_rle_crop_3706421340_0.png', 1343210358: '1741725631_2541041_1343209448_913181ee472be93bf9556d327232d741_rle_crop_3706421345_0.png', 1343210434: '1741725613_1781437_1343209514_db83936f026f72c187a664e4f7fbd1cc_rle_crop_3706421419_0.png', 1343210435: '1741725613_1781437_1343209500_c1ab7e81024b6f8df17cbca251d8b47f_rle_crop_3706421507_0.png', 1343210874: '1741725711_1782129_1343209659_6ae3666b78251cf944e10e0235955695_rle_crop_3706422713_0.png', 1343210876: '1741725711_1782129_1343209607_148cd51df435267cda1193b61fc80b04_rle_crop_3706422718_0.png', 1343210925: '1741725732_1782364_1343210168_f98b9adccdf1a8c95b78d67139bc3f0c_rle_crop_3706422785_0.png', 1343211392: '1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428396_0.png', 1343211393: '1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428392_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/1b2676a9a94bf787cc1c9c866d37eb52_25683698.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/ad34c392b32b727e9a8e2a1a53e086c4_1458546.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/c6e2293ed1034264bbf40709e363ef3b_91019604.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/8bc4c1a2bae33a16155f9485f321fc43_63655941.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/5708d439832e20da19ee4027e932fe5c_15255910.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/0f0841d5823cad2a6c76a85693c10bb3_6564097.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/a9d5a55219eb9a0f703eb347c3e4024e_78761644.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/279da0652d7290bfac88ae145b742e29_55548638.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/49e8d7f74c1057be4336b59d20d6eeb0_71928923.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/e32a076948b63aa215a2790eeb9e53b8_29990154.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/b90936d83ebb00b0035effdf23097d48_63164275.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/e50b98156ccd974e5b05143e23f8182c_60198566.png change filename to text .imagette213110211741726019/ imagette213110211741726019/1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428396_0.png.png imagette213110211741726019/1741725613_1781437_1343209514_db83936f026f72c187a664e4f7fbd1cc_rle_crop_3706421419_0.png.png imagette213110211741726019/1741725711_1782129_1343209607_148cd51df435267cda1193b61fc80b04_rle_crop_3706422718_0.png.png imagette213110211741726019/1741725253_1778305_1343208655_9070b879fb5ffeeb477a25e6a9d9e4cd_rle_crop_3706416008_0.png.png imagette213110211741726019/1741725711_1782129_1343209659_6ae3666b78251cf944e10e0235955695_rle_crop_3706422713_0.png.png imagette213110211741726019/1741725631_2541041_1343209520_2478f834ff7bacb651235501815116f2_rle_crop_3706421332_0.png.png imagette213110211741726019/1741725253_1778305_1343208766_2d9c9587e33be2fc7a6ab53792464a26_rle_crop_3706415944_0.png.png imagette213110211741726019/1741725732_1782364_1343210168_f98b9adccdf1a8c95b78d67139bc3f0c_rle_crop_3706422785_0.png.png imagette213110211741726019/1741725390_2535016_1343209024_0405c04af1ed63d5eee7bed087752904_rle_crop_3706417969_0.png.png imagette213110211741726019/1741725892_1783764_1343210676_865ff95132712f9fbb590dad43072a88_rle_crop_3706428392_0.png.png imagette213110211741726019/1741725631_2541041_1343209520_2478f834ff7bacb651235501815116f2_rle_crop_3706421340_0.png.png imagette213110211741726019/1741725613_1781437_1343209500_c1ab7e81024b6f8df17cbca251d8b47f_rle_crop_3706421507_0.png.png imagette213110211741726019/1741725631_2541041_1343209448_913181ee472be93bf9556d327232d741_rle_crop_3706421345_0.png.png wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/18af22e42aba064dd25352aa61d9708d_76537839.png imagette213110211741726019 21311022 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=21311022 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209456: '1741725390_2535016_1343208916_2f234407bd61f16aa60fc4707ce1d7ec_rle_crop_3706419204_0.png', 1343211178: '1741725873_1783578_1343210868_a79baf6885f85bf7206d5e3829d50a06_rle_crop_3706428085_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/0af735e5d89a6f92b55efcfa591c5ca8_83484281.png change filename to text .imagette213110221741726020/ imagette213110221741726020/1741725873_1783578_1343210868_a79baf6885f85bf7206d5e3829d50a06_rle_crop_3706428085_0.png.png imagette213110221741726020/1741725390_2535016_1343208916_2f234407bd61f16aa60fc4707ce1d7ec_rle_crop_3706419204_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/d07deade5abf502abb9e1fcf181afc11_72607501.png imagette213110221741726020 21311031 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=21311031 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1343209429: '1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417978_0.png', 1343210440: '1741725613_1781437_1343209518_9cb0a74da8f5058b80b3ce71dfea614f_rle_crop_3706421376_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/9a9e63c819240b9b3d9a191dc71742f0_21164495.png change filename to text .imagette213110311741726020/ imagette213110311741726020/1741725613_1781437_1343209518_9cb0a74da8f5058b80b3ce71dfea614f_rle_crop_3706421376_0.png.png imagette213110311741726020/1741725376_1779319_1343209222_31e929703654618a9eb1b368a9dc09c7_rle_crop_3706417978_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/dfee2b3ebea727014413ff699b79c1cd_37885824.png imagette213110311741726020 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21310997 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21311033,21311034,21311035,21311036,21311037,21311038,21311039,21311040,21311041,21311042,21311043,21311044?tags=mal_croppe,papier,Teint_Dans_La_Masse,Carton_brun,environnement,kraft,autre_refus,plastique,metal,cartonnette,flou,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1343211388] : ('0.06385766272624296',) no score found for photo 1343211388 We are sending mail with results at report@fotonower.com args[1343211373] : ('0.06385766272624296',) no score found for photo 1343211373 We are sending mail with results at report@fotonower.com args[1343211364] : ('0.06385766272624296',) no score found for photo 1343211364 We are sending mail with results at report@fotonower.com args[1343211345] : ('0.06385766272624296',) no score found for photo 1343211345 We are sending mail with results at report@fotonower.com args[1343211319] : ('0.06385766272624296',) no score found for photo 1343211319 We are sending mail with results at report@fotonower.com args[1343211291] : ('0.06385766272624296',) no score found for photo 1343211291 We are sending mail with results at report@fotonower.com args[1343211113] : ('0.06385766272624296',) no score found for photo 1343211113 We are sending mail with results at report@fotonower.com args[1343211110] : ('0.06385766272624296',) no score found for photo 1343211110 We are sending mail with results at report@fotonower.com args[1343211106] : ('0.06385766272624296',) no score found for photo 1343211106 We are sending mail with results at report@fotonower.com args[1343211099] : ('0.06385766272624296',) no score found for photo 1343211099 We are sending mail with results at report@fotonower.com refus_total : 0.06385766272624296 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=21310997 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_P21310997_11-03-2025_21_46_57.pdf results_Auto_P21310997_11-03-2025_21_46_57.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21310997_11-03-2025_21_46_57.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','21310997','results_Auto_P21310997_11-03-2025_21_46_57.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21310997_11-03-2025_21_46_57.pdf','pdf','','0.27','0.06385766272624296') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21310997]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] map_info['map_portfolio_photo'] : {21310997: [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099, 1343211027, 1343211025, 1343211020, 1343211017, 1343211011, 1343210995, 1343210920, 1343210911, 1343210882, 1343210868, 1343210690, 1343210683, 1343210676, 1343210663, 1343210655, 1343210282, 1343210168, 1343210139, 1343209676, 1343209659, 1343209607, 1343209520, 1343209518, 1343209514, 1343209509, 1343209504, 1343209500, 1343209457, 1343209448, 1343209418, 1343209416, 1343209411, 1343209378, 1343209342, 1343209289, 1343209283, 1343209277, 1343209233, 1343209229, 1343209222, 1343209091, 1343209024, 1343209006, 1343208973, 1343208916, 1343208840, 1343208766, 1343208746, 1343208743, 1343208739, 1343208736, 1343208679, 1343208673, 1343208669, 1343208655]} final : False mtd_id 4302 list_pids : [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] 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, '2659701') ('4302', '21310997', '1343211388', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211373', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211364', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211345', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211319', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211291', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211113', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211110', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211106', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211099', None, None, None, None, None, '2659701') 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', '21310997', '1343211388', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211373', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211364', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211345', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211319', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211291', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211113', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211110', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211106', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211099', None, None, None, None, None, '2659701')] time used for this insertion : 0.013887166976928711 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.214056491851807 time spend to save output : 0.014220952987670898 total time spend for step 4 : 4.2282774448394775 step5:split_time_score Tue Mar 11 21:47: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 : ['21310997'] 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 : [('21310997',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21310997) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1343211388: {'path': 'temp/1741726017_2907886_1343211388_304a975684672351e4080709e8432fdc.jpg', 'extension': 'jpg'}, 1343211345: {'path': 'temp/1741726017_2907886_1343211345_2e8930211f2c15d3b8db769bb67ba68c.jpg', 'extension': 'jpg'}, 1343211364: {'path': 'temp/1741726017_2907886_1343211364_e3e88ad0302f0ea9ddadba02d9357946.jpg', 'extension': 'jpg'}, 1343211373: {'path': 'temp/1741726017_2907886_1343211373_c94d44ae38469307312d58b307c28835.jpg', 'extension': 'jpg'}, 1343211099: {'path': 'temp/1741726017_2907886_1343211099_e5ba2f25a42f8a1b142b835891e097b7.jpg', 'extension': 'jpg'}, 1343211106: {'path': 'temp/1741726017_2907886_1343211106_03056f7aaf1d53377d0e64e7e600cea7.jpg', 'extension': 'jpg'}, 1343211110: {'path': 'temp/1741726017_2907886_1343211110_2e1ee6e5eb21ce4e0a17d6b0a78453bc.jpg', 'extension': 'jpg'}, 1343211113: {'path': 'temp/1741726017_2907886_1343211113_49903c002bb565655916c8f76359a319.jpg', 'extension': 'jpg'}, 1343211291: {'path': 'temp/1741726017_2907886_1343211291_bcebc827e2e3d537988eb0c62649947f.jpg', 'extension': 'jpg'}, 1343211319: {'path': 'temp/1741726017_2907886_1343211319_6c095281a85b0b0ed7824fcae06989f4.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 = 21310997; (('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 = 21310997 group by h (('21', 65),) 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=21310997 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 (21310997) 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 (21310997) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 11032025 21310997 Nombre de photos uploadées : 65 / 23040 (0%) 11032025 21310997 Nombre de photos taguées (types de déchets): 0 / 65 (0%) 11032025 21310997 Nombre de photos taguées (volume) : 0 / 65 (0%) [{'photo_id': 1343208679, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/0b6b73c6f1510cd85b41b0de3f00aa77.jpg', 'username': None, 'uploaded_at': 1741725099, 'text': 'image_11032025_21_30_04_010164m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1343208673, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/7ad0c196a1c3ae5ab697d9cb915c07c4.jpg', 'username': None, 'uploaded_at': 1741725099, 'text': 'image_11032025_21_30_14_010133m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1343208669, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/b0892020d1808d93985d57c79d9c0eeb.jpg', 'username': None, 'uploaded_at': 1741725099, 'text': 'image_11032025_21_30_25_010133m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1343208655, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/9070b879fb5ffeeb477a25e6a9d9e4cd.jpg', 'username': None, 'uploaded_at': 1741725099, 'text': 'image_11032025_21_30_44_010141m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 4.291534423828125e-06 elapsed_time : order_list_meta_photo_and_scores 1.2636184692382812e-05 ????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0031287670135498047 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21310997, '2025-03-11' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1656727,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.028824567794799805 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= 1656727 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1656727, 'dashboard_run_id': 1667975, 'mtr_portfolio_id': 21310213, 'dashboard_result_id': 9364500, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21310214, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21310215, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21310216, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21310217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21310218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21310219, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21310220, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21310221, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21310222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21310223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21310224, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21310225, 'pht': 3726}}"}, {'dashboat_entry_day': 1656727, 'dashboard_run_id': 1667975, 'mtr_portfolio_id': 21310476, 'dashboard_result_id': 9364501, '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_P21310476_11-03-2025_21_33_36.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21310505, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21310506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21310507, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21310508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21310509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21310510, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21310511, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21310512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21310513, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21310514, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21310515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21310516, 'pht': 3726}}"}, {'dashboat_entry_day': 1656727, 'dashboard_run_id': 1667975, 'mtr_portfolio_id': 21310997, 'dashboard_result_id': 9364502, '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_P21310997_11-03-2025_21_45_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21311019, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21311020, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21311021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21311022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21311023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21311024, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21311025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21311027, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21311028, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21311029, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21311030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21311031, '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 = 21310213 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': 2659643, 'mtr_portfolio_id': 21310213, 'created_at': datetime.datetime(2025, 3, 11, 21, 19, 59), 'result': '0.08173754257695107', 'result_long': None, 'result_double': None}] Qualite : 0.08173754257695107 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21310213 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%21310213%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21310213 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21310214, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21310215, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21310216, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21310217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21310218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21310219, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21310220, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21310221, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21310222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21310223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21310224, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21310225, 'pht': 3726}, 'url_report': ''}" where mtr_portfolio_id = 21310213 and dashboard_run_id = 1667975 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`=21310213 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9364500, 0.08173754257695107, "{'max_time_prod_two_photos': 0, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21310214, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21310215, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21310216, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21310217, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21310218, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21310219, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21310220, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21310221, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21310222, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21310223, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21310224, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21310225, 'pht': 3726}, 'url_report': ''}") 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 = 21310476 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': 2659663, 'mtr_portfolio_id': 21310476, 'created_at': datetime.datetime(2025, 3, 11, 21, 33, 36), 'result': '0.07168354068959866', 'result_long': None, 'result_double': None}] Qualite : 0.07168354068959866 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21310476 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21310476_11-03-2025_21_33_36.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21310476 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_P21310476_11-03-2025_21_33_36.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21310505, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21310506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21310507, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21310508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21310509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21310510, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21310511, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21310512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21310513, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21310514, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21310515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21310516, 'pht': 3726}}" where mtr_portfolio_id = 21310476 and dashboard_run_id = 1667975 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`=21310476 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9364501, 0.07168354068959866, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21310476_11-03-2025_21_33_36.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21310505, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21310506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21310507, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21310508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21310509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21310510, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21310511, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21310512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21310513, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21310514, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21310515, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21310516, '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 = 21310997 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': 2659701, 'mtr_portfolio_id': 21310997, 'created_at': datetime.datetime(2025, 3, 11, 21, 46, 57), 'result': '0.06385766272624296', 'result_long': None, 'result_double': None}] Qualite : 0.06385766272624296 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21310997 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21310997_11-03-2025_21_46_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21310997 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_P21310997_11-03-2025_21_46_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21311019, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21311020, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21311021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21311022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21311023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21311024, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21311025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21311027, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21311028, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21311029, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21311030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21311031, 'pht': 3726}}" where mtr_portfolio_id = 21310997 and dashboard_run_id = 1667975 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`=21310997 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9364502, 0.06385766272624296, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21310997_11-03-2025_21_46_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21311019, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21311020, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21311021, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21311022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21311023, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21311024, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21311025, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21311027, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21311028, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21311029, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21311030, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21311031, '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 (21310213,21310476,21310997) result : ((1343199623,), (1343201302,), (1343201340,), (1343201342,), (1343201347,), (1343201614,), (1343201768,), (1343201781,), (1343201818,), (1343201829,), (1343202177,), (1343202192,), (1343202206,), (1343202232,), (1343202253,), (1343202426,), (1343202434,), (1343202439,), (1343202799,), (1343202837,), (1343203444,), (1343203542,), (1343203592,), (1343203615,), (1343203678,), (1343204357,), (1343204158,), (1343204213,), (1343204220,), (1343204295,), (1343204681,), (1343204695,), (1343204711,), (1343204733,), (1343204756,), (1343204933,), (1343204953,), (1343205292,), (1343205296,), (1343205301,), (1343205306,), (1343205318,), (1343205412,), (1343205456,), (1343205493,), (1343205559,), (1343205609,), (1343205672,), (1343205986,), (1343206022,), (1343206046,), (1343206297,), (1343206367,), (1343206389,), (1343206405,), (1343206431,), (1343206450,), (1343206541,), (1343206569,), (1343206594,), (1343206625,), (1343206643,), (1343206823,), (1343206850,), (1343206877,), (1343206902,), (1343207191,), (1343207269,), (1343207300,), (1343207420,), (1343207470,), (1343207500,), (1343207694,), (1343207723,), (1343207728,), (1343207733,), (1343207735,), (1343207747,), (1343207772,), (1343207785,), (1343207791,), (1343207835,), (1343207840,), (1343207851,), (1343207870,), (1343207876,), (1343207941,), (1343208345,), (1343208407,), (1343208424,), (1343208429,), (1343208434,), (1343208451,), (1343208520,), (1343208523,), (1343208527,), (1343208683,), (1343208655,), (1343208669,), (1343208673,), (1343208679,), (1343208736,), (1343208739,), (1343208743,), (1343208746,), (1343208766,), (1343208840,), (1343208916,), (1343208973,), (1343209006,), (1343209024,), (1343209091,), (1343209222,), (1343209229,), (1343209233,), (1343209277,), (1343209283,), (1343209289,), (1343209342,), (1343209378,), (1343209411,), (1343209416,), (1343209418,), (1343209448,), (1343209457,), (1343209500,), (1343209504,), (1343209509,), (1343209514,), (1343209518,), (1343209520,), (1343209607,), (1343209659,), (1343209676,), (1343210139,), (1343210168,), (1343210282,), (1343210655,), (1343210663,), (1343210676,), (1343210683,), (1343210690,), (1343210868,), (1343210882,), (1343210911,), (1343210920,), (1343210995,), (1343211011,), (1343211017,), (1343211020,), (1343211025,), (1343211027,), (1343211099,), (1343211106,), (1343211110,), (1343211113,), (1343211291,), (1343211319,), (1343211345,), (1343211364,), (1343211373,), (1343211388,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'11032025': {'nb_upload': 65, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21310997]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] map_info['map_portfolio_photo'] : {21310997: [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099, 1343211027, 1343211025, 1343211020, 1343211017, 1343211011, 1343210995, 1343210920, 1343210911, 1343210882, 1343210868, 1343210690, 1343210683, 1343210676, 1343210663, 1343210655, 1343210282, 1343210168, 1343210139, 1343209676, 1343209659, 1343209607, 1343209520, 1343209518, 1343209514, 1343209509, 1343209504, 1343209500, 1343209457, 1343209448, 1343209418, 1343209416, 1343209411, 1343209378, 1343209342, 1343209289, 1343209283, 1343209277, 1343209233, 1343209229, 1343209222, 1343209091, 1343209024, 1343209006, 1343208973, 1343208916, 1343208840, 1343208766, 1343208746, 1343208743, 1343208739, 1343208736, 1343208679, 1343208673, 1343208669, 1343208655]} final : True mtd_id 4302 list_pids : [1343211388, 1343211373, 1343211364, 1343211345, 1343211319, 1343211291, 1343211113, 1343211110, 1343211106, 1343211099] Looping around the photos to save general results len do output : 1 /21310997Didn'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, '2659701') ('4302', '21310997', '1343211388', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211373', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211364', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211345', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211319', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211291', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211113', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211110', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211106', None, None, None, None, None, '2659701') ('4302', None, None, None, None, None, None, None, '2659701') ('4302', '21310997', '1343211099', None, None, None, None, None, '2659701') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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, '21310997', 'None', None, None, None, None, '2659701'), ('4302', '21310997', '1343211388', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211373', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211364', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211345', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211319', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211291', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211113', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211110', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211106', None, None, None, None, None, '2659701'), ('4302', '21310997', '1343211099', None, None, None, None, None, '2659701')] time used for this insertion : 0.013674497604370117 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4347820281982422 time spend to save output : 0.014001846313476562 total time spend for step 5 : 1.4487838745117188 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 (2659701) 2.25user 2.28system 0:08.78elapsed 51%CPU (0avgtext+0avgdata 162232maxresident)k 224inputs+12880outputs (19major+75443minor)pagefaults 0swaps