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 : 805757 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 (3234941) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3234941) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583904 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3234941'] with mtr_portfolio_ids : ['24583904'] and first list_photo_ids : [] new path : /proc/805757/ Name: python3 Umask: 0002 State: R (running) Tgid: 805757 Ngid: 0 Pid: 805757 PPid: 805756 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 805757 NSpid: 805757 NSpgid: 804111 NSsid: 804111 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98416 kB VmRSS: 98416 kB RssAnon: 59808 kB RssFile: 38608 kB RssShmem: 0 kB VmData: 865620 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: 6/63019 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: 71 nonvoluntary_ctxt_switches: 146 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '805757', 'Ngid': '0', 'Pid': '805757', 'PPid': '805756', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '805757', 'NSpid': '805757', 'NSpgid': '804111', 'NSsid': '804111', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98416 kB', 'VmRSS': '98416 kB', 'RssAnon': '59808 kB', 'RssFile': '38608 kB', 'RssShmem': '0 kB', 'VmData': '865620 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': '6/63019', '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': '71', 'nonvoluntary_ctxt_switches': '146'} ('datou_batch_current', '805757', '1106868', '0', '1106868', '865620', '98416', b'', 'marlene', '3234941') 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 (24583904) 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 (3234941 ) ) 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 (24583904) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1370518451, 'portfolio_id': 24583904}, {'photo_id': 1370518436, 'portfolio_id': 24583904}, {'photo_id': 1370518417, 'portfolio_id': 24583904}, {'photo_id': 1370518322, 'portfolio_id': 24583904}, {'photo_id': 1370518311, 'portfolio_id': 24583904}, {'photo_id': 1370518299, 'portfolio_id': 24583904}, {'photo_id': 1370518274, 'portfolio_id': 24583904}, {'photo_id': 1370518267, 'portfolio_id': 24583904}, {'photo_id': 1370518248, 'portfolio_id': 24583904}, {'photo_id': 1370518242, 'portfolio_id': 24583904}, {'photo_id': 1370518228, 'portfolio_id': 24583904}, {'photo_id': 1370518218, 'portfolio_id': 24583904}, {'photo_id': 1370518133, 'portfolio_id': 24583904}, {'photo_id': 1370518099, 'portfolio_id': 24583904}, {'photo_id': 1370518065, 'portfolio_id': 24583904}, {'photo_id': 1370518026, 'portfolio_id': 24583904}, {'photo_id': 1370517990, 'portfolio_id': 24583904}, {'photo_id': 1370517942, 'portfolio_id': 24583904}, {'photo_id': 1370517368, 'portfolio_id': 24583904}, {'photo_id': 1370517351, 'portfolio_id': 24583904}, {'photo_id': 1370517339, 'portfolio_id': 24583904}, {'photo_id': 1370517303, 'portfolio_id': 24583904}, {'photo_id': 1370517253, 'portfolio_id': 24583904}, {'photo_id': 1370517202, 'portfolio_id': 24583904}, {'photo_id': 1370517044, 'portfolio_id': 24583904}, {'photo_id': 1370516987, 'portfolio_id': 24583904}, {'photo_id': 1370516930, 'portfolio_id': 24583904}, {'photo_id': 1370516850, 'portfolio_id': 24583904}, {'photo_id': 1370516779, 'portfolio_id': 24583904}, {'photo_id': 1370516703, 'portfolio_id': 24583904}, {'photo_id': 1370516444, 'portfolio_id': 24583904}, {'photo_id': 1370516336, 'portfolio_id': 24583904}, {'photo_id': 1370516203, 'portfolio_id': 24583904}, {'photo_id': 1370515996, 'portfolio_id': 24583904}, {'photo_id': 1370515928, 'portfolio_id': 24583904}, {'photo_id': 1370515875, 'portfolio_id': 24583904}, {'photo_id': 1370515470, 'portfolio_id': 24583904}, {'photo_id': 1370515395, 'portfolio_id': 24583904}, {'photo_id': 1370515390, 'portfolio_id': 24583904}, {'photo_id': 1370515378, 'portfolio_id': 24583904}, {'photo_id': 1370515310, 'portfolio_id': 24583904}, {'photo_id': 1370515307, 'portfolio_id': 24583904}, {'photo_id': 1370515238, 'portfolio_id': 24583904}, {'photo_id': 1370515233, 'portfolio_id': 24583904}, {'photo_id': 1370515215, 'portfolio_id': 24583904}, {'photo_id': 1370515127, 'portfolio_id': 24583904}, {'photo_id': 1370515125, 'portfolio_id': 24583904}, {'photo_id': 1370515116, 'portfolio_id': 24583904}, {'photo_id': 1370514998, 'portfolio_id': 24583904}, {'photo_id': 1370514995, 'portfolio_id': 24583904}, {'photo_id': 1370514985, 'portfolio_id': 24583904}, {'photo_id': 1370514973, 'portfolio_id': 24583904}, {'photo_id': 1370514950, 'portfolio_id': 24583904}, {'photo_id': 1370514945, 'portfolio_id': 24583904}, {'photo_id': 1370514277, 'portfolio_id': 24583904}, {'photo_id': 1370514197, 'portfolio_id': 24583904}, {'photo_id': 1370514174, 'portfolio_id': 24583904}, {'photo_id': 1370514166, 'portfolio_id': 24583904}, {'photo_id': 1370514163, 'portfolio_id': 24583904}, {'photo_id': 1370514161, 'portfolio_id': 24583904}, {'photo_id': 1370514068, 'portfolio_id': 24583904}, {'photo_id': 1370514029, 'portfolio_id': 24583904}, {'photo_id': 1370514020, 'portfolio_id': 24583904}, {'photo_id': 1370514016, 'portfolio_id': 24583904}, {'photo_id': 1370513992, 'portfolio_id': 24583904}, {'photo_id': 1370513979, 'portfolio_id': 24583904}, {'photo_id': 1370513914, 'portfolio_id': 24583904}, {'photo_id': 1370513893, 'portfolio_id': 24583904}, {'photo_id': 1370513872, 'portfolio_id': 24583904}, {'photo_id': 1370513861, 'portfolio_id': 24583904}, {'photo_id': 1370513851, 'portfolio_id': 24583904}, {'photo_id': 1370513827, 'portfolio_id': 24583904}, {'photo_id': 1370513134, 'portfolio_id': 24583904}, {'photo_id': 1370513100, 'portfolio_id': 24583904}, {'photo_id': 1370513065, 'portfolio_id': 24583904}, {'photo_id': 1370513023, 'portfolio_id': 24583904}, {'photo_id': 1370512963, 'portfolio_id': 24583904}, {'photo_id': 1370512903, 'portfolio_id': 24583904}, {'photo_id': 1370512889, 'portfolio_id': 24583904}, {'photo_id': 1370512877, 'portfolio_id': 24583904}, {'photo_id': 1370512864, 'portfolio_id': 24583904}, {'photo_id': 1370512826, 'portfolio_id': 24583904}, {'photo_id': 1370512817, 'portfolio_id': 24583904}, {'photo_id': 1370512815, 'portfolio_id': 24583904}, {'photo_id': 1370512803, 'portfolio_id': 24583904}, {'photo_id': 1370512799, 'portfolio_id': 24583904}, {'photo_id': 1370512769, 'portfolio_id': 24583904}, {'photo_id': 1370512724, 'portfolio_id': 24583904}, {'photo_id': 1370512704, 'portfolio_id': 24583904}, {'photo_id': 1370512700, 'portfolio_id': 24583904}] map_portfolio_id_photo_id: {24583904: [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299, 1370518274, 1370518267, 1370518248, 1370518242, 1370518228, 1370518218, 1370518133, 1370518099, 1370518065, 1370518026, 1370517990, 1370517942, 1370517368, 1370517351, 1370517339, 1370517303, 1370517253, 1370517202, 1370517044, 1370516987, 1370516930, 1370516850, 1370516779, 1370516703, 1370516444, 1370516336, 1370516203, 1370515996, 1370515928, 1370515875, 1370515470, 1370515395, 1370515390, 1370515378, 1370515310, 1370515307, 1370515238, 1370515233, 1370515215, 1370515127, 1370515125, 1370515116, 1370514998, 1370514995, 1370514985, 1370514973, 1370514950, 1370514945, 1370514277, 1370514197, 1370514174, 1370514166, 1370514163, 1370514161, 1370514068, 1370514029, 1370514020, 1370514016, 1370513992, 1370513979, 1370513914, 1370513893, 1370513872, 1370513861, 1370513851, 1370513827, 1370513134, 1370513100, 1370513065, 1370513023, 1370512963, 1370512903, 1370512889, 1370512877, 1370512864, 1370512826, 1370512817, 1370512815, 1370512803, 1370512799, 1370512769, 1370512724, 1370512704, 1370512700]} ##### 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.017034530639648438 #### 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 Fri Jul 4 09:33: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 (24583904) 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 : 24583904 get user id for portfolio 24583904 get sub ptf for main ptf 24583904, type 3726 and hashtags ['Carton_gris', 'metal', 'papier', 'kraft', 'autre_refus', 'plastique', 'flou', 'Carton_brun', 'cartonnette', 'environnement', 'mal_croppe', 'Teint_Dans_La_Masse'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24583904 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','papier','kraft','autre_refus','plastique','flou','Carton_brun','cartonnette','environnement','mal_croppe','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24583904 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','papier','kraft','autre_refus','plastique','flou','Carton_brun','cartonnette','environnement','mal_croppe','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 24583904, 'sub_port_id': 24583907, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512757, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'plastique': {'main_port_id': 24583904, 'sub_port_id': 24583908, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512758, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 24583904, 'sub_port_id': 24583909, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512759, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'environnement': {'main_port_id': 24583904, 'sub_port_id': 24583910, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512760, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'autre_refus': {'main_port_id': 24583904, 'sub_port_id': 24583911, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512761, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'metal': {'main_port_id': 24583904, 'sub_port_id': 24583912, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512762, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'papier': {'main_port_id': 24583904, 'sub_port_id': 24583913, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512763, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'flou': {'main_port_id': 24583904, 'sub_port_id': 24583914, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512764, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'kraft': {'main_port_id': 24583904, 'sub_port_id': 24583915, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512765, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'Carton_gris': {'main_port_id': 24583904, 'sub_port_id': 24583916, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512766, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'cartonnette': {'main_port_id': 24583904, 'sub_port_id': 24583917, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512767, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'Carton_brun': {'main_port_id': 24583904, 'sub_port_id': 24583918, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512768, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583907 , 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=24583904 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 (24583907) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583908 , 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=24583904 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 (24583908) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583909 , 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=24583904 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 (24583909) result : ((1370515536,), (1370516984,), (1370516988,), (1370518291,), (1370518292,), (1370518293,), (1370518294,), (1370518482,), (1370518483,), (1370518484,), (1370518530,), (1370518533,), (1370518536,), (1370518584,), (1370518585,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583910 , 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=24583904 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 (24583910) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583911 , 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=24583904 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 (24583911) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583912 , 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=24583904 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 (24583912) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583913 , 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=24583904 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 (24583913) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583914 , 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=24583904 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 (24583914) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583915 , 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=24583904 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 (24583915) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583916 , 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=24583904 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 (24583916) result : ((1370515578,), (1370515586,), (1370518302,), (1370518488,), (1370518548,), (1370518551,), (1370518586,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583917 , 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=24583904 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 (24583917) result : ((1370514979,), (1370514980,), (1370515600,), (1370515603,), (1370515605,), (1370515607,), (1370517004,), (1370518306,), (1370518307,), (1370518308,), (1370518309,), (1370518310,), (1370518491,), (1370518492,), (1370518493,), (1370518494,), (1370518561,), (1370518563,), (1370518565,), (1370518588,), (1370518589,), (1370518590,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24583918 , 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=24583904 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 (24583918) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24583904) result : ((1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) 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 (1370513100,1370512700) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24583904 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','papier','kraft','autre_refus','plastique','flou','Carton_brun','cartonnette','environnement','mal_croppe','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24583904 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','metal','papier','kraft','autre_refus','plastique','flou','Carton_brun','cartonnette','environnement','mal_croppe','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 24583904, 'sub_port_id': 24583919, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512769, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'plastique': {'main_port_id': 24583904, 'sub_port_id': 24583920, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512770, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 24583904, 'sub_port_id': 24583921, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512771, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'environnement': {'main_port_id': 24583904, 'sub_port_id': 24583922, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512772, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'autre_refus': {'main_port_id': 24583904, 'sub_port_id': 24583923, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512773, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'metal': {'main_port_id': 24583904, 'sub_port_id': 24583924, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512774, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'papier': {'main_port_id': 24583904, 'sub_port_id': 24583925, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512775, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'flou': {'main_port_id': 24583904, 'sub_port_id': 24583926, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512776, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'kraft': {'main_port_id': 24583904, 'sub_port_id': 24583927, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512777, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'Carton_gris': {'main_port_id': 24583904, 'sub_port_id': 24583928, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512778, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'cartonnette': {'main_port_id': 24583904, 'sub_port_id': 24583929, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512779, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}, 'Carton_brun': {'main_port_id': 24583904, 'sub_port_id': 24583930, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16512780, 'last_updated_at': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 7, 4, 9, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 7, 4, 9, 18, 56)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583919,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583907 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583920,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583908 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583921,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583909 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583922,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583910 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583923,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583911 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583924,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583912 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583925,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583913 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583926,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583914 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583927,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583915 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583928,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583916 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583929,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583917 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24583930,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24583918 lien utilise dans velours : https://www.fotonower.com/velours/24583919,24583920,24583921,24583922,24583923,24583924,24583925,24583926,24583927,24583928,24583929,24583930?tags=mal_croppe,plastique,Teint_Dans_La_Masse,environnement,autre_refus,metal,papier,flou,kraft,Carton_gris,cartonnette,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24583904]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] map_info['map_portfolio_photo'] : {24583904: [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299, 1370518274, 1370518267, 1370518248, 1370518242, 1370518228, 1370518218, 1370518133, 1370518099, 1370518065, 1370518026, 1370517990, 1370517942, 1370517368, 1370517351, 1370517339, 1370517303, 1370517253, 1370517202, 1370517044, 1370516987, 1370516930, 1370516850, 1370516779, 1370516703, 1370516444, 1370516336, 1370516203, 1370515996, 1370515928, 1370515875, 1370515470, 1370515395, 1370515390, 1370515378, 1370515310, 1370515307, 1370515238, 1370515233, 1370515215, 1370515127, 1370515125, 1370515116, 1370514998, 1370514995, 1370514985, 1370514973, 1370514950, 1370514945, 1370514277, 1370514197, 1370514174, 1370514166, 1370514163, 1370514161, 1370514068, 1370514029, 1370514020, 1370514016, 1370513992, 1370513979, 1370513914, 1370513893, 1370513872, 1370513861, 1370513851, 1370513827, 1370513134, 1370513100, 1370513065, 1370513023, 1370512963, 1370512903, 1370512889, 1370512877, 1370512864, 1370512826, 1370512817, 1370512815, 1370512803, 1370512799, 1370512769, 1370512724, 1370512704, 1370512700]} final : False mtd_id 4302 list_pids : [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] Looping around the photos to save general results len do output : 1 /24583904. 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, '3234941') ('4302', '24583904', '1370518451', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518436', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518417', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518322', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518311', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518299', None, None, None, None, None, '3234941') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24583904', "{'mal_croppe': 24583907, 'plastique': 24583908, 'Teint_Dans_La_Masse': 24583909, 'environnement': 24583910, 'autre_refus': 24583911, 'metal': 24583912, 'papier': 24583913, 'flou': 24583914, 'kraft': 24583915, 'Carton_gris': 24583916, 'cartonnette': 24583917, 'Carton_brun': 24583918}", None, None, None, None, '3234941'), ('4302', '24583904', '1370518451', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518436', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518417', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518322', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518311', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518299', None, None, None, None, None, '3234941')] time used for this insertion : 0.013545751571655273 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5226931571960449 time spend to save output : 0.013766765594482422 total time spend for step 1 : 0.5364599227905273 step2:final Fri Jul 4 09:33: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 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 (24583904) 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 24583904 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1370512803,1370512799,1370512769,1370512724,1370512704,1370512700,1370512889,1370512877,1370512864,1370512826,1370512817,1370512815,1370513134,1370513100,1370513065,1370513023,1370512963,1370512903,1370513914,1370513893,1370513872,1370513861,1370513851,1370513827,1370514068,1370514029,1370514020,1370514016,1370513992,1370513979,1370514277,1370514197,1370514174,1370514166,1370514163,1370514161,1370514998,1370514995,1370514985,1370514973,1370514950,1370514945,1370515238,1370515233,1370515215,1370515127,1370515125,1370515116,1370515470,1370515395,1370515390,1370515378,1370515310,1370515307,1370516444,1370516336,1370516203,1370515996,1370515928,1370515875,1370517044,1370516987,1370516930,1370516850,1370516779,1370516703,1370517368,1370517351,1370517339,1370517303,1370517253,1370517202,1370518133,1370518099,1370518065,1370518026,1370517990,1370517942,1370518274,1370518267,1370518248,1370518242,1370518228,1370518218,1370518451,1370518436,1370518417,1370518322,1370518311,1370518299); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24583904]) Inside saveOutput : final : False verbose : True original output for save of step final : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} new output for save of step final : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] map_info['map_portfolio_photo'] : {24583904: [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299, 1370518274, 1370518267, 1370518248, 1370518242, 1370518228, 1370518218, 1370518133, 1370518099, 1370518065, 1370518026, 1370517990, 1370517942, 1370517368, 1370517351, 1370517339, 1370517303, 1370517253, 1370517202, 1370517044, 1370516987, 1370516930, 1370516850, 1370516779, 1370516703, 1370516444, 1370516336, 1370516203, 1370515996, 1370515928, 1370515875, 1370515470, 1370515395, 1370515390, 1370515378, 1370515310, 1370515307, 1370515238, 1370515233, 1370515215, 1370515127, 1370515125, 1370515116, 1370514998, 1370514995, 1370514985, 1370514973, 1370514950, 1370514945, 1370514277, 1370514197, 1370514174, 1370514166, 1370514163, 1370514161, 1370514068, 1370514029, 1370514020, 1370514016, 1370513992, 1370513979, 1370513914, 1370513893, 1370513872, 1370513861, 1370513851, 1370513827, 1370513134, 1370513100, 1370513065, 1370513023, 1370512963, 1370512903, 1370512889, 1370512877, 1370512864, 1370512826, 1370512817, 1370512815, 1370512803, 1370512799, 1370512769, 1370512724, 1370512704, 1370512700]} final : False mtd_id 4302 list_pids : [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] Looping around the photos to save general results len do output : 6 /1370518451.Didn't retrieve data . /1370518436.Didn't retrieve data . /1370518417.Didn't retrieve data . /1370518322.Didn't retrieve data . /1370518311.Didn't retrieve data . /1370518299.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, '3234941') ('4302', '24583904', '1370518451', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518436', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518417', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518322', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518311', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518299', None, None, None, None, None, '3234941') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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', '24583904', '1370518451', '0.11391962360166942', None, None, None, None, '3234941'), ('4302', '24583904', '1370518436', '0.11391962360166942', None, None, None, None, '3234941'), ('4302', '24583904', '1370518417', '0.11391962360166942', None, None, None, None, '3234941'), ('4302', '24583904', '1370518322', '0.11391962360166942', None, None, None, None, '3234941'), ('4302', '24583904', '1370518311', '0.11391962360166942', None, None, None, None, '3234941'), ('4302', '24583904', '1370518299', '0.11391962360166942', None, None, None, None, '3234941')] time used for this insertion : 0.013025760650634766 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07369303703308105 time spend to save output : 0.013340950012207031 total time spend for step 2 : 0.08703398704528809 step3:velours_tree Fri Jul 4 09:33: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 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 : {24583904: [{'mal_croppe': 24583907, 'plastique': 24583908, 'Teint_Dans_La_Masse': 24583909, 'environnement': 24583910, 'autre_refus': 24583911, 'metal': 24583912, 'papier': 24583913, 'flou': 24583914, 'kraft': 24583915, 'Carton_gris': 24583916, 'cartonnette': 24583917, 'Carton_brun': 24583918}]} input_args_next_step : {24583904: ()} output_args : {24583904: [{'mal_croppe': 24583907, 'plastique': 24583908, 'Teint_Dans_La_Masse': 24583909, 'environnement': 24583910, 'autre_refus': 24583911, 'metal': 24583912, 'papier': 24583913, 'flou': 24583914, 'kraft': 24583915, 'Carton_gris': 24583916, 'cartonnette': 24583917, 'Carton_brun': 24583918}]} args : 24583904 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'mal_croppe': 24583907, 'plastique': 24583908, 'Teint_Dans_La_Masse': 24583909, 'environnement': 24583910, 'autre_refus': 24583911, 'metal': 24583912, 'papier': 24583913, 'flou': 24583914, 'kraft': 24583915, 'Carton_gris': 24583916, 'cartonnette': 24583917, 'Carton_brun': 24583918},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24583904) 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([24583904]) Inside saveOutput : final : False verbose : True ouput is None No outpout to save, returning out of save general time spend for datou_step_exec : 0.359816312789917 time spend to save output : 0.0021958351135253906 total time spend for step 3 : 0.3620121479034424 step4:send_mail_cod Fri Jul 4 09:33:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} input_args_next_step : {1370518451: ()} output_args : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} args : 1370518451 depend.output_id : 0 input_args_next_step : {1370518451: ('0.11391962360166942',), 1370518436: ()} output_args : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} args : 1370518436 depend.output_id : 0 input_args_next_step : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ()} output_args : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} args : 1370518417 depend.output_id : 0 input_args_next_step : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ()} output_args : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} args : 1370518322 depend.output_id : 0 input_args_next_step : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ()} output_args : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} args : 1370518311 depend.output_id : 0 input_args_next_step : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ()} output_args : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',)} args : 1370518299 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 : {24583904: [{'mal_croppe': 24583907, 'plastique': 24583908, 'Teint_Dans_La_Masse': 24583909, 'environnement': 24583910, 'autre_refus': 24583911, 'metal': 24583912, 'papier': 24583913, 'flou': 24583914, 'kraft': 24583915, 'Carton_gris': 24583916, 'cartonnette': 24583917, 'Carton_brun': 24583918}]} input_args_next_step : {1370518451: ('0.11391962360166942',), 1370518436: ('0.11391962360166942',), 1370518417: ('0.11391962360166942',), 1370518322: ('0.11391962360166942',), 1370518311: ('0.11391962360166942',), 1370518299: ('0.11391962360166942',), 24583904: ()} output_args : {24583904: [{'mal_croppe': 24583907, 'plastique': 24583908, 'Teint_Dans_La_Masse': 24583909, 'environnement': 24583910, 'autre_refus': 24583911, 'metal': 24583912, 'papier': 24583913, 'flou': 24583914, 'kraft': 24583915, 'Carton_gris': 24583916, 'cartonnette': 24583917, 'Carton_brun': 24583918}]} args : 24583904 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 :7, first value : ('0.11391962360166942',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24583904) 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 (1370518451,1370518436,1370518417,1370518322,1370518311,1370518299) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1370518299 begin to download photo : 1370518322 begin to download photo : 1370518436 download finish for photo 1370518436 begin to download photo : 1370518451 download finish for photo 1370518322 begin to download photo : 1370518417 download finish for photo 1370518299 begin to download photo : 1370518311 download finish for photo 1370518311 download finish for photo 1370518451 download finish for photo 1370518417 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette245839071751614381/ imagette245839081751614381/ imagette245839111751614381/ imagette245839121751614381/ imagette245839141751614381/ imagette245839151751614381/ length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P24583904_04-07-2025_09_33_01.pdf 24583907 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=24583907 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245839071751614381 24583908 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=24583908 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245839081751614381 24583911 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=24583911 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245839111751614381 24583912 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=24583912 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245839121751614381 24583914 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=24583914 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245839141751614381 24583915 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=24583915 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245839151751614381 24583917 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=24583917 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1370518310: '1751614087_797394_1370515307_a6a62f97001af591fd3a12d4223ee5f5_rle_crop_3871625595_0.png', 1370518590: '1751614227_3479971_1370517202_53ecfa5fd11c7ee176975d2b8269bbe1_rle_crop_3871628661_0.png', 1370518589: '1751614227_3479971_1370517303_3c9916620b47b79f3b84fd39114843fc_rle_crop_3871628608_0.png', 1370518588: '1751614227_3479971_1370517368_a89de150f96f713ba2ab83752f213acc_rle_crop_3871628507_0.png', 1370518565: '1751614205_799385_1370516850_d6f688de7db009c8e25bc8c21384ee4b_rle_crop_3871626973_0.png', 1370518563: '1751614205_799385_1370516930_3b8551e1f34d09f0482fd1e077b1947b_rle_crop_3871626957_0.png', 1370518561: '1751614205_799385_1370517044_ebf8f185ed44746534f9af2cde2966a8_rle_crop_3871626693_0.png', 1370518494: '1751614166_3479023_1370515875_0943046e55c3183baca209eaf9d4e2b5_rle_crop_3871626381_0.png', 1370518493: '1751614166_3479023_1370516203_772fe1264fc3cfa374640962eb9f048b_rle_crop_3871626071_0.png', 1370518492: '1751614166_3479023_1370516336_75d1a292ec04c38bb9563c6622b0361e_rle_crop_3871625882_0.png', 1370518491: '1751614166_3479023_1370516444_2fd1b5fd4f2cb6eb0a0e2c14fa9767d4_rle_crop_3871625842_0.png', 1370514979: '1751613724_785926_1370513893_de851ca65ea48d9edb0b64852550d4a7_rle_crop_3871610436_0.png', 1370518309: '1751614087_797394_1370515310_cbcbaa0e17e2ada7b44f989c447e2548_rle_crop_3871625524_0.png', 1370518308: '1751614087_797394_1370515390_648005eea2a4c31b545704fd228b8022_rle_crop_3871625367_0.png', 1370518307: '1751614087_797394_1370515395_70bc6f1021b695a79ee29c33cbd07e67_rle_crop_3871625179_0.png', 1370518306: '1751614087_797394_1370515470_e76dd44bc13a9d73c826d78c7611df35_rle_crop_3871624899_0.png', 1370517004: '1751613965_793909_1370515238_e2603c98eb5ef028caef77f23bee372f_rle_crop_3871619728_0.png', 1370515607: '1751613845_789732_1370514161_f0a33be3d86eea177e937a468efbdfe4_rle_crop_3871614318_0.png', 1370515605: '1751613845_789732_1370514166_750431faaf3245a72a86623b7ac9a2a4_rle_crop_3871614225_0.png', 1370515603: '1751613845_789732_1370514174_f7b097b11dd9336127deffd3b1869579_rle_crop_3871614203_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/15dd01fd42af175f5c7ba3514686f813_13559078.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/59327e2357f374cbaf18a9508dde9a91_56421285.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/9a565e812006ff7a69e834637464f14f_17447942.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/cb529314ef81db5560623696e4046583_71378358.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/24f5478cb4f0b5c829f97dab7a10c948_73713855.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/97c67fda8cd2e901af8cad78975c4ee5_17355416.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/692663201f344f26adc6473f8d2bcc75_17076633.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/9bf39962d0f237f2a1b27d0b4cd42108_27508141.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/24102c175f64ed7d1c737a5732c46919_89221565.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/026c27fab045a6bd99e1560063041bae_66151812.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/0b0684fc1008cd5d5e0196c81a9fdbdd_20287361.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/072125658d1fd5a9b3cbf9fb44ea360b_82178619.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/872b6b54cbe0e516418607183a613829_62441630.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/3a810131e6bc94040e126548ec46f55b_52809701.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/da3c963fd56ba63d4d9b6b47900d50b1_56566921.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/40713e652a0aa90ebdd3aaac74234056_61559634.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/4facf6300617f9465efd206d6cba27e5_14164650.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/66e7a72ec1e42acfafd26f58aa1296c5_25323821.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/75eb31d4a17abc5978b9241810dfe2fe_83978515.png change filename to text .imagette245839171751614381/ imagette245839171751614381/1751613965_793909_1370515238_e2603c98eb5ef028caef77f23bee372f_rle_crop_3871619728_0.png.png imagette245839171751614381/1751614087_797394_1370515470_e76dd44bc13a9d73c826d78c7611df35_rle_crop_3871624899_0.png.png imagette245839171751614381/1751613845_789732_1370514174_f7b097b11dd9336127deffd3b1869579_rle_crop_3871614203_0.png.png imagette245839171751614381/1751614166_3479023_1370516336_75d1a292ec04c38bb9563c6622b0361e_rle_crop_3871625882_0.png.png imagette245839171751614381/1751614087_797394_1370515310_cbcbaa0e17e2ada7b44f989c447e2548_rle_crop_3871625524_0.png.png imagette245839171751614381/1751614087_797394_1370515395_70bc6f1021b695a79ee29c33cbd07e67_rle_crop_3871625179_0.png.png imagette245839171751614381/1751614227_3479971_1370517303_3c9916620b47b79f3b84fd39114843fc_rle_crop_3871628608_0.png.png imagette245839171751614381/1751614166_3479023_1370516444_2fd1b5fd4f2cb6eb0a0e2c14fa9767d4_rle_crop_3871625842_0.png.png imagette245839171751614381/1751613845_789732_1370514166_750431faaf3245a72a86623b7ac9a2a4_rle_crop_3871614225_0.png.png imagette245839171751614381/1751614087_797394_1370515390_648005eea2a4c31b545704fd228b8022_rle_crop_3871625367_0.png.png imagette245839171751614381/1751614205_799385_1370516850_d6f688de7db009c8e25bc8c21384ee4b_rle_crop_3871626973_0.png.png imagette245839171751614381/1751614166_3479023_1370515875_0943046e55c3183baca209eaf9d4e2b5_rle_crop_3871626381_0.png.png imagette245839171751614381/1751614087_797394_1370515307_a6a62f97001af591fd3a12d4223ee5f5_rle_crop_3871625595_0.png.png imagette245839171751614381/1751613724_785926_1370513893_de851ca65ea48d9edb0b64852550d4a7_rle_crop_3871610436_0.png.png imagette245839171751614381/1751614227_3479971_1370517202_53ecfa5fd11c7ee176975d2b8269bbe1_rle_crop_3871628661_0.png.png imagette245839171751614381/1751614166_3479023_1370516203_772fe1264fc3cfa374640962eb9f048b_rle_crop_3871626071_0.png.png imagette245839171751614381/1751613845_789732_1370514161_f0a33be3d86eea177e937a468efbdfe4_rle_crop_3871614318_0.png.png imagette245839171751614381/1751614205_799385_1370517044_ebf8f185ed44746534f9af2cde2966a8_rle_crop_3871626693_0.png.png imagette245839171751614381/1751614205_799385_1370516930_3b8551e1f34d09f0482fd1e077b1947b_rle_crop_3871626957_0.png.png imagette245839171751614381/1751614227_3479971_1370517368_a89de150f96f713ba2ab83752f213acc_rle_crop_3871628507_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/1ad5ea0436594e084918832625e183ee_27005079.png imagette245839171751614381 24583909 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=24583909 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1370515536: '1751613845_789732_1370514166_750431faaf3245a72a86623b7ac9a2a4_rle_crop_3871614231_0.png', 1370516984: '1751613965_793909_1370515127_831fd8aaa2cb86c2ca27164bd822169c_rle_crop_3871620095_0.png', 1370516988: '1751613965_793909_1370515127_831fd8aaa2cb86c2ca27164bd822169c_rle_crop_3871620094_0.png', 1370518291: '1751614087_797394_1370515470_e76dd44bc13a9d73c826d78c7611df35_rle_crop_3871624903_0.png', 1370518292: '1751614087_797394_1370515390_648005eea2a4c31b545704fd228b8022_rle_crop_3871625369_0.png', 1370518293: '1751614087_797394_1370515378_ceb97a18d25a807bad99294d1afabc19_rle_crop_3871625492_0.png', 1370518294: '1751614087_797394_1370515310_cbcbaa0e17e2ada7b44f989c447e2548_rle_crop_3871625527_0.png', 1370518482: '1751614166_3479023_1370516336_75d1a292ec04c38bb9563c6622b0361e_rle_crop_3871625885_0.png', 1370518483: '1751614166_3479023_1370515928_7f176441d9d827dddd0cb717b60d7c35_rle_crop_3871626354_0.png', 1370518484: '1751614166_3479023_1370515875_0943046e55c3183baca209eaf9d4e2b5_rle_crop_3871626385_0.png', 1370518530: '1751614205_799385_1370517044_ebf8f185ed44746534f9af2cde2966a8_rle_crop_3871626692_0.png', 1370518533: '1751614205_799385_1370516987_595f0572f0db4c3a2b209bd759a37284_rle_crop_3871626759_0.png', 1370518536: '1751614205_799385_1370516930_3b8551e1f34d09f0482fd1e077b1947b_rle_crop_3871626958_0.png', 1370518584: '1751614227_3479971_1370517351_cc0bcdef411836a3121bde78abde5b1a_rle_crop_3871628523_0.png', 1370518585: '1751614227_3479971_1370517303_3c9916620b47b79f3b84fd39114843fc_rle_crop_3871628609_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/0cb69e3e52e76ffc04950b9aca8df710_81330174.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/e1bfd3dee5de3ea26609ad7a20d24996_11807061.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/070d6d4810d32575ce22166e236b9153_30431110.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/4bef0505ac889dcad9c8dcd6378768ee_88732187.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/f67c565dbdfab24d90eb8ee8f3db0c3e_26883683.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/520ffddb0b4ea61b0f59332e64246cc0_61078073.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/bf3d177b16335b4b882ab1fbd25e1484_3352770.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/84c7f178ec3d8912910d1da035a6e3ab_71996728.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/bcc0855eebcdbe5cf493c413d7e3d8c5_31601141.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/18cae4ff70deab48a8e4762f73ea49fe_43035607.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/6a56bf96f1bb1cd491e8d3daebae0bf3_5694898.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/4fc6c9f2c1f80dfce298f1ffd06b008e_47613424.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/460328acce7d5b58aec035f12c91e943_64557582.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/8f2ba66039e7c5f0921d1cb74ea49fb4_8181791.png change filename to text .imagette245839091751614382/ imagette245839091751614382/1751614087_797394_1370515390_648005eea2a4c31b545704fd228b8022_rle_crop_3871625369_0.png.png imagette245839091751614382/1751613965_793909_1370515127_831fd8aaa2cb86c2ca27164bd822169c_rle_crop_3871620095_0.png.png imagette245839091751614382/1751614205_799385_1370516987_595f0572f0db4c3a2b209bd759a37284_rle_crop_3871626759_0.png.png imagette245839091751614382/1751614166_3479023_1370515928_7f176441d9d827dddd0cb717b60d7c35_rle_crop_3871626354_0.png.png imagette245839091751614382/1751614205_799385_1370517044_ebf8f185ed44746534f9af2cde2966a8_rle_crop_3871626692_0.png.png imagette245839091751614382/1751614227_3479971_1370517303_3c9916620b47b79f3b84fd39114843fc_rle_crop_3871628609_0.png.png imagette245839091751614382/1751614227_3479971_1370517351_cc0bcdef411836a3121bde78abde5b1a_rle_crop_3871628523_0.png.png imagette245839091751614382/1751614087_797394_1370515378_ceb97a18d25a807bad99294d1afabc19_rle_crop_3871625492_0.png.png imagette245839091751614382/1751613845_789732_1370514166_750431faaf3245a72a86623b7ac9a2a4_rle_crop_3871614231_0.png.png imagette245839091751614382/1751614166_3479023_1370515875_0943046e55c3183baca209eaf9d4e2b5_rle_crop_3871626385_0.png.png imagette245839091751614382/1751613965_793909_1370515127_831fd8aaa2cb86c2ca27164bd822169c_rle_crop_3871620094_0.png.png imagette245839091751614382/1751614205_799385_1370516930_3b8551e1f34d09f0482fd1e077b1947b_rle_crop_3871626958_0.png.png imagette245839091751614382/1751614087_797394_1370515470_e76dd44bc13a9d73c826d78c7611df35_rle_crop_3871624903_0.png.png imagette245839091751614382/1751614166_3479023_1370516336_75d1a292ec04c38bb9563c6622b0361e_rle_crop_3871625885_0.png.png imagette245839091751614382/1751614087_797394_1370515310_cbcbaa0e17e2ada7b44f989c447e2548_rle_crop_3871625527_0.png.png wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/14466d56d1ac8e484314bc66d8a21a85_95357087.png imagette245839091751614382 24583916 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=24583916 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1370515578: '1751613845_789732_1370514174_f7b097b11dd9336127deffd3b1869579_rle_crop_3871614205_0.png', 1370515586: '1751613845_789732_1370514163_5735f4db505790f620a856c4fac49fd4_rle_crop_3871614293_0.png', 1370518302: '1751614087_797394_1370515470_e76dd44bc13a9d73c826d78c7611df35_rle_crop_3871624900_0.png', 1370518488: '1751614166_3479023_1370515875_0943046e55c3183baca209eaf9d4e2b5_rle_crop_3871626384_0.png', 1370518548: '1751614205_799385_1370517044_ebf8f185ed44746534f9af2cde2966a8_rle_crop_3871626690_0.png', 1370518551: '1751614205_799385_1370516703_ae7d441c536d00720d8dd71cbe9c78fd_rle_crop_3871627065_0.png', 1370518586: '1751614227_3479971_1370517253_5b0441d782acd3d4d0d85e94dc381eda_rle_crop_3871628647_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/25f444f670c3c5e75e360312277ec2cb_44905573.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/d376a3ee292f810997d63b65278c0ddb_40662057.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/89ee4f76cad166a97ff52a9a65c935f9_62110103.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/8272ed794493e97b7187516df6968d15_90249547.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/c8ecf42d7f315079f54cd3e7120866d3_92041064.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/9ae066d5d8ed98d2e1b88a2458101412_35962719.png change filename to text .imagette245839161751614383/ imagette245839161751614383/1751614227_3479971_1370517253_5b0441d782acd3d4d0d85e94dc381eda_rle_crop_3871628647_0.png.png imagette245839161751614383/1751613845_789732_1370514163_5735f4db505790f620a856c4fac49fd4_rle_crop_3871614293_0.png.png imagette245839161751614383/1751613845_789732_1370514174_f7b097b11dd9336127deffd3b1869579_rle_crop_3871614205_0.png.png imagette245839161751614383/1751614205_799385_1370517044_ebf8f185ed44746534f9af2cde2966a8_rle_crop_3871626690_0.png.png imagette245839161751614383/1751614205_799385_1370516703_ae7d441c536d00720d8dd71cbe9c78fd_rle_crop_3871627065_0.png.png imagette245839161751614383/1751614087_797394_1370515470_e76dd44bc13a9d73c826d78c7611df35_rle_crop_3871624900_0.png.png imagette245839161751614383/1751614166_3479023_1370515875_0943046e55c3183baca209eaf9d4e2b5_rle_crop_3871626384_0.png.png imagette245839181751614383/ wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/db600de44a0d11e73d805bb4ffc65607_50398052.png imagette245839161751614383 24583918 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=24583918 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245839181751614383 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24583904 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24583919,24583920,24583921,24583922,24583923,24583924,24583925,24583926,24583927,24583928,24583929,24583930?tags=mal_croppe,plastique,Teint_Dans_La_Masse,environnement,autre_refus,metal,papier,flou,kraft,Carton_gris,cartonnette,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1370518451] : ('0.11391962360166942',) no score found for photo 1370518451 We are sending mail with results at report@fotonower.com args[1370518436] : ('0.11391962360166942',) no score found for photo 1370518436 We are sending mail with results at report@fotonower.com args[1370518417] : ('0.11391962360166942',) no score found for photo 1370518417 We are sending mail with results at report@fotonower.com args[1370518322] : ('0.11391962360166942',) no score found for photo 1370518322 We are sending mail with results at report@fotonower.com args[1370518311] : ('0.11391962360166942',) no score found for photo 1370518311 We are sending mail with results at report@fotonower.com args[1370518299] : ('0.11391962360166942',) no score found for photo 1370518299 We are sending mail with results at report@fotonower.com refus_total : 0.11391962360166942 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=24583904 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_P24583904_04-07-2025_09_33_01.pdf results_Auto_P24583904_04-07-2025_09_33_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24583904_04-07-2025_09_33_01.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','24583904','results_Auto_P24583904_04-07-2025_09_33_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24583904_04-07-2025_09_33_01.pdf','pdf','','0.17','0.11391962360166942') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24583904]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] map_info['map_portfolio_photo'] : {24583904: [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299, 1370518274, 1370518267, 1370518248, 1370518242, 1370518228, 1370518218, 1370518133, 1370518099, 1370518065, 1370518026, 1370517990, 1370517942, 1370517368, 1370517351, 1370517339, 1370517303, 1370517253, 1370517202, 1370517044, 1370516987, 1370516930, 1370516850, 1370516779, 1370516703, 1370516444, 1370516336, 1370516203, 1370515996, 1370515928, 1370515875, 1370515470, 1370515395, 1370515390, 1370515378, 1370515310, 1370515307, 1370515238, 1370515233, 1370515215, 1370515127, 1370515125, 1370515116, 1370514998, 1370514995, 1370514985, 1370514973, 1370514950, 1370514945, 1370514277, 1370514197, 1370514174, 1370514166, 1370514163, 1370514161, 1370514068, 1370514029, 1370514020, 1370514016, 1370513992, 1370513979, 1370513914, 1370513893, 1370513872, 1370513861, 1370513851, 1370513827, 1370513134, 1370513100, 1370513065, 1370513023, 1370512963, 1370512903, 1370512889, 1370512877, 1370512864, 1370512826, 1370512817, 1370512815, 1370512803, 1370512799, 1370512769, 1370512724, 1370512704, 1370512700]} final : False mtd_id 4302 list_pids : [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] 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, '3234941') ('4302', '24583904', '1370518451', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518436', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518417', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518322', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518311', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518299', None, None, None, None, None, '3234941') 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', '24583904', '1370518451', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518436', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518417', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518322', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518311', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518299', None, None, None, None, None, '3234941')] time used for this insertion : 0.012025833129882812 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.4974923133850098 time spend to save output : 0.012247323989868164 total time spend for step 4 : 3.509739637374878 step5:split_time_score Fri Jul 4 09:33:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24583904'] 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 : [('24583904',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24583904) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1370518299: {'path': 'temp/1751614381_805757_1370518299_41ab9ae21a8ec84fe84ca4990d46aebf.jpg', 'extension': 'jpg'}, 1370518311: {'path': 'temp/1751614381_805757_1370518311_be576059f61f18e28315afd1fc44c6d3.jpg', 'extension': 'jpg'}, 1370518436: {'path': 'temp/1751614381_805757_1370518436_96d586e53b14d001908332974c5f47bf.jpg', 'extension': 'jpg'}, 1370518451: {'path': 'temp/1751614381_805757_1370518451_d04d2844a547f3d467743cc0772d814b.jpg', 'extension': 'jpg'}, 1370518322: {'path': 'temp/1751614381_805757_1370518322_9aaea0cac9100feb5d0ab35c94e4353f.jpg', 'extension': 'jpg'}, 1370518417: {'path': 'temp/1751614381_805757_1370518417_2e3cdf61969130c72b0a0a33c35ec424.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 = 24583904; (('arc_en_ciel_jrm_live',), ('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 = 24583904 group by h (('09', 90),) 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=24583904 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 (24583904) 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 (24583904) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04072025 24583904 Nombre de photos uploadées : 90 / 23040 (0%) 04072025 24583904 Nombre de photos taguées (types de déchets): 0 / 90 (0%) 04072025 24583904 Nombre de photos taguées (volume) : 0 / 90 (0%) [{'photo_id': 1370512803, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/62a0d87971c28e54c5275b29b248fe34.jpg', 'username': None, 'uploaded_at': 1751613398, 'text': 'image_04072025_09_15_04_10140.jpg'}, {'photo_id': 1370512799, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/72cc782f503a7e19cc9c26b3b0d1755c.jpg', 'username': None, 'uploaded_at': 1751613398, 'text': 'image_04072025_09_15_15_10139.jpg'}, {'photo_id': 1370512769, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/9479edf086a79fb4baafacb34558d8d2.jpg', 'username': None, 'uploaded_at': 1751613398, 'text': 'image_04072025_09_15_25_10136.jpg'}, {'photo_id': 1370512724, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/4/cf6af12b912439575a71c993f98e8f22.jpg', 'username': None, 'uploaded_at': 1751613398, 'text': 'image_04072025_09_15_35_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ?????????????????????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0036911964416503906 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 24583904, '2025-07-04' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1951450,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02835249900817871 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= 1951450 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1951450, 'dashboard_run_id': 1959037, 'mtr_portfolio_id': 24581990, 'dashboard_result_id': 12114324, '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_P24581990_04-07-2025_08_57_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24582049, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24582050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24582051, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24582052, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24582053, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24582054, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24582055, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24582056, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24582057, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24582058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24582059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24582060, 'pht': 3726}}"}, {'dashboat_entry_day': 1951450, 'dashboard_run_id': 1959037, 'mtr_portfolio_id': 24580137, 'dashboard_result_id': 12114325, '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_P24580137_04-07-2025_08_50_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24580142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24580143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24580144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24580145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24580146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24580147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24580148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24580149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24580150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24580151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24580152, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24580153, 'pht': 3726}}"}, {'dashboat_entry_day': 1951450, 'dashboard_run_id': 1959037, 'mtr_portfolio_id': 24580345, 'dashboard_result_id': 12114326, '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_P24580345_04-07-2025_08_46_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24580406, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24580407, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24580408, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24580409, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24580410, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24580411, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24580412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24580413, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24580414, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24580415, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24580416, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24580417, 'pht': 3726}}"}, {'dashboat_entry_day': 1951450, 'dashboard_run_id': 1959037, 'mtr_portfolio_id': 24581606, 'dashboard_result_id': 12114327, '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_P24581606_04-07-2025_09_06_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24581648, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24581649, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24581650, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24581651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24581652, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24581653, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24581654, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24581655, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24581656, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24581657, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24581658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24581659, 'pht': 3726}}"}, {'dashboat_entry_day': 1951450, 'dashboard_run_id': 1959037, 'mtr_portfolio_id': 24582937, 'dashboard_result_id': 12114328, '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_P24582937_04-07-2025_09_19_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24582973, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24582974, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24582975, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24582976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24582977, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24582978, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24582979, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24582980, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24582981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24582982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24582983, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24582984, 'pht': 3726}}"}, {'dashboat_entry_day': 1951450, 'dashboard_run_id': 1959037, 'mtr_portfolio_id': 24583904, 'dashboard_result_id': 12114329, '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_P24583904_04-07-2025_09_28_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24583907, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24583908, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24583909, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24583910, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24583911, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24583912, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24583913, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24583914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24583915, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24583916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24583917, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24583918, '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 = 24581990 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 = 24581990 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 = 24581990 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24581990 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 = 24581990 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 = 24581990 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24581990_04-07-2025_09_09_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24581990 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_P24581990_04-07-2025_09_09_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24582049, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24582050, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24582051, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24582052, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24582053, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24582054, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24582055, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24582056, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24582057, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24582058, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24582059, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24582060, 'pht': 3726}}" where mtr_portfolio_id = 24581990 and dashboard_run_id = 1959037 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 = 24580137 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': 3234437, 'mtr_portfolio_id': 24580137, 'created_at': datetime.datetime(2025, 7, 4, 8, 50, 58), 'result': '0.05196932696448502', 'result_long': None, 'result_double': None}] Qualite : 0.05196932696448502 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24580137 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24580137_04-07-2025_08_50_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24580137 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_P24580137_04-07-2025_08_50_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24580142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24580143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24580144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24580145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24580146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24580147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24580148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24580149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24580150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24580151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24580152, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24580153, 'pht': 3726}}" where mtr_portfolio_id = 24580137 and dashboard_run_id = 1959037 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`=24580137 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12114325, 0.05196932696448502, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24580137_04-07-2025_08_50_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 24580142, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24580143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24580144, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24580145, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24580146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24580147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24580148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24580149, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24580150, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24580151, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24580152, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24580153, '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 = 24580345 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': 3234502, 'mtr_portfolio_id': 24580345, 'created_at': datetime.datetime(2025, 7, 4, 8, 46, 56), 'result': '0.03849710588211739', 'result_long': None, 'result_double': None}] Qualite : 0.03849710588211739 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24580345 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24580345_04-07-2025_08_46_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24580345 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_P24580345_04-07-2025_08_46_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24580406, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24580407, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24580408, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24580409, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24580410, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24580411, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24580412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24580413, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24580414, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24580415, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24580416, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24580417, 'pht': 3726}}" where mtr_portfolio_id = 24580345 and dashboard_run_id = 1959037 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`=24580345 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12114326, 0.03849710588211739, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24580345_04-07-2025_08_46_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24580406, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24580407, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24580408, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24580409, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24580410, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24580411, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24580412, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24580413, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24580414, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24580415, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24580416, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24580417, '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 = 24581606 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': 3234711, 'mtr_portfolio_id': 24581606, 'created_at': datetime.datetime(2025, 7, 4, 9, 6, 59), 'result': '0.048503315117755456', 'result_long': None, 'result_double': None}] Qualite : 0.048503315117755456 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24581606 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24581606_04-07-2025_09_06_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24581606 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_P24581606_04-07-2025_09_06_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24581648, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24581649, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24581650, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24581651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24581652, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24581653, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24581654, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24581655, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24581656, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24581657, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24581658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24581659, 'pht': 3726}}" where mtr_portfolio_id = 24581606 and dashboard_run_id = 1959038 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`=24581606 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12114327, 0.048503315117755456, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24581606_04-07-2025_09_06_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24581648, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24581649, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24581650, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24581651, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24581652, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24581653, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24581654, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24581655, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24581656, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24581657, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24581658, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24581659, '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 = 24582937 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': 3234843, 'mtr_portfolio_id': 24582937, 'created_at': datetime.datetime(2025, 7, 4, 9, 19, 27), 'result': '0.1140078252282661', 'result_long': None, 'result_double': None}] Qualite : 0.1140078252282661 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24582937 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24582937_04-07-2025_09_19_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24582937 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_P24582937_04-07-2025_09_19_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24582973, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24582974, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24582975, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24582976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24582977, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24582978, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24582979, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24582980, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24582981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24582982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24582983, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24582984, 'pht': 3726}}" where mtr_portfolio_id = 24582937 and dashboard_run_id = 1959038 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`=24582937 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12114328, 0.1140078252282661, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24582937_04-07-2025_09_19_28.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24582973, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24582974, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24582975, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24582976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24582977, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24582978, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24582979, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24582980, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24582981, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24582982, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24582983, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24582984, '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 = 24583904 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': 3234941, 'mtr_portfolio_id': 24583904, 'created_at': datetime.datetime(2025, 7, 4, 9, 33), 'result': '0.11391962360166942', 'result_long': None, 'result_double': None}] Qualite : 0.11391962360166942 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24583904 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24583904_04-07-2025_09_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24583904 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_P24583904_04-07-2025_09_33_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24583907, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24583908, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24583909, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24583910, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24583911, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24583912, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24583913, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24583914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24583915, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24583916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24583917, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24583918, 'pht': 3726}}" where mtr_portfolio_id = 24583904 and dashboard_run_id = 1959038 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`=24583904 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12114329, 0.11391962360166942, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24583904_04-07-2025_09_33_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24583907, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24583908, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24583909, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24583910, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24583911, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24583912, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24583913, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24583914, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24583915, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24583916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24583917, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24583918, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24581990,24580137,24580345,24581606,24582937,24583904) result : ((1370494762,), (1370494763,), (1370494767,), (1370494773,), (1370494775,), (1370494780,), (1370494791,), (1370494794,), (1370494800,), (1370494803,), (1370494811,), (1370494814,), (1370494829,), (1370494832,), (1370494836,), (1370494840,), (1370494844,), (1370494848,), (1370494863,), (1370494865,), (1370494868,), (1370494870,), (1370494872,), (1370494875,), (1370494880,), (1370494881,), (1370494883,), (1370494885,), (1370494886,), (1370494887,), (1370494901,), (1370494911,), (1370494917,), (1370494920,), (1370494924,), (1370494928,), (1370494948,), (1370494951,), (1370494953,), (1370494956,), (1370494963,), (1370494966,), (1370494978,), (1370494982,), (1370494988,), (1370494990,), (1370494992,), (1370494993,), (1370495000,), (1370495010,), (1370495017,), (1370495024,), (1370495027,), (1370495033,), (1370495108,), (1370495111,), (1370495116,), (1370495119,), (1370495129,), (1370495131,), (1370495406,), (1370495410,), (1370495416,), (1370495421,), (1370495426,), (1370495429,), (1370495643,), (1370495650,), (1370495656,), (1370495666,), (1370495682,), (1370495698,), (1370496401,), (1370496412,), (1370496473,), (1370496512,), (1370496531,), (1370496570,), (1370497148,), (1370497182,), (1370497221,), (1370497265,), (1370497342,), (1370497424,), (1370498581,), (1370498653,), (1370498721,), (1370498786,), (1370498855,), (1370498901,), (1370500581,), (1370500593,), (1370500628,), (1370500663,), (1370500698,), (1370500739,), (1370495053,), (1370495066,), (1370495072,), (1370495084,), (1370495088,), (1370495091,), (1370495155,), (1370495171,), (1370495178,), (1370495192,), (1370495217,), (1370495239,), (1370495288,), (1370495291,), (1370495313,), (1370495321,), (1370495325,), (1370495332,), (1370495347,), (1370495375,), (1370495379,), (1370495382,), (1370495391,), (1370495396,), (1370495448,), (1370495459,), (1370495475,), (1370495506,), (1370495530,), (1370495552,), (1370495580,), (1370495582,), (1370495588,), (1370495598,), (1370495612,), (1370495619,), (1370495726,), (1370495753,), (1370495763,), (1370495770,), (1370495805,), (1370495840,), (1370495922,), (1370495927,), (1370495961,), (1370495998,), (1370496033,), (1370496071,), (1370496233,), (1370496246,), (1370496253,), (1370496267,), (1370496274,), (1370496281,), (1370496631,), (1370496645,), (1370496669,), (1370496689,), (1370496698,), (1370496711,), (1370496782,), (1370496785,), (1370496788,), (1370496791,), (1370496794,), (1370496800,), (1370496917,), (1370496959,), (1370497011,), (1370497065,), (1370497076,), (1370497092,), (1370497646,), (1370497682,), (1370497715,), (1370497720,), (1370497777,), (1370497865,), (1370498035,), (1370498057,), (1370498073,), (1370498097,), (1370498152,), (1370498200,), (1370498283,), (1370498302,), (1370498347,), (1370498383,), (1370498406,), (1370498411,), (1370499141,), (1370499185,), (1370499232,), (1370499277,), (1370499347,), (1370499426,), (1370499735,), (1370499809,), (1370499915,), (1370499994,), (1370500029,), (1370500063,), (1370500213,), (1370500307,), (1370500386,), (1370500441,), (1370500475,), (1370500509,), (1370500884,), (1370500919,), (1370500954,), (1370501017,), (1370501086,), (1370501149,), (1370501190,), (1370501236,), (1370501289,), (1370501330,), (1370501396,), (1370501438,), (1370501600,), (1370501641,), (1370501680,), (1370501693,), (1370501717,), (1370501753,), (1370502079,), (1370502097,), (1370502117,), (1370502162,), (1370502172,), (1370502177,), (1370502356,), (1370502432,), (1370502508,), (1370502595,), (1370502654,), (1370502678,), (1370502781,), (1370502792,), (1370502810,), (1370502850,), (1370502871,), (1370502908,), (1370503167,), (1370503171,), (1370503175,), (1370503184,), (1370503219,), (1370503232,), (1370503264,), (1370503284,), (1370503339,), (1370503354,), (1370503381,), (1370503389,), (1370503431,), (1370503435,), (1370503458,), (1370503492,), (1370503534,), (1370503555,), (1370504429,), (1370504541,), (1370504686,), (1370504849,), (1370504957,), (1370505027,), (1370505954,), (1370505992,), (1370505999,), (1370506011,), (1370506040,), (1370506062,), (1370501824,), (1370501861,), (1370501896,), (1370501930,), (1370501950,), (1370501954,), (1370503008,), (1370503018,), (1370503033,), (1370503082,), (1370503091,), (1370503092,), (1370503608,), (1370503687,), (1370503791,), (1370503866,), (1370503935,), (1370504034,), (1370506203,), (1370506209,), (1370506235,), (1370506253,), (1370506262,), (1370506285,), (1370506984,), (1370508171,), (1370508212,), (1370508254,), (1370508329,), (1370508419,), (1370508517,), (1370509734,), (1370509767,), (1370509780,), (1370509830,), (1370509837,), (1370509857,), (1370506450,), (1370506531,), (1370506620,), (1370506794,), (1370506872,), (1370507200,), (1370507288,), (1370507353,), (1370507406,), (1370507506,), (1370507579,), (1370507769,), (1370507794,), (1370507849,), (1370507911,), (1370507933,), (1370508000,), (1370508774,), (1370508777,), (1370508841,), (1370508848,), (1370508883,), (1370508889,), (1370508912,), (1370508915,), (1370508944,), (1370508947,), (1370508967,), (1370508969,), (1370509008,), (1370509015,), (1370509061,), (1370509095,), (1370509138,), (1370509178,), (1370509339,), (1370509373,), (1370509407,), (1370509443,), (1370509518,), (1370509534,), (1370510055,), (1370510057,), (1370510095,), (1370510096,), (1370510138,), (1370510140,), (1370510157,), (1370510159,), (1370510165,), (1370510166,), (1370510174,), (1370510176,), (1370510227,), (1370510251,), (1370510274,), (1370510297,), (1370510309,), (1370510323,), (1370510497,), (1370510562,), (1370510579,), (1370510605,), (1370510720,), (1370510837,), (1370511234,), (1370511239,), (1370511284,), (1370511292,), (1370511334,), (1370511338,), (1370511373,), (1370511380,), (1370511417,), (1370511418,), (1370511436,), (1370511439,), (1370511555,), (1370511563,), (1370511586,), (1370511592,), (1370511594,), (1370511598,), (1370511698,), (1370511734,), (1370511769,), (1370511824,), (1370511856,), (1370511861,), (1370512091,), (1370512093,), (1370512095,), (1370512096,), (1370512098,), (1370512099,), (1370512101,), (1370512103,), (1370512106,), (1370512107,), (1370512111,), (1370512112,), (1370512214,), (1370512252,), (1370512285,), (1370512290,), (1370512294,), (1370512297,), (1370512357,), (1370512360,), (1370512389,), (1370512400,), (1370512409,), (1370512414,), (1370512700,), (1370512704,), (1370512724,), (1370512769,), (1370512799,), (1370512803,), (1370512815,), (1370512817,), (1370512826,), (1370512864,), (1370512877,), (1370512889,), (1370512903,), (1370512963,), (1370513023,), (1370513065,), (1370513100,), (1370513134,), (1370513827,), (1370513851,), (1370513861,), (1370513872,), (1370513893,), (1370513914,), (1370513979,), (1370513992,), (1370514016,), (1370514020,), (1370514029,), (1370514068,), (1370514161,), (1370514163,), (1370514166,), (1370514174,), (1370514197,), (1370514277,), (1370514945,), (1370514950,), (1370514973,), (1370514985,), (1370514995,), (1370514998,), (1370515116,), (1370515125,), (1370515127,), (1370515215,), (1370515233,), (1370515238,), (1370515307,), (1370515310,), (1370515378,), (1370515390,), (1370515395,), (1370515470,), (1370515875,), (1370515928,), (1370515996,), (1370516203,), (1370516336,), (1370516444,), (1370516703,), (1370516779,), (1370516850,), (1370516930,), (1370516987,), (1370517044,), (1370517202,), (1370517253,), (1370517303,), (1370517339,), (1370517351,), (1370517368,), (1370517942,), (1370517990,), (1370518026,), (1370518065,), (1370518099,), (1370518133,), (1370518218,), (1370518228,), (1370518242,), (1370518248,), (1370518267,), (1370518274,), (1370518299,), (1370518311,), (1370518322,), (1370518417,), (1370518436,), (1370518451,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04072025': {'nb_upload': 90, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24583904]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] map_info['map_portfolio_photo'] : {24583904: [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299, 1370518274, 1370518267, 1370518248, 1370518242, 1370518228, 1370518218, 1370518133, 1370518099, 1370518065, 1370518026, 1370517990, 1370517942, 1370517368, 1370517351, 1370517339, 1370517303, 1370517253, 1370517202, 1370517044, 1370516987, 1370516930, 1370516850, 1370516779, 1370516703, 1370516444, 1370516336, 1370516203, 1370515996, 1370515928, 1370515875, 1370515470, 1370515395, 1370515390, 1370515378, 1370515310, 1370515307, 1370515238, 1370515233, 1370515215, 1370515127, 1370515125, 1370515116, 1370514998, 1370514995, 1370514985, 1370514973, 1370514950, 1370514945, 1370514277, 1370514197, 1370514174, 1370514166, 1370514163, 1370514161, 1370514068, 1370514029, 1370514020, 1370514016, 1370513992, 1370513979, 1370513914, 1370513893, 1370513872, 1370513861, 1370513851, 1370513827, 1370513134, 1370513100, 1370513065, 1370513023, 1370512963, 1370512903, 1370512889, 1370512877, 1370512864, 1370512826, 1370512817, 1370512815, 1370512803, 1370512799, 1370512769, 1370512724, 1370512704, 1370512700]} final : True mtd_id 4302 list_pids : [1370518451, 1370518436, 1370518417, 1370518322, 1370518311, 1370518299] Looping around the photos to save general results len do output : 1 /24583904Didn'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, '3234941') ('4302', '24583904', '1370518451', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518436', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518417', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518322', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518311', None, None, None, None, None, '3234941') ('4302', None, None, None, None, None, None, None, '3234941') ('4302', '24583904', '1370518299', None, None, None, None, None, '3234941') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24583904', 'None', None, None, None, None, '3234941'), ('4302', '24583904', '1370518451', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518436', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518417', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518322', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518311', None, None, None, None, None, '3234941'), ('4302', '24583904', '1370518299', None, None, None, None, None, '3234941')] time used for this insertion : 0.011933088302612305 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.48960065841674805 time spend to save output : 0.01216578483581543 total time spend for step 5 : 0.5017664432525635 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 (3234941) 2.09user 2.67system 0:09.23elapsed 51%CPU (0avgtext+0avgdata 158320maxresident)k 15016inputs+8448outputs (158major+63835minor)pagefaults 0swaps