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 : 832221 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 (2901084) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2901084) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151453 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2901084'] with mtr_portfolio_ids : ['23151453'] and first list_photo_ids : [] new path : /proc/832221/ Name: python3 Umask: 0002 State: R (running) Tgid: 832221 Ngid: 0 Pid: 832221 PPid: 832220 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 832221 NSpid: 832221 NSpgid: 816960 NSsid: 816960 VmPeak: 1107228 kB VmSize: 1107228 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98704 kB VmRSS: 98700 kB RssAnon: 60200 kB RssFile: 38500 kB RssShmem: 0 kB VmData: 865976 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 1/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: 102 nonvoluntary_ctxt_switches: 160 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '832221', 'Ngid': '0', 'Pid': '832221', 'PPid': '832220', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '832221', 'NSpid': '832221', 'NSpgid': '816960', 'NSsid': '816960', 'VmPeak': '1107228 kB', 'VmSize': '1107228 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98704 kB', 'VmRSS': '98700 kB', 'RssAnon': '60200 kB', 'RssFile': '38500 kB', 'RssShmem': '0 kB', 'VmData': '865976 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '1/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': '102', 'nonvoluntary_ctxt_switches': '160'} ('datou_batch_current', '832221', '1107228', '0', '1107228', '865976', '98700', b'', 'marlene', '2901084') 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 (23151453) 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 (2901084 ) ) 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 (23151453) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1359753466, 'portfolio_id': 23151453}, {'photo_id': 1359753464, 'portfolio_id': 23151453}, {'photo_id': 1359753461, 'portfolio_id': 23151453}, {'photo_id': 1359753459, 'portfolio_id': 23151453}, {'photo_id': 1359753446, 'portfolio_id': 23151453}, {'photo_id': 1359752998, 'portfolio_id': 23151453}, {'photo_id': 1359752996, 'portfolio_id': 23151453}, {'photo_id': 1359752993, 'portfolio_id': 23151453}, {'photo_id': 1359752984, 'portfolio_id': 23151453}, {'photo_id': 1359752981, 'portfolio_id': 23151453}, {'photo_id': 1359752966, 'portfolio_id': 23151453}, {'photo_id': 1359752965, 'portfolio_id': 23151453}, {'photo_id': 1359752964, 'portfolio_id': 23151453}, {'photo_id': 1359752963, 'portfolio_id': 23151453}, {'photo_id': 1359752961, 'portfolio_id': 23151453}, {'photo_id': 1359752959, 'portfolio_id': 23151453}, {'photo_id': 1359752939, 'portfolio_id': 23151453}, {'photo_id': 1359752934, 'portfolio_id': 23151453}, {'photo_id': 1359752926, 'portfolio_id': 23151453}, {'photo_id': 1359752924, 'portfolio_id': 23151453}, {'photo_id': 1359752877, 'portfolio_id': 23151453}, {'photo_id': 1359752876, 'portfolio_id': 23151453}, {'photo_id': 1359752874, 'portfolio_id': 23151453}, {'photo_id': 1359752872, 'portfolio_id': 23151453}, {'photo_id': 1359752867, 'portfolio_id': 23151453}, {'photo_id': 1359752837, 'portfolio_id': 23151453}, {'photo_id': 1359752834, 'portfolio_id': 23151453}, {'photo_id': 1359752832, 'portfolio_id': 23151453}, {'photo_id': 1359752831, 'portfolio_id': 23151453}, {'photo_id': 1359752829, 'portfolio_id': 23151453}, {'photo_id': 1359752814, 'portfolio_id': 23151453}, {'photo_id': 1359752812, 'portfolio_id': 23151453}, {'photo_id': 1359752811, 'portfolio_id': 23151453}, {'photo_id': 1359752808, 'portfolio_id': 23151453}, {'photo_id': 1359752803, 'portfolio_id': 23151453}, {'photo_id': 1359752782, 'portfolio_id': 23151453}, {'photo_id': 1359752780, 'portfolio_id': 23151453}, {'photo_id': 1359752777, 'portfolio_id': 23151453}, {'photo_id': 1359752775, 'portfolio_id': 23151453}, {'photo_id': 1359752755, 'portfolio_id': 23151453}, {'photo_id': 1359752754, 'portfolio_id': 23151453}, {'photo_id': 1359752748, 'portfolio_id': 23151453}, {'photo_id': 1359752740, 'portfolio_id': 23151453}, {'photo_id': 1359752728, 'portfolio_id': 23151453}, {'photo_id': 1359752709, 'portfolio_id': 23151453}, {'photo_id': 1359752596, 'portfolio_id': 23151453}, {'photo_id': 1359752582, 'portfolio_id': 23151453}, {'photo_id': 1359752580, 'portfolio_id': 23151453}, {'photo_id': 1359752570, 'portfolio_id': 23151453}, {'photo_id': 1359752461, 'portfolio_id': 23151453}, {'photo_id': 1359752459, 'portfolio_id': 23151453}, {'photo_id': 1359752457, 'portfolio_id': 23151453}, {'photo_id': 1359752455, 'portfolio_id': 23151453}, {'photo_id': 1359752454, 'portfolio_id': 23151453}, {'photo_id': 1359752451, 'portfolio_id': 23151453}] map_portfolio_id_photo_id: {23151453: [1359753466, 1359753464, 1359753461, 1359753459, 1359753446, 1359752998, 1359752996, 1359752993, 1359752984, 1359752981, 1359752966, 1359752965, 1359752964, 1359752963, 1359752961, 1359752959, 1359752939, 1359752934, 1359752926, 1359752924, 1359752877, 1359752876, 1359752874, 1359752872, 1359752867, 1359752837, 1359752834, 1359752832, 1359752831, 1359752829, 1359752814, 1359752812, 1359752811, 1359752808, 1359752803, 1359752782, 1359752780, 1359752777, 1359752775, 1359752755, 1359752754, 1359752748, 1359752740, 1359752728, 1359752709, 1359752596, 1359752582, 1359752580, 1359752570, 1359752461, 1359752459, 1359752457, 1359752455, 1359752454, 1359752451]} ##### 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.015254974365234375 #### 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 May 20 06:01:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23151453) 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 : 23151453 get user id for portfolio 23151453 get sub ptf for main ptf 23151453, type 3726 and hashtags ['Carton_gris', 'Teint_Dans_La_Masse', 'flou', 'environnement', 'autre_refus', 'Carton_brun', 'cartonnette', 'metal', 'plastique', 'papier', 'kraft', 'mal_croppe'] 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`=23151453 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','flou','environnement','autre_refus','Carton_brun','cartonnette','metal','plastique','papier','kraft','mal_croppe')) 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`=23151453 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','flou','environnement','autre_refus','Carton_brun','cartonnette','metal','plastique','papier','kraft','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 23151453, 'sub_port_id': 23151484, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448400, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'environnement': {'main_port_id': 23151453, 'sub_port_id': 23151485, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448401, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'mal_croppe': {'main_port_id': 23151453, 'sub_port_id': 23151486, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448402, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'flou': {'main_port_id': 23151453, 'sub_port_id': 23151487, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448403, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'autre_refus': {'main_port_id': 23151453, 'sub_port_id': 23151488, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448404, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'Carton_brun': {'main_port_id': 23151453, 'sub_port_id': 23151489, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448405, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 23151453, 'sub_port_id': 23151490, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448406, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'metal': {'main_port_id': 23151453, 'sub_port_id': 23151491, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448407, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'plastique': {'main_port_id': 23151453, 'sub_port_id': 23151492, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448408, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'kraft': {'main_port_id': 23151453, 'sub_port_id': 23151493, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448409, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'Carton_gris': {'main_port_id': 23151453, 'sub_port_id': 23151494, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448410, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}, 'papier': {'main_port_id': 23151453, 'sub_port_id': 23151495, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448411, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151484 , 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=23151453 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 (23151484) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151485 , 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=23151453 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 (23151485) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151486 , 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=23151453 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 (23151486) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151487 , 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=23151453 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 (23151487) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151488 , 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=23151453 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 (23151488) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151489 , 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=23151453 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 (23151489) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151490 , 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=23151453 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 (23151490) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151491 , 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=23151453 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 (23151491) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151492 , 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=23151453 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 (23151492) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151493 , 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=23151453 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 (23151493) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151494 , 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=23151453 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 (23151494) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 23151495 , 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=23151453 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 (23151495) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23151453) result : ((1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=23151453 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','flou','environnement','autre_refus','Carton_brun','cartonnette','metal','plastique','papier','kraft','mal_croppe')) 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`=23151453 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','flou','environnement','autre_refus','Carton_brun','cartonnette','metal','plastique','papier','kraft','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 23151453, 'sub_port_id': 23151496, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448412, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'environnement': {'main_port_id': 23151453, 'sub_port_id': 23151497, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448413, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'mal_croppe': {'main_port_id': 23151453, 'sub_port_id': 23151498, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448414, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'flou': {'main_port_id': 23151453, 'sub_port_id': 23151499, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448415, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'autre_refus': {'main_port_id': 23151453, 'sub_port_id': 23151500, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448416, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'Carton_brun': {'main_port_id': 23151453, 'sub_port_id': 23151501, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448417, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 23151453, 'sub_port_id': 23151502, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448418, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'metal': {'main_port_id': 23151453, 'sub_port_id': 23151503, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448419, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'plastique': {'main_port_id': 23151453, 'sub_port_id': 23151504, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448420, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'kraft': {'main_port_id': 23151453, 'sub_port_id': 23151505, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448421, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'Carton_gris': {'main_port_id': 23151453, 'sub_port_id': 23151506, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448422, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}, 'papier': {'main_port_id': 23151453, 'sub_port_id': 23151507, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15448423, 'last_updated_at': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_desc': datetime.datetime(2025, 5, 20, 5, 59), 'last_updated_at_asc': datetime.datetime(2025, 5, 20, 5, 50, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151496,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151484 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151497,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151485 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151498,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151486 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151499,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151487 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151500,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151488 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151501,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151489 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151502,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151490 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151503,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151491 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151504,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151492 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151505,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151493 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151506,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151494 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 23151507,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 23151495 lien utilise dans velours : https://www.fotonower.com/velours/23151496,23151497,23151498,23151499,23151500,23151501,23151502,23151503,23151504,23151505,23151506,23151507?tags=cartonnette,environnement,mal_croppe,flou,autre_refus,Carton_brun,Teint_Dans_La_Masse,metal,plastique,kraft,Carton_gris,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23151453]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] map_info['map_portfolio_photo'] : {23151453: [1359753466, 1359753464, 1359753461, 1359753459, 1359753446, 1359752998, 1359752996, 1359752993, 1359752984, 1359752981, 1359752966, 1359752965, 1359752964, 1359752963, 1359752961, 1359752959, 1359752939, 1359752934, 1359752926, 1359752924, 1359752877, 1359752876, 1359752874, 1359752872, 1359752867, 1359752837, 1359752834, 1359752832, 1359752831, 1359752829, 1359752814, 1359752812, 1359752811, 1359752808, 1359752803, 1359752782, 1359752780, 1359752777, 1359752775, 1359752755, 1359752754, 1359752748, 1359752740, 1359752728, 1359752709, 1359752596, 1359752582, 1359752580, 1359752570, 1359752461, 1359752459, 1359752457, 1359752455, 1359752454, 1359752451]} final : False mtd_id 4302 list_pids : [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] Looping around the photos to save general results len do output : 1 /23151453. 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, '2901084') ('4302', '23151453', '1359753466', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753464', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753461', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753459', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753446', None, None, None, None, None, '2901084') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '23151453', "{'cartonnette': 23151484, 'environnement': 23151485, 'mal_croppe': 23151486, 'flou': 23151487, 'autre_refus': 23151488, 'Carton_brun': 23151489, 'Teint_Dans_La_Masse': 23151490, 'metal': 23151491, 'plastique': 23151492, 'kraft': 23151493, 'Carton_gris': 23151494, 'papier': 23151495}", None, None, None, None, '2901084'), ('4302', '23151453', '1359753466', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753464', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753461', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753459', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753446', None, None, None, None, None, '2901084')] time used for this insertion : 0.2633814811706543 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4384639263153076 time spend to save output : 0.2636833190917969 total time spend for step 1 : 1.7021472454071045 step2:final Tue May 20 06:01:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23151453) 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 23151453 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1359752461,1359752459,1359752457,1359752455,1359752454,1359752451,1359752596,1359752582,1359752580,1359752570,1359752755,1359752754,1359752748,1359752740,1359752728,1359752709,1359752782,1359752780,1359752777,1359752775,1359752814,1359752803,1359752812,1359752811,1359752808,1359752837,1359752834,1359752832,1359752831,1359752829,1359752877,1359752876,1359752874,1359752872,1359752867,1359752939,1359752934,1359752926,1359752924,1359752966,1359752965,1359752964,1359752963,1359752961,1359752959,1359752998,1359752996,1359752993,1359752984,1359752981,1359753466,1359753464,1359753461,1359753459,1359753446); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23151453]) Inside saveOutput : final : False verbose : True original output for save of step final : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} new output for save of step final : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] map_info['map_portfolio_photo'] : {23151453: [1359753466, 1359753464, 1359753461, 1359753459, 1359753446, 1359752998, 1359752996, 1359752993, 1359752984, 1359752981, 1359752966, 1359752965, 1359752964, 1359752963, 1359752961, 1359752959, 1359752939, 1359752934, 1359752926, 1359752924, 1359752877, 1359752876, 1359752874, 1359752872, 1359752867, 1359752837, 1359752834, 1359752832, 1359752831, 1359752829, 1359752814, 1359752812, 1359752811, 1359752808, 1359752803, 1359752782, 1359752780, 1359752777, 1359752775, 1359752755, 1359752754, 1359752748, 1359752740, 1359752728, 1359752709, 1359752596, 1359752582, 1359752580, 1359752570, 1359752461, 1359752459, 1359752457, 1359752455, 1359752454, 1359752451]} final : False mtd_id 4302 list_pids : [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] Looping around the photos to save general results len do output : 5 /1359753466.Didn't retrieve data . /1359753464.Didn't retrieve data . /1359753461.Didn't retrieve data . /1359753459.Didn't retrieve data . /1359753446.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, '2901084') ('4302', '23151453', '1359753466', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753464', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753461', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753459', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753446', None, None, None, None, None, '2901084') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '23151453', '1359753466', '0.0', None, None, None, None, '2901084'), ('4302', '23151453', '1359753464', '0.0', None, None, None, None, '2901084'), ('4302', '23151453', '1359753461', '0.0', None, None, None, None, '2901084'), ('4302', '23151453', '1359753459', '0.0', None, None, None, None, '2901084'), ('4302', '23151453', '1359753446', '0.0', None, None, None, None, '2901084')] time used for this insertion : 0.18715119361877441 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05182695388793945 time spend to save output : 0.18752169609069824 total time spend for step 2 : 0.2393486499786377 step3:velours_tree Tue May 20 06:01:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {23151453: [{'cartonnette': 23151484, 'environnement': 23151485, 'mal_croppe': 23151486, 'flou': 23151487, 'autre_refus': 23151488, 'Carton_brun': 23151489, 'Teint_Dans_La_Masse': 23151490, 'metal': 23151491, 'plastique': 23151492, 'kraft': 23151493, 'Carton_gris': 23151494, 'papier': 23151495}]} input_args_next_step : {23151453: ()} output_args : {23151453: [{'cartonnette': 23151484, 'environnement': 23151485, 'mal_croppe': 23151486, 'flou': 23151487, 'autre_refus': 23151488, 'Carton_brun': 23151489, 'Teint_Dans_La_Masse': 23151490, 'metal': 23151491, 'plastique': 23151492, 'kraft': 23151493, 'Carton_gris': 23151494, 'papier': 23151495}]} args : 23151453 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 : ({'cartonnette': 23151484, 'environnement': 23151485, 'mal_croppe': 23151486, 'flou': 23151487, 'autre_refus': 23151488, 'Carton_brun': 23151489, 'Teint_Dans_La_Masse': 23151490, 'metal': 23151491, 'plastique': 23151492, 'kraft': 23151493, 'Carton_gris': 23151494, 'papier': 23151495},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23151453) 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([23151453]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 1.6201908588409424 time spend to save output : 7.724761962890625e-05 total time spend for step 3 : 1.6202681064605713 step4:send_mail_cod Tue May 20 06:01:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} input_args_next_step : {1359753466: ()} output_args : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} args : 1359753466 depend.output_id : 0 input_args_next_step : {1359753466: ('0.0',), 1359753464: ()} output_args : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} args : 1359753464 depend.output_id : 0 input_args_next_step : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ()} output_args : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} args : 1359753461 depend.output_id : 0 input_args_next_step : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ()} output_args : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} args : 1359753459 depend.output_id : 0 input_args_next_step : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ()} output_args : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',)} args : 1359753446 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 : {23151453: [{'cartonnette': 23151484, 'environnement': 23151485, 'mal_croppe': 23151486, 'flou': 23151487, 'autre_refus': 23151488, 'Carton_brun': 23151489, 'Teint_Dans_La_Masse': 23151490, 'metal': 23151491, 'plastique': 23151492, 'kraft': 23151493, 'Carton_gris': 23151494, 'papier': 23151495}]} input_args_next_step : {1359753466: ('0.0',), 1359753464: ('0.0',), 1359753461: ('0.0',), 1359753459: ('0.0',), 1359753446: ('0.0',), 23151453: ()} output_args : {23151453: [{'cartonnette': 23151484, 'environnement': 23151485, 'mal_croppe': 23151486, 'flou': 23151487, 'autre_refus': 23151488, 'Carton_brun': 23151489, 'Teint_Dans_La_Masse': 23151490, 'metal': 23151491, 'plastique': 23151492, 'kraft': 23151493, 'Carton_gris': 23151494, 'papier': 23151495}]} args : 23151453 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :6, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23151453) 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 (1359753466,1359753464,1359753461,1359753459,1359753446) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1359753446 begin to download photo : 1359753461 begin to download photo : 1359753466 download finish for photo 1359753446 begin to download photo : 1359753459 download finish for photo 1359753461 begin to download photo : 1359753464 download finish for photo 1359753466 download finish for photo 1359753459 download finish for photo 1359753464 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette231514841747713664/ imagette231514861747713664/ imagette231514871747713664/ imagette231514881747713664/ imagette231514911747713664/ imagette231514921747713664/ imagette231514931747713664/ imagette231514891747713664/ imagette231514901747713664/ imagette231514941747713664/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P23151453_20-05-2025_06_01_04.pdf 23151484 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=23151484 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514841747713664 23151486 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=23151486 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514861747713664 23151487 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=23151487 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514871747713664 23151488 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=23151488 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514881747713664 23151491 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=23151491 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514911747713664 23151492 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=23151492 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514921747713664 23151493 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=23151493 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514931747713664 23151489 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=23151489 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514891747713664 23151490 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=23151490 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514901747713664 23151494 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=23151494 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette231514941747713664 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=23151453 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/23151496,23151497,23151498,23151499,23151500,23151501,23151502,23151503,23151504,23151505,23151506,23151507?tags=cartonnette,environnement,mal_croppe,flou,autre_refus,Carton_brun,Teint_Dans_La_Masse,metal,plastique,kraft,Carton_gris,papier your option no_mail is active, we will not send the real mail to your client args[1359753466] : ('0.0',) no score found for photo 1359753466 We are sending mail with results at report@fotonower.com args[1359753464] : ('0.0',) no score found for photo 1359753464 We are sending mail with results at report@fotonower.com args[1359753461] : ('0.0',) no score found for photo 1359753461 We are sending mail with results at report@fotonower.com args[1359753459] : ('0.0',) no score found for photo 1359753459 We are sending mail with results at report@fotonower.com args[1359753446] : ('0.0',) no score found for photo 1359753446 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=23151453 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_P23151453_20-05-2025_06_01_04.pdf results_Auto_P23151453_20-05-2025_06_01_04.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23151453_20-05-2025_06_01_04.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','23151453','results_Auto_P23151453_20-05-2025_06_01_04.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23151453_20-05-2025_06_01_04.pdf','pdf','','0.07','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23151453]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] map_info['map_portfolio_photo'] : {23151453: [1359753466, 1359753464, 1359753461, 1359753459, 1359753446, 1359752998, 1359752996, 1359752993, 1359752984, 1359752981, 1359752966, 1359752965, 1359752964, 1359752963, 1359752961, 1359752959, 1359752939, 1359752934, 1359752926, 1359752924, 1359752877, 1359752876, 1359752874, 1359752872, 1359752867, 1359752837, 1359752834, 1359752832, 1359752831, 1359752829, 1359752814, 1359752812, 1359752811, 1359752808, 1359752803, 1359752782, 1359752780, 1359752777, 1359752775, 1359752755, 1359752754, 1359752748, 1359752740, 1359752728, 1359752709, 1359752596, 1359752582, 1359752580, 1359752570, 1359752461, 1359752459, 1359752457, 1359752455, 1359752454, 1359752451]} final : False mtd_id 4302 list_pids : [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] 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, '2901084') ('4302', '23151453', '1359753466', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753464', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753461', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753459', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753446', None, None, None, None, None, '2901084') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '23151453', '1359753466', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753464', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753461', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753459', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753446', None, None, None, None, None, '2901084')] time used for this insertion : 0.05068850517272949 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4649035930633545 time spend to save output : 0.0509645938873291 total time spend for step 4 : 1.5158681869506836 step5:split_time_score Tue May 20 06:01:05 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 : ['23151453'] 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 : [('23151453',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (23151453) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1359753466: {'path': 'temp/1747713663_832221_1359753466_df3f76156b9487d5b719cf5d86a7b595.jpg', 'extension': 'jpg'}, 1359753446: {'path': 'temp/1747713663_832221_1359753446_547c476f0b7df847cf371c2903998ff9.jpg', 'extension': 'jpg'}, 1359753459: {'path': 'temp/1747713663_832221_1359753459_637e331bfb1a5852f6b0e9b712aee3e0.jpg', 'extension': 'jpg'}, 1359753461: {'path': 'temp/1747713663_832221_1359753461_615a9cdc23f2170d68365e418437c13c.jpg', 'extension': 'jpg'}, 1359753464: {'path': 'temp/1747713663_832221_1359753464_e4820732bcd56987d1c4761c558dc12f.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 = 23151453; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('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 = 23151453 group by h (('05', 55),) 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=23151453 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 (23151453) 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 (23151453) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 20052025 23151453 Nombre de photos uploadées : 55 / 23040 (0%) 20052025 23151453 Nombre de photos taguées (types de déchets): 0 / 55 (0%) 20052025 23151453 Nombre de photos taguées (volume) : 0 / 55 (0%) [{'photo_id': 1359752461, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/20/c4716911426bfe216be652136a471025.jpg', 'username': None, 'uploaded_at': 1747712947, 'text': 'image_20052025_05_47_34_10142.jpg'}, {'photo_id': 1359752459, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/20/235e0552d724b978fa7472772de84493.jpg', 'username': None, 'uploaded_at': 1747712947, 'text': 'image_20052025_05_48_03_9133.jpg'}, {'photo_id': 1359752457, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/20/4c23e250f539a07c50eb4281f8ecbef0.jpg', 'username': None, 'uploaded_at': 1747712947, 'text': 'image_20052025_05_48_14_10134.jpg'}, {'photo_id': 1359752455, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/20/ef5107f7c05263ddb51b590b029e46c5.jpg', 'username': None, 'uploaded_at': 1747712947, 'text': 'image_20052025_05_48_24_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 8.106231689453125e-06 ??????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.00189971923828125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 23151453, '2025-05-20' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1820738,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.07295346260070801 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= 1820738 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1820738, 'dashboard_run_id': 1828891, 'mtr_portfolio_id': 23148156, 'dashboard_result_id': 10714208, '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_P23148156_20-05-2025_05_58_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23148157, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23148158, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23148159, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23148160, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23148161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23148162, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23148163, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23148164, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23148165, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23148166, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23148167, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23148168, 'pht': 3726}}"}, {'dashboat_entry_day': 1820738, 'dashboard_run_id': 1828891, 'mtr_portfolio_id': 23150404, 'dashboard_result_id': 10714210, '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_P23150404_20-05-2025_05_58_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150408, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150409, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150410, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150411, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150412, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150413, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23150414, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150415, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150416, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150418, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150419, 'pht': 3726}}"}, {'dashboat_entry_day': 1820738, 'dashboard_run_id': 1828891, 'mtr_portfolio_id': 23150574, 'dashboard_result_id': 10714212, '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_P23150574_20-05-2025_05_32_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150577, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150578, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23150582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150584, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150585, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150586, 'pht': 3726}}"}, {'dashboat_entry_day': 1820738, 'dashboard_run_id': 1828891, 'mtr_portfolio_id': 23150983, 'dashboard_result_id': 10714213, '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_P23150983_20-05-2025_05_48_56.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23150987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150990, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150995, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150998, 'pht': 3726}}"}, {'dashboat_entry_day': 1820738, 'dashboard_run_id': 1828891, 'mtr_portfolio_id': 23151453, 'dashboard_result_id': 10714214, '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_P23151453_20-05-2025_05_59_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23151484, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23151485, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23151486, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23151487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23151488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23151489, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23151490, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23151491, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23151492, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23151493, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23151494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23151495, '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 = 23148156 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': 2900956, 'mtr_portfolio_id': 23148156, 'created_at': datetime.datetime(2025, 5, 20, 5, 58), 'result': '0.03466790997904054', 'result_long': None, 'result_double': None}] Qualite : 0.03466790997904054 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23148156 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23148156_20-05-2025_05_58_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23148156 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_P23148156_20-05-2025_05_58_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23148157, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23148158, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23148159, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23148160, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23148161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23148162, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23148163, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23148164, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23148165, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23148166, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23148167, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23148168, 'pht': 3726}}" where mtr_portfolio_id = 23148156 and dashboard_run_id = 1828891 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`=23148156 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10714208, 0.03466790997904054, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23148156_20-05-2025_05_58_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23148157, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23148158, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23148159, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23148160, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23148161, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23148162, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23148163, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23148164, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23148165, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23148166, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23148167, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23148168, '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 = 23150404 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 23150404 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 23150404 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23150404 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23150404 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2900957, 'mtr_portfolio_id': 23150404, 'created_at': datetime.datetime(2025, 5, 20, 5, 58, 31), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23150404 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23150404_20-05-2025_05_58_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23150404 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_P23150404_20-05-2025_05_58_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150408, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150409, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150410, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150411, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150412, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150413, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23150414, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150415, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150416, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150418, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150419, 'pht': 3726}}" where mtr_portfolio_id = 23150404 and dashboard_run_id = 1828891 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`=23150404 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10714210, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23150404_20-05-2025_05_58_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150408, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150409, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150410, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150411, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150412, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150413, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23150414, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150415, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150416, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150417, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150418, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150419, '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 = 23150574 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': 2900958, 'mtr_portfolio_id': 23150574, 'created_at': datetime.datetime(2025, 5, 20, 5, 59, 28), 'result': '0.037850643117095364', 'result_long': None, 'result_double': None}] Qualite : 0.037850643117095364 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23150574 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23150574_20-05-2025_05_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23150574 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_P23150574_20-05-2025_05_32_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150577, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150578, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23150582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150584, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150585, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150586, 'pht': 3726}}" where mtr_portfolio_id = 23150574 and dashboard_run_id = 1828891 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`=23150574 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10714212, 0.037850643117095364, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23150574_20-05-2025_05_32_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150577, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150578, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150580, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23150582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150583, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150584, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150585, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150586, '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 = 23150983 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': 2900908, 'mtr_portfolio_id': 23150983, 'created_at': datetime.datetime(2025, 5, 20, 5, 48, 56), 'result': '0.045740393989022105', 'result_long': None, 'result_double': None}] Qualite : 0.045740393989022105 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23150983 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23150983_20-05-2025_05_48_56.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23150983 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_P23150983_20-05-2025_05_48_56.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23150987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150990, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150995, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150998, 'pht': 3726}}" where mtr_portfolio_id = 23150983 and dashboard_run_id = 1828891 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`=23150983 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10714213, 0.045740393989022105, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23150983_20-05-2025_05_48_56.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 23150987, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23150988, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23150989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23150990, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23150991, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23150992, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23150993, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23150994, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23150995, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23150996, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23150997, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23150998, '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 = 23151453 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 23151453 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 23151453 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23151453 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 23151453 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 23151453 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P23151453_20-05-2025_06_01_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 23151453 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_P23151453_20-05-2025_06_01_04.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 23151484, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 23151485, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 23151486, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 23151487, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 23151488, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 23151489, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 23151490, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 23151491, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 23151492, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 23151493, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 23151494, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 23151495, 'pht': 3726}}" where mtr_portfolio_id = 23151453 and dashboard_run_id = 1828890 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (23148156,23150404,23150574,23150983,23151453) result : ((1359697510,), (1359697516,), (1359697518,), (1359699306,), (1359699411,), (1359699691,), (1359699725,), (1359700270,), (1359702672,), (1359745067,), (1359745093,), (1359745149,), (1359745191,), (1359745634,), (1359745594,), (1359745597,), (1359745627,), (1359745774,), (1359745776,), (1359745778,), (1359745803,), (1359745804,), (1359745805,), (1359745931,), (1359745971,), (1359745997,), (1359746335,), (1359746338,), (1359746342,), (1359746395,), (1359746439,), (1359746465,), (1359746888,), (1359746954,), (1359747065,), (1359747110,), (1359747158,), (1359747358,), (1359747500,), (1359747758,), (1359747761,), (1359747772,), (1359747773,), (1359747945,), (1359747966,), (1359747993,), (1359748017,), (1359748038,), (1359748064,), (1359748374,), (1359748399,), (1359748425,), (1359748482,), (1359748507,), (1359748620,), (1359748646,), (1359748672,), (1359748696,), (1359748777,), (1359748781,), (1359748784,), (1359748787,), (1359748791,), (1359748798,), (1359748953,), (1359748988,), (1359749030,), (1359749087,), (1359749495,), (1359749506,), (1359749520,), (1359749523,), (1359749527,), (1359749528,), (1359749661,), (1359749650,), (1359749653,), (1359749656,), (1359749659,), (1359749687,), (1359749712,), (1359749745,), (1359749792,), (1359750082,), (1359750107,), (1359750130,), (1359750155,), (1359750180,), (1359750223,), (1359750728,), (1359750778,), (1359750832,), (1359750881,), (1359750928,), (1359751116,), (1359751141,), (1359751165,), (1359751175,), (1359751525,), (1359751550,), (1359751585,), (1359751638,), (1359751685,), (1359751693,), (1359751878,), (1359751915,), (1359751951,), (1359751975,), (1359751995,), (1359752025,), (1359752032,), (1359752037,), (1359752042,), (1359752045,), (1359752050,), (1359752108,), (1359752110,), (1359752112,), (1359752114,), (1359752141,), (1359752144,), (1359752146,), (1359752148,), (1359752150,), (1359752152,), (1359752192,), (1359752194,), (1359752196,), (1359752198,), (1359752200,), (1359752202,), (1359752225,), (1359752227,), (1359752229,), (1359752231,), (1359752232,), (1359752254,), (1359752256,), (1359752258,), (1359752267,), (1359752275,), (1359752291,), (1359752297,), (1359752298,), (1359752301,), (1359752347,), (1359752424,), (1359752451,), (1359752454,), (1359752455,), (1359752457,), (1359752459,), (1359752461,), (1359752570,), (1359752580,), (1359752582,), (1359752596,), (1359752709,), (1359752728,), (1359752740,), (1359752748,), (1359752754,), (1359752755,), (1359752775,), (1359752777,), (1359752780,), (1359752782,), (1359752803,), (1359752808,), (1359752811,), (1359752812,), (1359752814,), (1359752829,), (1359752831,), (1359752832,), (1359752834,), (1359752837,), (1359752867,), (1359752872,), (1359752874,), (1359752876,), (1359752877,), (1359752924,), (1359752926,), (1359752934,), (1359752939,), (1359752959,), (1359752961,), (1359752963,), (1359752964,), (1359752965,), (1359752966,), (1359752981,), (1359752984,), (1359752993,), (1359752996,), (1359752998,), (1359753446,), (1359753459,), (1359753461,), (1359753464,), (1359753466,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'20052025': {'nb_upload': 55, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([23151453]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] map_info['map_portfolio_photo'] : {23151453: [1359753466, 1359753464, 1359753461, 1359753459, 1359753446, 1359752998, 1359752996, 1359752993, 1359752984, 1359752981, 1359752966, 1359752965, 1359752964, 1359752963, 1359752961, 1359752959, 1359752939, 1359752934, 1359752926, 1359752924, 1359752877, 1359752876, 1359752874, 1359752872, 1359752867, 1359752837, 1359752834, 1359752832, 1359752831, 1359752829, 1359752814, 1359752812, 1359752811, 1359752808, 1359752803, 1359752782, 1359752780, 1359752777, 1359752775, 1359752755, 1359752754, 1359752748, 1359752740, 1359752728, 1359752709, 1359752596, 1359752582, 1359752580, 1359752570, 1359752461, 1359752459, 1359752457, 1359752455, 1359752454, 1359752451]} final : True mtd_id 4302 list_pids : [1359753466, 1359753464, 1359753461, 1359753459, 1359753446] Looping around the photos to save general results len do output : 1 /23151453Didn'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, '2901084') ('4302', '23151453', '1359753466', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753464', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753461', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753459', None, None, None, None, None, '2901084') ('4302', None, None, None, None, None, None, None, '2901084') ('4302', '23151453', '1359753446', None, None, None, None, None, '2901084') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '23151453', 'None', None, None, None, None, '2901084'), ('4302', '23151453', '1359753466', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753464', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753461', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753459', None, None, None, None, None, '2901084'), ('4302', '23151453', '1359753446', None, None, None, None, None, '2901084')] time used for this insertion : 0.31197237968444824 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7246136665344238 time spend to save output : 0.3122279644012451 total time spend for step 5 : 1.036841630935669 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 (2901084) 2.04user 3.23system 0:09.73elapsed 54%CPU (0avgtext+0avgdata 144864maxresident)k 85704inputs+3352outputs (352major+71671minor)pagefaults 0swaps