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 : 2599923 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 (3468033) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3468033) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754559 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3468033'] with mtr_portfolio_ids : ['25754559'] and first list_photo_ids : [] new path : /proc/2599923/ Name: python3 Umask: 0002 State: R (running) Tgid: 2599923 Ngid: 0 Pid: 2599923 PPid: 2599922 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2599923 NSpid: 2599923 NSpgid: 2598773 NSsid: 2598773 VmPeak: 1106964 kB VmSize: 1106964 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99160 kB VmRSS: 99160 kB RssAnon: 59816 kB RssFile: 39344 kB RssShmem: 0 kB VmData: 865716 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 548 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/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: 46 nonvoluntary_ctxt_switches: 40 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2599923', 'Ngid': '0', 'Pid': '2599923', 'PPid': '2599922', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2599923', 'NSpid': '2599923', 'NSpgid': '2598773', 'NSsid': '2598773', 'VmPeak': '1106964 kB', 'VmSize': '1106964 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99160 kB', 'VmRSS': '99160 kB', 'RssAnon': '59816 kB', 'RssFile': '39344 kB', 'RssShmem': '0 kB', 'VmData': '865716 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '548 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/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': '46', 'nonvoluntary_ctxt_switches': '40'} ('datou_batch_current', '2599923', '1106964', '0', '1106964', '865716', '99160', b'', 'marlene', '3468033') 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 (25754559) 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 (3468033 ) ) 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 (25754559) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1375559219, 'portfolio_id': 25754559}, {'photo_id': 1375559215, 'portfolio_id': 25754559}, {'photo_id': 1375559213, 'portfolio_id': 25754559}, {'photo_id': 1375559212, 'portfolio_id': 25754559}, {'photo_id': 1375559202, 'portfolio_id': 25754559}, {'photo_id': 1375559201, 'portfolio_id': 25754559}, {'photo_id': 1375559200, 'portfolio_id': 25754559}, {'photo_id': 1375559199, 'portfolio_id': 25754559}, {'photo_id': 1375559174, 'portfolio_id': 25754559}, {'photo_id': 1375559155, 'portfolio_id': 25754559}, {'photo_id': 1375559154, 'portfolio_id': 25754559}, {'photo_id': 1375559130, 'portfolio_id': 25754559}, {'photo_id': 1375559020, 'portfolio_id': 25754559}, {'photo_id': 1375559011, 'portfolio_id': 25754559}, {'photo_id': 1375558987, 'portfolio_id': 25754559}, {'photo_id': 1375558963, 'portfolio_id': 25754559}, {'photo_id': 1375558938, 'portfolio_id': 25754559}, {'photo_id': 1375558914, 'portfolio_id': 25754559}, {'photo_id': 1375558692, 'portfolio_id': 25754559}, {'photo_id': 1375558667, 'portfolio_id': 25754559}, {'photo_id': 1375558642, 'portfolio_id': 25754559}, {'photo_id': 1375558621, 'portfolio_id': 25754559}, {'photo_id': 1375558620, 'portfolio_id': 25754559}, {'photo_id': 1375558619, 'portfolio_id': 25754559}, {'photo_id': 1375558605, 'portfolio_id': 25754559}, {'photo_id': 1375558604, 'portfolio_id': 25754559}, {'photo_id': 1375558603, 'portfolio_id': 25754559}, {'photo_id': 1375558602, 'portfolio_id': 25754559}, {'photo_id': 1375558582, 'portfolio_id': 25754559}, {'photo_id': 1375558581, 'portfolio_id': 25754559}, {'photo_id': 1375558580, 'portfolio_id': 25754559}, {'photo_id': 1375558567, 'portfolio_id': 25754559}, {'photo_id': 1375558564, 'portfolio_id': 25754559}, {'photo_id': 1375558562, 'portfolio_id': 25754559}, {'photo_id': 1375558557, 'portfolio_id': 25754559}, {'photo_id': 1375558556, 'portfolio_id': 25754559}, {'photo_id': 1375558555, 'portfolio_id': 25754559}, {'photo_id': 1375558531, 'portfolio_id': 25754559}, {'photo_id': 1375558528, 'portfolio_id': 25754559}, {'photo_id': 1375558527, 'portfolio_id': 25754559}, {'photo_id': 1375558526, 'portfolio_id': 25754559}, {'photo_id': 1375558456, 'portfolio_id': 25754559}, {'photo_id': 1375558449, 'portfolio_id': 25754559}, {'photo_id': 1375558448, 'portfolio_id': 25754559}, {'photo_id': 1375558437, 'portfolio_id': 25754559}, {'photo_id': 1375558266, 'portfolio_id': 25754559}, {'photo_id': 1375558264, 'portfolio_id': 25754559}, {'photo_id': 1375558262, 'portfolio_id': 25754559}, {'photo_id': 1375558261, 'portfolio_id': 25754559}, {'photo_id': 1375558260, 'portfolio_id': 25754559}, {'photo_id': 1375558038, 'portfolio_id': 25754559}, {'photo_id': 1375557991, 'portfolio_id': 25754559}, {'photo_id': 1375557954, 'portfolio_id': 25754559}, {'photo_id': 1375557926, 'portfolio_id': 25754559}, {'photo_id': 1375557898, 'portfolio_id': 25754559}, {'photo_id': 1375557851, 'portfolio_id': 25754559}, {'photo_id': 1375557362, 'portfolio_id': 25754559}, {'photo_id': 1375557326, 'portfolio_id': 25754559}] map_portfolio_id_photo_id: {25754559: [1375559219, 1375559215, 1375559213, 1375559212, 1375559202, 1375559201, 1375559200, 1375559199, 1375559174, 1375559155, 1375559154, 1375559130, 1375559020, 1375559011, 1375558987, 1375558963, 1375558938, 1375558914, 1375558692, 1375558667, 1375558642, 1375558621, 1375558620, 1375558619, 1375558605, 1375558604, 1375558603, 1375558602, 1375558582, 1375558581, 1375558580, 1375558567, 1375558564, 1375558562, 1375558557, 1375558556, 1375558555, 1375558531, 1375558528, 1375558527, 1375558526, 1375558456, 1375558449, 1375558448, 1375558437, 1375558266, 1375558264, 1375558262, 1375558261, 1375558260, 1375558038, 1375557991, 1375557954, 1375557926, 1375557898, 1375557851, 1375557362, 1375557326]} ##### 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.015338420867919922 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Aug 7 02:14:28 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 (25754559) 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 : 25754559 get user id for portfolio 25754559 get sub ptf for main ptf 25754559, type 3726 and hashtags ['autre_refus', 'papier', 'Carton_brun', 'Carton_gris', 'plastique', 'environnement', 'mal_croppe', 'cartonnette', 'metal', 'flou', 'Teint_Dans_La_Masse', 'kraft'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25754559 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','Carton_brun','Carton_gris','plastique','environnement','mal_croppe','cartonnette','metal','flou','Teint_Dans_La_Masse','kraft')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25754559 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','Carton_brun','Carton_gris','plastique','environnement','mal_croppe','cartonnette','metal','flou','Teint_Dans_La_Masse','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 25754559, 'sub_port_id': 25754576, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358878, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'plastique': {'main_port_id': 25754559, 'sub_port_id': 25754577, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358879, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'kraft': {'main_port_id': 25754559, 'sub_port_id': 25754578, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358880, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'flou': {'main_port_id': 25754559, 'sub_port_id': 25754579, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358881, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'mal_croppe': {'main_port_id': 25754559, 'sub_port_id': 25754580, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358882, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'Carton_brun': {'main_port_id': 25754559, 'sub_port_id': 25754581, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358883, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'papier': {'main_port_id': 25754559, 'sub_port_id': 25754582, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358884, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'Carton_gris': {'main_port_id': 25754559, 'sub_port_id': 25754583, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358885, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 25754559, 'sub_port_id': 25754584, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358886, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'autre_refus': {'main_port_id': 25754559, 'sub_port_id': 25754585, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358887, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'cartonnette': {'main_port_id': 25754559, 'sub_port_id': 25754586, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358888, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}, 'environnement': {'main_port_id': 25754559, 'sub_port_id': 25754587, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358889, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25754576 , 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=25754559 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 (25754576) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754577 , 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=25754559 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 (25754577) result : ((1375559227,), (1375559228,), (1375559229,), (1375559230,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754578 , 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=25754559 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 (25754578) result : ((1375558601,), (1375558865,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754579 , 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=25754559 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 (25754579) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754580 , 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=25754559 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 (25754580) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754581 , 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=25754559 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 (25754581) result : ((1375558600,), (1375558851,), (1375558853,), (1375558855,), (1375558858,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754582 , 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=25754559 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 (25754582) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754583 , 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=25754559 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 (25754583) result : ((1375558596,), (1375558597,), (1375558834,), (1375559197,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754584 , 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=25754559 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 (25754584) result : ((1375558594,), (1375558595,), (1375559195,), (1375559196,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754585 , 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=25754559 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 (25754585) result : ((1375558826,), (1375559226,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754586 , 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=25754559 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 (25754586) result : ((1375558598,), (1375558599,), (1375558841,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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 25754587 , 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=25754559 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 (25754587) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25754559) result : ((1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) 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 (1375559200) 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`=25754559 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','Carton_brun','Carton_gris','plastique','environnement','mal_croppe','cartonnette','metal','flou','Teint_Dans_La_Masse','kraft')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25754559 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','Carton_brun','Carton_gris','plastique','environnement','mal_croppe','cartonnette','metal','flou','Teint_Dans_La_Masse','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 25754559, 'sub_port_id': 25754608, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358908, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'plastique': {'main_port_id': 25754559, 'sub_port_id': 25754609, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358909, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'kraft': {'main_port_id': 25754559, 'sub_port_id': 25754610, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358910, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'flou': {'main_port_id': 25754559, 'sub_port_id': 25754611, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358911, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'mal_croppe': {'main_port_id': 25754559, 'sub_port_id': 25754612, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358912, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'Carton_brun': {'main_port_id': 25754559, 'sub_port_id': 25754613, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358913, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'papier': {'main_port_id': 25754559, 'sub_port_id': 25754614, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358914, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'Carton_gris': {'main_port_id': 25754559, 'sub_port_id': 25754615, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358915, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 25754559, 'sub_port_id': 25754616, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358916, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'autre_refus': {'main_port_id': 25754559, 'sub_port_id': 25754617, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358917, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'cartonnette': {'main_port_id': 25754559, 'sub_port_id': 25754618, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358918, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 3, 34), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}, 'environnement': {'main_port_id': 25754559, 'sub_port_id': 25754619, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17358919, 'last_updated_at': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 8, 7, 2, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 8, 7, 2, 3, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754608,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754576 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754609,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754577 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754610,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754578 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754611,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754579 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754612,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754580 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754613,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754581 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754614,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754582 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754615,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754583 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754616,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754584 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754617,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754585 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754618,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754586 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25754619,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25754587 lien utilise dans velours : https://www.fotonower.com/velours/25754608,25754609,25754610,25754611,25754612,25754613,25754614,25754615,25754616,25754617,25754618,25754619?tags=metal,plastique,kraft,flou,mal_croppe,Carton_brun,papier,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25754559]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1375559219, 1375559215, 1375559213, 1375559212] map_info['map_portfolio_photo'] : {25754559: [1375559219, 1375559215, 1375559213, 1375559212, 1375559202, 1375559201, 1375559200, 1375559199, 1375559174, 1375559155, 1375559154, 1375559130, 1375559020, 1375559011, 1375558987, 1375558963, 1375558938, 1375558914, 1375558692, 1375558667, 1375558642, 1375558621, 1375558620, 1375558619, 1375558605, 1375558604, 1375558603, 1375558602, 1375558582, 1375558581, 1375558580, 1375558567, 1375558564, 1375558562, 1375558557, 1375558556, 1375558555, 1375558531, 1375558528, 1375558527, 1375558526, 1375558456, 1375558449, 1375558448, 1375558437, 1375558266, 1375558264, 1375558262, 1375558261, 1375558260, 1375558038, 1375557991, 1375557954, 1375557926, 1375557898, 1375557851, 1375557362, 1375557326]} final : False mtd_id 4302 list_pids : [1375559219, 1375559215, 1375559213, 1375559212] Looping around the photos to save general results len do output : 1 /25754559. 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, '3468033') ('4302', '25754559', '1375559219', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559215', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559213', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559212', None, None, None, None, None, '3468033') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25754559', "{'metal': 25754576, 'plastique': 25754577, 'kraft': 25754578, 'flou': 25754579, 'mal_croppe': 25754580, 'Carton_brun': 25754581, 'papier': 25754582, 'Carton_gris': 25754583, 'Teint_Dans_La_Masse': 25754584, 'autre_refus': 25754585, 'cartonnette': 25754586, 'environnement': 25754587}", None, None, None, None, '3468033'), ('4302', '25754559', '1375559219', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559215', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559213', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559212', None, None, None, None, None, '3468033')] time used for this insertion : 0.013535499572753906 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.42841601371765137 time spend to save output : 0.013885259628295898 total time spend for step 1 : 0.44230127334594727 step2:final Thu Aug 7 02:14:29 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 (25754559) 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 25754559 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1375557362,1375557326,1375558038,1375557991,1375557954,1375557926,1375557898,1375557851,1375558266,1375558264,1375558262,1375558261,1375558260,1375558456,1375558449,1375558448,1375558437,1375558531,1375558528,1375558527,1375558526,1375558567,1375558564,1375558562,1375558557,1375558556,1375558555,1375558582,1375558581,1375558580,1375558605,1375558604,1375558603,1375558602,1375558692,1375558667,1375558642,1375558619,1375558621,1375558620,1375559020,1375559011,1375558987,1375558963,1375558938,1375558914,1375559174,1375559155,1375559154,1375559130,1375559202,1375559201,1375559200,1375559199,1375559219,1375559215,1375559213,1375559212); 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([25754559]) Inside saveOutput : final : False verbose : True original output for save of step final : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',)} new output for save of step final : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',)} [1375559219, 1375559215, 1375559213, 1375559212] map_info['map_portfolio_photo'] : {25754559: [1375559219, 1375559215, 1375559213, 1375559212, 1375559202, 1375559201, 1375559200, 1375559199, 1375559174, 1375559155, 1375559154, 1375559130, 1375559020, 1375559011, 1375558987, 1375558963, 1375558938, 1375558914, 1375558692, 1375558667, 1375558642, 1375558621, 1375558620, 1375558619, 1375558605, 1375558604, 1375558603, 1375558602, 1375558582, 1375558581, 1375558580, 1375558567, 1375558564, 1375558562, 1375558557, 1375558556, 1375558555, 1375558531, 1375558528, 1375558527, 1375558526, 1375558456, 1375558449, 1375558448, 1375558437, 1375558266, 1375558264, 1375558262, 1375558261, 1375558260, 1375558038, 1375557991, 1375557954, 1375557926, 1375557898, 1375557851, 1375557362, 1375557326]} final : False mtd_id 4302 list_pids : [1375559219, 1375559215, 1375559213, 1375559212] Looping around the photos to save general results len do output : 4 /1375559219.Didn't retrieve data . /1375559215.Didn't retrieve data . /1375559213.Didn't retrieve data . /1375559212.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, '3468033') ('4302', '25754559', '1375559219', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559215', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559213', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559212', None, None, None, None, None, '3468033') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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', '25754559', '1375559219', '0.058156055183112225', None, None, None, None, '3468033'), ('4302', '25754559', '1375559215', '0.058156055183112225', None, None, None, None, '3468033'), ('4302', '25754559', '1375559213', '0.058156055183112225', None, None, None, None, '3468033'), ('4302', '25754559', '1375559212', '0.058156055183112225', None, None, None, None, '3468033')] time used for this insertion : 0.014644861221313477 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06993579864501953 time spend to save output : 0.014949798583984375 total time spend for step 2 : 0.0848855972290039 step3:velours_tree Thu Aug 7 02:14:29 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 : {25754559: [{'metal': 25754576, 'plastique': 25754577, 'kraft': 25754578, 'flou': 25754579, 'mal_croppe': 25754580, 'Carton_brun': 25754581, 'papier': 25754582, 'Carton_gris': 25754583, 'Teint_Dans_La_Masse': 25754584, 'autre_refus': 25754585, 'cartonnette': 25754586, 'environnement': 25754587}]} input_args_next_step : {25754559: ()} output_args : {25754559: [{'metal': 25754576, 'plastique': 25754577, 'kraft': 25754578, 'flou': 25754579, 'mal_croppe': 25754580, 'Carton_brun': 25754581, 'papier': 25754582, 'Carton_gris': 25754583, 'Teint_Dans_La_Masse': 25754584, 'autre_refus': 25754585, 'cartonnette': 25754586, 'environnement': 25754587}]} args : 25754559 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 : ({'metal': 25754576, 'plastique': 25754577, 'kraft': 25754578, 'flou': 25754579, 'mal_croppe': 25754580, 'Carton_brun': 25754581, 'papier': 25754582, 'Carton_gris': 25754583, 'Teint_Dans_La_Masse': 25754584, 'autre_refus': 25754585, 'cartonnette': 25754586, 'environnement': 25754587},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25754559) 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([25754559]) 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.29171252250671387 time spend to save output : 5.745887756347656e-05 total time spend for step 3 : 0.29176998138427734 step4:send_mail_cod Thu Aug 7 02:14:29 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 : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',)} input_args_next_step : {1375559219: ()} output_args : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',)} args : 1375559219 depend.output_id : 0 input_args_next_step : {1375559219: ('0.058156055183112225',), 1375559215: ()} output_args : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',)} args : 1375559215 depend.output_id : 0 input_args_next_step : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ()} output_args : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',)} args : 1375559213 depend.output_id : 0 input_args_next_step : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ()} output_args : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',)} args : 1375559212 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 : {25754559: [{'metal': 25754576, 'plastique': 25754577, 'kraft': 25754578, 'flou': 25754579, 'mal_croppe': 25754580, 'Carton_brun': 25754581, 'papier': 25754582, 'Carton_gris': 25754583, 'Teint_Dans_La_Masse': 25754584, 'autre_refus': 25754585, 'cartonnette': 25754586, 'environnement': 25754587}]} input_args_next_step : {1375559219: ('0.058156055183112225',), 1375559215: ('0.058156055183112225',), 1375559213: ('0.058156055183112225',), 1375559212: ('0.058156055183112225',), 25754559: ()} output_args : {25754559: [{'metal': 25754576, 'plastique': 25754577, 'kraft': 25754578, 'flou': 25754579, 'mal_croppe': 25754580, 'Carton_brun': 25754581, 'papier': 25754582, 'Carton_gris': 25754583, 'Teint_Dans_La_Masse': 25754584, 'autre_refus': 25754585, 'cartonnette': 25754586, 'environnement': 25754587}]} args : 25754559 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 :5, first value : ('0.058156055183112225',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25754559) 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 (1375559219,1375559215,1375559213,1375559212) Found this number of photos: 4 ##### Call download_photos : nb_thread : 5 begin to download photo : 1375559212 begin to download photo : 1375559213 begin to download photo : 1375559215 begin to download photo : 1375559219 download finish for photo 1375559219 download finish for photo 1375559215 download finish for photo 1375559213 download finish for photo 1375559212 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette257545761754525669/ length of list_filenames : 4 ; length of list_pids : 4 ; length of list_args : 4 results_Auto_P25754559_07-08-2025_02_14_29.pdf 25754576 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=25754576 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette257545761754525669 25754577 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=25754577 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375559227: '1754525606_3977937_1375558667_14e5bc6d6f5c66a62b940f41bd72231b_rle_crop_3905322959_0.png', 1375559228: '1754525606_3977937_1375558667_14e5bc6d6f5c66a62b940f41bd72231b_rle_crop_3905322961_0.png', 1375559229: '1754525606_3977937_1375558667_14e5bc6d6f5c66a62b940f41bd72231b_rle_crop_3905322962_0.png', 1375559230: '1754525606_3977937_1375558642_cdf664da948f1eae6e32f0969a439f60_rle_crop_3905322976_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/a424d2709242a1874bf406c49da04fb9_43875282.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/e4162c1d8e27d9d59b1150ee00a3c2a8_97051426.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/31fc47301a0304f2645f65d6cdb9b8c3_94585566.png change filename to text .imagette257545771754525669/ imagette257545771754525669/1754525606_3977937_1375558642_cdf664da948f1eae6e32f0969a439f60_rle_crop_3905322976_0.png.png imagette257545771754525669/1754525606_3977937_1375558667_14e5bc6d6f5c66a62b940f41bd72231b_rle_crop_3905322959_0.png.png imagette257545771754525669/1754525606_3977937_1375558667_14e5bc6d6f5c66a62b940f41bd72231b_rle_crop_3905322962_0.png.png imagette257545771754525669/1754525606_3977937_1375558667_14e5bc6d6f5c66a62b940f41bd72231b_rle_crop_3905322961_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/d013047d365ce36a3b96a224445b53b3_40286222.png imagette257545771754525669 25754578 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=25754578 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375558601: '1754525247_3969193_1375558456_0d2d6e1f62c75c4672f135f97882e1e4_rle_crop_3905321369_0.png', 1375558865: '1754525365_3971961_1375558449_f26518a9ca469da08eba439d8616daaf_rle_crop_3905322607_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/c774320b29fab84456393db91770e654_64028294.png change filename to text .imagette257545781754525669/ imagette257545781754525669/1754525247_3969193_1375558456_0d2d6e1f62c75c4672f135f97882e1e4_rle_crop_3905321369_0.png.png imagette257545781754525669/1754525365_3971961_1375558449_f26518a9ca469da08eba439d8616daaf_rle_crop_3905322607_0.png.png imagette257545791754525670/ imagette257545801754525670/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/ffecb2a65701513ac63609a631cbdca2_93746857.png imagette257545781754525669 25754579 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=25754579 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette257545791754525670 25754580 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=25754580 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette257545801754525670 25754585 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=25754585 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375558826: '1754525365_3971961_1375558448_a5f913939831a42a1bc5273baed13589_rle_crop_3905322625_0.png', 1375559226: '1754525606_3977937_1375558642_cdf664da948f1eae6e32f0969a439f60_rle_crop_3905322978_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/4e48c0688c41c45313c1585d747e7934_97320704.png change filename to text .imagette257545851754525670/ imagette257545851754525670/1754525365_3971961_1375558448_a5f913939831a42a1bc5273baed13589_rle_crop_3905322625_0.png.png imagette257545851754525670/1754525606_3977937_1375558642_cdf664da948f1eae6e32f0969a439f60_rle_crop_3905322978_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/c5fb1d58c917e1870b4ac687bd5bcdbd_24048643.png imagette257545851754525670 25754586 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=25754586 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375558598: '1754525247_3969193_1375558264_3132d73c6dfdd6ca341ee89baddf42ec_rle_crop_3905321667_0.png', 1375558599: '1754525247_3969193_1375558264_3132d73c6dfdd6ca341ee89baddf42ec_rle_crop_3905321665_0.png', 1375558841: '1754525365_3971961_1375558437_53ceca039db3b238f62f3d7154a4bf51_rle_crop_3905322635_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/3471eb9bd28d680d65001115a5bb5067_41293613.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/8e3286f7ce294ae1d555b3fa06a42564_31976182.png change filename to text .imagette257545861754525670/ imagette257545861754525670/1754525247_3969193_1375558264_3132d73c6dfdd6ca341ee89baddf42ec_rle_crop_3905321665_0.png.png imagette257545861754525670/1754525247_3969193_1375558264_3132d73c6dfdd6ca341ee89baddf42ec_rle_crop_3905321667_0.png.png imagette257545861754525670/1754525365_3971961_1375558437_53ceca039db3b238f62f3d7154a4bf51_rle_crop_3905322635_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/6ada57896d48776531eb4f684196effe_59146650.png imagette257545861754525670 25754581 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=25754581 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375558600: '1754525247_3969193_1375558456_0d2d6e1f62c75c4672f135f97882e1e4_rle_crop_3905321371_0.png', 1375558851: '1754525365_3971961_1375558449_f26518a9ca469da08eba439d8616daaf_rle_crop_3905322615_0.png', 1375558853: '1754525365_3971961_1375558448_a5f913939831a42a1bc5273baed13589_rle_crop_3905322627_0.png', 1375558855: '1754525365_3971961_1375558448_a5f913939831a42a1bc5273baed13589_rle_crop_3905322626_0.png', 1375558858: '1754525365_3971961_1375558437_53ceca039db3b238f62f3d7154a4bf51_rle_crop_3905322634_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/29fbb56172e86a157ae68efa705a4fc0_63103303.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/2ef565b027ff2e3a62c58a2ea4509f25_21176788.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/d6a03875c9b3cba8e899337788227dea_64033905.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/640dfd5bd56a41a9c8d491ecc7e60458_87936093.png change filename to text .imagette257545811754525670/ imagette257545811754525670/1754525365_3971961_1375558449_f26518a9ca469da08eba439d8616daaf_rle_crop_3905322615_0.png.png imagette257545811754525670/1754525365_3971961_1375558437_53ceca039db3b238f62f3d7154a4bf51_rle_crop_3905322634_0.png.png imagette257545811754525670/1754525365_3971961_1375558448_a5f913939831a42a1bc5273baed13589_rle_crop_3905322627_0.png.png imagette257545811754525670/1754525365_3971961_1375558448_a5f913939831a42a1bc5273baed13589_rle_crop_3905322626_0.png.png imagette257545811754525670/1754525247_3969193_1375558456_0d2d6e1f62c75c4672f135f97882e1e4_rle_crop_3905321371_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/3e8dbbd5f7ab49a97aaff945e6b830fc_18524294.png imagette257545811754525670 25754583 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=25754583 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375558596: '1754525247_3969193_1375558262_4cc9c61b1745d4615581548784d46056_rle_crop_3905321672_0.png', 1375558597: '1754525247_3969193_1375558260_6e43d2d45d4c122171fe0b323698759b_rle_crop_3905321970_0.png', 1375558834: '1754525365_3971961_1375558437_53ceca039db3b238f62f3d7154a4bf51_rle_crop_3905322633_0.png', 1375559197: '1754525485_3975063_1375558604_0bc4ffbaf5921b2d7fd9894cd3cc24cf_rle_crop_3905322798_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/f16e92d11b9923c98ded361d9cb01a4a_86885942.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/96f1ac62b54c8daba642146e91ad823f_46364517.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/afb9955ab57860b0f4581484d4cb19e2_36744498.png change filename to text .imagette257545831754525670/ imagette257545831754525670/1754525247_3969193_1375558260_6e43d2d45d4c122171fe0b323698759b_rle_crop_3905321970_0.png.png imagette257545831754525670/1754525247_3969193_1375558262_4cc9c61b1745d4615581548784d46056_rle_crop_3905321672_0.png.png imagette257545831754525670/1754525365_3971961_1375558437_53ceca039db3b238f62f3d7154a4bf51_rle_crop_3905322633_0.png.png imagette257545831754525670/1754525485_3975063_1375558604_0bc4ffbaf5921b2d7fd9894cd3cc24cf_rle_crop_3905322798_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/f91216027e990d7ecf3573042ee1263d_73109997.png imagette257545831754525670 25754584 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=25754584 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375558594: '1754525247_3969193_1375558456_0d2d6e1f62c75c4672f135f97882e1e4_rle_crop_3905321375_0.png', 1375558595: '1754525247_3969193_1375558261_8d77a38b06c453da85f5a2dea7e255ad_rle_crop_3905321690_0.png', 1375559195: '1754525485_3975063_1375558603_3764c57f768eb513b4dad2cec8a851db_rle_crop_3905322804_0.png', 1375559196: '1754525485_3975063_1375558602_e572517e8f50548715bf1961909a2919_rle_crop_3905322818_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/5cd4d84b353d82838bdb97aa6ce6adec_71303117.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/c7e824cd29581f0093963bf31774188e_15095121.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/e12ec3f961a0144a0972c27b8aecb0c2_86177409.png change filename to text .imagette257545841754525670/ imagette257545841754525670/1754525485_3975063_1375558603_3764c57f768eb513b4dad2cec8a851db_rle_crop_3905322804_0.png.png imagette257545841754525670/1754525247_3969193_1375558456_0d2d6e1f62c75c4672f135f97882e1e4_rle_crop_3905321375_0.png.png imagette257545841754525670/1754525485_3975063_1375558602_e572517e8f50548715bf1961909a2919_rle_crop_3905322818_0.png.png imagette257545841754525670/1754525247_3969193_1375558261_8d77a38b06c453da85f5a2dea7e255ad_rle_crop_3905321690_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/12f22f28ff325267843afde13eaa1a57_69211092.png imagette257545841754525670 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25754559 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25754608,25754609,25754610,25754611,25754612,25754613,25754614,25754615,25754616,25754617,25754618,25754619?tags=metal,plastique,kraft,flou,mal_croppe,Carton_brun,papier,Carton_gris,Teint_Dans_La_Masse,autre_refus,cartonnette,environnement your option no_mail is active, we will not send the real mail to your client args[1375559219] : ('0.058156055183112225',) no score found for photo 1375559219 We are sending mail with results at report@fotonower.com args[1375559215] : ('0.058156055183112225',) no score found for photo 1375559215 We are sending mail with results at report@fotonower.com args[1375559213] : ('0.058156055183112225',) no score found for photo 1375559213 We are sending mail with results at report@fotonower.com args[1375559212] : ('0.058156055183112225',) no score found for photo 1375559212 We are sending mail with results at report@fotonower.com refus_total : 0.058156055183112225 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=25754559 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_P25754559_07-08-2025_02_14_29.pdf results_Auto_P25754559_07-08-2025_02_14_29.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25754559_07-08-2025_02_14_29.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','25754559','results_Auto_P25754559_07-08-2025_02_14_29.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25754559_07-08-2025_02_14_29.pdf','pdf','','0.13','0.058156055183112225') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25754559]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1375559219, 1375559215, 1375559213, 1375559212] map_info['map_portfolio_photo'] : {25754559: [1375559219, 1375559215, 1375559213, 1375559212, 1375559202, 1375559201, 1375559200, 1375559199, 1375559174, 1375559155, 1375559154, 1375559130, 1375559020, 1375559011, 1375558987, 1375558963, 1375558938, 1375558914, 1375558692, 1375558667, 1375558642, 1375558621, 1375558620, 1375558619, 1375558605, 1375558604, 1375558603, 1375558602, 1375558582, 1375558581, 1375558580, 1375558567, 1375558564, 1375558562, 1375558557, 1375558556, 1375558555, 1375558531, 1375558528, 1375558527, 1375558526, 1375558456, 1375558449, 1375558448, 1375558437, 1375558266, 1375558264, 1375558262, 1375558261, 1375558260, 1375558038, 1375557991, 1375557954, 1375557926, 1375557898, 1375557851, 1375557362, 1375557326]} final : False mtd_id 4302 list_pids : [1375559219, 1375559215, 1375559213, 1375559212] 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, '3468033') ('4302', '25754559', '1375559219', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559215', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559213', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559212', None, None, None, None, None, '3468033') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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', '25754559', '1375559219', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559215', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559213', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559212', None, None, None, None, None, '3468033')] time used for this insertion : 0.012711286544799805 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.574352741241455 time spend to save output : 0.01291346549987793 total time spend for step 4 : 2.587266206741333 step5:split_time_score Thu Aug 7 02:14:32 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 : ['25754559'] 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 : [('25754559',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25754559) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1375559219: {'path': 'temp/1754525669_2599923_1375559219_9b7219412bc0fcc3fd6bc91cfbf219d7.jpg', 'extension': 'jpg'}, 1375559215: {'path': 'temp/1754525669_2599923_1375559215_90b7fa91c08f88c66bec6e0faf9be861.jpg', 'extension': 'jpg'}, 1375559213: {'path': 'temp/1754525669_2599923_1375559213_ca963af9dffaf9fd6c1f36ff1e735ad8.jpg', 'extension': 'jpg'}, 1375559212: {'path': 'temp/1754525669_2599923_1375559212_82624497313098fdab22a70ac4712e3d.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 = 25754559; (('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 = 25754559 group by h (('02', 58),) 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=25754559 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 (25754559) 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 (25754559) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 07082025 25754559 Nombre de photos uploadées : 58 / 23040 (0%) 07082025 25754559 Nombre de photos taguées (types de déchets): 0 / 58 (0%) 07082025 25754559 Nombre de photos taguées (volume) : 0 / 58 (0%) [{'photo_id': 1375557362, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/1439bb598dbba0cb71096effe0622886.jpg', 'username': None, 'uploaded_at': 1754524867, 'text': 'image_07082025_02_00_14_10132.jpg'}, {'photo_id': 1375557326, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/55ee50dcfca35ec0ad94016936869bff.jpg', 'username': None, 'uploaded_at': 1754524867, 'text': 'image_07082025_02_00_33_9136.jpg'}, {'photo_id': 1375558038, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/4d14b50ac70a93b44c2b8c4d4137cd27.jpg', 'username': None, 'uploaded_at': 1754524927, 'text': 'image_07082025_02_00_43_10134.jpg'}, {'photo_id': 1375557991, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/7/c297c38e265bf1f0ab6e20e062620110.jpg', 'username': None, 'uploaded_at': 1754524927, 'text': 'image_07082025_02_01_03_10164.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ?????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0053691864013671875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25754559, '2025-08-07' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-08-07' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2077531,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21831107139587402 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= 2077531 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2077531, 'dashboard_run_id': 2085275, 'mtr_portfolio_id': 25751495, 'dashboard_result_id': 13701430, '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_P25751495_07-08-2025_00_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25751504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25751505, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25751506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25751507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25751508, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25751509, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25751510, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25751511, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25751512, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25751513, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25751514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25751515, 'pht': 3726}}"}, {'dashboat_entry_day': 2077531, 'dashboard_run_id': 2085275, 'mtr_portfolio_id': 25751863, 'dashboard_result_id': 13701431, '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_P25751863_07-08-2025_00_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25751873, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25751874, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25751875, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25751876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25751877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25751878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25751880, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25751881, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25751882, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25751883, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25751884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25751885, 'pht': 3726}}"}, {'dashboat_entry_day': 2077531, 'dashboard_run_id': 2085275, 'mtr_portfolio_id': 25752229, 'dashboard_result_id': 13701432, '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_P25752229_07-08-2025_00_48_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25752264, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25752265, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25752266, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25752267, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25752268, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25752269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25752270, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25752271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25752272, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25752273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25752274, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25752275, 'pht': 3726}}"}, {'dashboat_entry_day': 2077531, 'dashboard_run_id': 2085275, 'mtr_portfolio_id': 25752699, 'dashboard_result_id': 13701433, '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_P25752699_07-08-2025_01_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25752733, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25752734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25752735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25752736, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25752737, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25752738, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25752739, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25752740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25752741, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25752742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25752743, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25752744, 'pht': 3726}}"}, {'dashboat_entry_day': 2077531, 'dashboard_run_id': 2085275, 'mtr_portfolio_id': 25753911, 'dashboard_result_id': 13701434, '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_P25753911_07-08-2025_01_47_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25753920, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25753921, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25753922, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25753923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25753924, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25753925, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25753926, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25753927, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25753929, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25753930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25753931, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25753932, 'pht': 3726}}"}, {'dashboat_entry_day': 2077531, 'dashboard_run_id': 2085275, 'mtr_portfolio_id': 25754209, 'dashboard_result_id': 13701435, '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_P25754209_07-08-2025_02_03_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25754238, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25754239, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25754240, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25754241, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25754242, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25754243, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25754244, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25754245, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25754246, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25754247, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25754248, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25754249, 'pht': 3726}}"}, {'dashboat_entry_day': 2077531, 'dashboard_run_id': 2085275, 'mtr_portfolio_id': 25754559, 'dashboard_result_id': 13701436, '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_P25754559_07-08-2025_02_12_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25754576, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25754577, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25754578, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25754579, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25754580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25754581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25754582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25754583, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25754584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25754585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25754586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25754587, '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 = 25751495 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': 3467226, 'mtr_portfolio_id': 25751495, 'created_at': datetime.datetime(2025, 8, 7, 0, 16, 58), 'result': '0.043024123986127524', 'result_long': None, 'result_double': None}] Qualite : 0.043024123986127524 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25751495 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25751495_07-08-2025_00_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25751495 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_P25751495_07-08-2025_00_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25751504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25751505, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25751506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25751507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25751508, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25751509, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25751510, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25751511, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25751512, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25751513, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25751514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25751515, 'pht': 3726}}" where mtr_portfolio_id = 25751495 and dashboard_run_id = 2085275 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`=25751495 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13701430, 0.043024123986127524, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25751495_07-08-2025_00_16_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25751504, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25751505, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25751506, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25751507, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25751508, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25751509, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25751510, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25751511, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25751512, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25751513, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25751514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25751515, '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 = 25751863 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': 3467281, 'mtr_portfolio_id': 25751863, 'created_at': datetime.datetime(2025, 8, 7, 0, 32, 59), 'result': '0.0364172211396579', 'result_long': None, 'result_double': None}] Qualite : 0.0364172211396579 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25751863 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25751863_07-08-2025_00_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25751863 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_P25751863_07-08-2025_00_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25751873, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25751874, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25751875, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25751876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25751877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25751878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25751880, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25751881, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25751882, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25751883, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25751884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25751885, 'pht': 3726}}" where mtr_portfolio_id = 25751863 and dashboard_run_id = 2085275 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`=25751863 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13701431, 0.0364172211396579, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25751863_07-08-2025_00_33_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25751873, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25751874, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25751875, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25751876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25751877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25751878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25751880, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25751881, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25751882, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25751883, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25751884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25751885, '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 = 25752229 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': 3467386, 'mtr_portfolio_id': 25752229, 'created_at': datetime.datetime(2025, 8, 7, 0, 48, 58), 'result': '0.05964152730973737', 'result_long': None, 'result_double': None}] Qualite : 0.05964152730973737 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25752229 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25752229_07-08-2025_00_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25752229 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_P25752229_07-08-2025_00_48_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25752264, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25752265, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25752266, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25752267, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25752268, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25752269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25752270, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25752271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25752272, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25752273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25752274, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25752275, 'pht': 3726}}" where mtr_portfolio_id = 25752229 and dashboard_run_id = 2085275 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`=25752229 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13701432, 0.05964152730973737, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25752229_07-08-2025_00_48_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25752264, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25752265, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25752266, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25752267, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25752268, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25752269, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25752270, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25752271, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25752272, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25752273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25752274, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25752275, '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 = 25752699 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': 3467529, 'mtr_portfolio_id': 25752699, 'created_at': datetime.datetime(2025, 8, 7, 1, 33), 'result': '0.039225109676696804', 'result_long': None, 'result_double': None}] Qualite : 0.039225109676696804 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25752699 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25752699_07-08-2025_01_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25752699 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_P25752699_07-08-2025_01_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25752733, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25752734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25752735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25752736, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25752737, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25752738, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25752739, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25752740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25752741, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25752742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25752743, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25752744, 'pht': 3726}}" where mtr_portfolio_id = 25752699 and dashboard_run_id = 2085275 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`=25752699 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13701433, 0.039225109676696804, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25752699_07-08-2025_01_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25752733, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25752734, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25752735, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25752736, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25752737, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25752738, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25752739, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25752740, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25752741, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25752742, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25752743, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25752744, '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 = 25753911 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': 3467846, 'mtr_portfolio_id': 25753911, 'created_at': datetime.datetime(2025, 8, 7, 1, 47, 27), 'result': '0.05960881561542402', 'result_long': None, 'result_double': None}] Qualite : 0.05960881561542402 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25753911 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25753911_07-08-2025_01_47_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25753911 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_P25753911_07-08-2025_01_47_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25753920, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25753921, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25753922, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25753923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25753924, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25753925, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25753926, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25753927, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25753929, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25753930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25753931, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25753932, 'pht': 3726}}" where mtr_portfolio_id = 25753911 and dashboard_run_id = 2085275 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`=25753911 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13701434, 0.05960881561542402, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25753911_07-08-2025_01_47_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25753920, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25753921, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25753922, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25753923, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25753924, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25753925, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25753926, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25753927, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25753929, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25753930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25753931, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25753932, '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 = 25754209 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': 3467941, 'mtr_portfolio_id': 25754209, 'created_at': datetime.datetime(2025, 8, 7, 2, 3), 'result': '0.07217710834733976', 'result_long': None, 'result_double': None}] Qualite : 0.07217710834733976 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25754209 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25754209_07-08-2025_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25754209 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_P25754209_07-08-2025_02_03_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25754238, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25754239, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25754240, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25754241, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25754242, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25754243, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25754244, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25754245, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25754246, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25754247, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25754248, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25754249, 'pht': 3726}}" where mtr_portfolio_id = 25754209 and dashboard_run_id = 2085275 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`=25754209 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13701435, 0.07217710834733976, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25754209_07-08-2025_02_03_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25754238, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25754239, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25754240, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25754241, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25754242, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25754243, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25754244, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25754245, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25754246, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25754247, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25754248, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25754249, '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 = 25754559 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': 3468033, 'mtr_portfolio_id': 25754559, 'created_at': datetime.datetime(2025, 8, 7, 2, 14, 29), 'result': '0.058156055183112225', 'result_long': None, 'result_double': None}] Qualite : 0.058156055183112225 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25754559 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25754559_07-08-2025_02_14_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25754559 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_P25754559_07-08-2025_02_14_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25754576, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25754577, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25754578, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25754579, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25754580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25754581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25754582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25754583, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25754584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25754585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25754586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25754587, 'pht': 3726}}" where mtr_portfolio_id = 25754559 and dashboard_run_id = 2085275 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`=25754559 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13701436, 0.058156055183112225, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25754559_07-08-2025_02_14_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25754576, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25754577, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25754578, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25754579, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25754580, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25754581, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25754582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25754583, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25754584, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25754585, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25754586, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25754587, '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 (25751495,25751863,25752229,25752699,25753911,25754209,25754559) result : ((1375549261,), (1375549283,), (1375549607,), (1375549641,), (1375549656,), (1375549658,), (1375549804,), (1375549851,), (1375549888,), (1375549912,), (1375550243,), (1375550244,), (1375550266,), (1375550291,), (1375550426,), (1375550427,), (1375550428,), (1375550430,), (1375550433,), (1375550448,), (1375550449,), (1375550451,), (1375550454,), (1375550457,), (1375550460,), (1375550470,), (1375550471,), (1375550473,), (1375550534,), (1375550538,), (1375550539,), (1375550541,), (1375550544,), (1375550546,), (1375550653,), (1375550654,), (1375550655,), (1375550657,), (1375550660,), (1375550662,), (1375550676,), (1375550677,), (1375550678,), (1375550680,), (1375550768,), (1375550771,), (1375550775,), (1375550779,), (1375550784,), (1375550811,), (1375550851,), (1375550852,), (1375550853,), (1375550855,), (1375550872,), (1375550873,), (1375550898,), (1375550899,), (1375550900,), (1375550902,), (1375550914,), (1375550936,), (1375550937,), (1375550939,), (1375550942,), (1375550944,), (1375550952,), (1375551505,), (1375551419,), (1375551501,), (1375551572,), (1375551574,), (1375551577,), (1375551580,), (1375551583,), (1375551601,), (1375551602,), (1375551603,), (1375551605,), (1375551615,), (1375551616,), (1375551617,), (1375551619,), (1375551642,), (1375551643,), (1375551645,), (1375551648,), (1375551651,), (1375551653,), (1375551738,), (1375551760,), (1375551765,), (1375551766,), (1375551769,), (1375551785,), (1375551786,), (1375551787,), (1375551788,), (1375551799,), (1375551800,), (1375551801,), (1375551803,), (1375551804,), (1375551807,), (1375551816,), (1375551817,), (1375551819,), (1375551822,), (1375551826,), (1375551829,), (1375551839,), (1375551841,), (1375551844,), (1375551847,), (1375551854,), (1375551868,), (1375551932,), (1375551958,), (1375551988,), (1375552014,), (1375552039,), (1375552061,), (1375552185,), (1375552186,), (1375552209,), (1375552210,), (1375552215,), (1375552216,), (1375552219,), (1375552220,), (1375552223,), (1375552224,), (1375552225,), (1375552226,), (1375552227,), (1375552228,), (1375552229,), (1375552231,), (1375552234,), (1375552240,), (1375552261,), (1375552273,), (1375552275,), (1375552276,), (1375552278,), (1375552305,), (1375552312,), (1375552313,), (1375552315,), (1375552317,), (1375552319,), (1375552328,), (1375552330,), (1375552331,), (1375552334,), (1375552622,), (1375552613,), (1375552615,), (1375552617,), (1375552619,), (1375552635,), (1375552636,), (1375552643,), (1375552653,), (1375552656,), (1375552701,), (1375552702,), (1375552703,), (1375552704,), (1375552727,), (1375552728,), (1375552729,), (1375552731,), (1375552735,), (1375552738,), (1375552761,), (1375552762,), (1375552763,), (1375552765,), (1375552782,), (1375552789,), (1375552790,), (1375552794,), (1375552797,), (1375552800,), (1375552810,), (1375552819,), (1375552822,), (1375552826,), (1375552830,), (1375552833,), (1375552848,), (1375552849,), (1375552850,), (1375552862,), (1375552863,), (1375552864,), (1375552866,), (1375552869,), (1375552872,), (1375552884,), (1375552885,), (1375552886,), (1375552888,), (1375552921,), (1375552922,), (1375552923,), (1375552926,), (1375552929,), (1375552931,), (1375552941,), (1375552942,), (1375552943,), (1375552944,), (1375552946,), (1375552949,), (1375552971,), (1375552972,), (1375552973,), (1375552988,), (1375552989,), (1375552991,), (1375552995,), (1375552997,), (1375553001,), (1375553016,), (1375553018,), (1375553021,), (1375553024,), (1375553026,), (1375553029,), (1375553032,), (1375553033,), (1375553051,), (1375553045,), (1375553046,), (1375553048,), (1375553061,), (1375553066,), (1375553078,), (1375553094,), (1375553098,), (1375553108,), (1375553133,), (1375553134,), (1375553135,), (1375553137,), (1375553141,), (1375553144,), (1375553164,), (1375553165,), (1375553182,), (1375553186,), (1375553192,), (1375553193,), (1375553195,), (1375553233,), (1375553234,), (1375553235,), (1375553236,), (1375553252,), (1375553253,), (1375553254,), (1375553256,), (1375553275,), (1375553276,), (1375553277,), (1375553279,), (1375553284,), (1375553286,), (1375553306,), (1375553307,), (1375553308,), (1375553312,), (1375553316,), (1375553323,), (1375553343,), (1375553345,), (1375553348,), (1375553352,), (1375553354,), (1375553358,), (1375553363,), (1375553365,), (1375553367,), (1375553370,), (1375553372,), (1375553374,), (1375553424,), (1375553446,), (1375553469,), (1375553491,), (1375553517,), (1375553546,), (1375553639,), (1375553663,), (1375553686,), (1375553689,), (1375553701,), (1375553725,), (1375553766,), (1375553772,), (1375553776,), (1375553777,), (1375555859,), (1375555856,), (1375555857,), (1375555858,), (1375555870,), (1375555871,), (1375555872,), (1375555873,), (1375555885,), (1375555886,), (1375555887,), (1375555888,), (1375555900,), (1375555901,), (1375555902,), (1375555903,), (1375555917,), (1375555921,), (1375555923,), (1375555948,), (1375555950,), (1375555952,), (1375555956,), (1375555960,), (1375555963,), (1375555983,), (1375555984,), (1375555998,), (1375555999,), (1375556000,), (1375556022,), (1375556023,), (1375556024,), (1375556025,), (1375556027,), (1375556051,), (1375556052,), (1375556053,), (1375556055,), (1375556058,), (1375556061,), (1375556081,), (1375556082,), (1375556083,), (1375556086,), (1375556105,), (1375556106,), (1375556107,), (1375556109,), (1375556112,), (1375556130,), (1375556131,), (1375556132,), (1375556134,), (1375556137,), (1375556146,), (1375556148,), (1375556149,), (1375556150,), (1375556152,), (1375556171,), (1375556169,), (1375556170,), (1375556192,), (1375556193,), (1375556194,), (1375556195,), (1375556197,), (1375556200,), (1375556213,), (1375556214,), (1375556215,), (1375556218,), (1375556222,), (1375556236,), (1375556237,), (1375556238,), (1375556239,), (1375556241,), (1375556245,), (1375556263,), (1375556268,), (1375556269,), (1375556289,), (1375556290,), (1375556291,), (1375556292,), (1375556295,), (1375556320,), (1375556321,), (1375556322,), (1375556328,), (1375556336,), (1375556356,), (1375556357,), (1375556358,), (1375556360,), (1375556375,), (1375556376,), (1375556377,), (1375556382,), (1375556409,), (1375556410,), (1375556412,), (1375556416,), (1375556419,), (1375556422,), (1375556428,), (1375556430,), (1375556431,), (1375556432,), (1375556433,), (1375556434,), (1375556435,), (1375556437,), (1375556439,), (1375556459,), (1375556460,), (1375556477,), (1375556478,), (1375556479,), (1375556481,), (1375556484,), (1375556636,), (1375556696,), (1375556743,), (1375556790,), (1375556840,), (1375556976,), (1375556977,), (1375557020,), (1375557027,), (1375557064,), (1375557073,), (1375557383,), (1375557326,), (1375557362,), (1375557851,), (1375557898,), (1375557926,), (1375557954,), (1375557991,), (1375558038,), (1375558260,), (1375558261,), (1375558262,), (1375558264,), (1375558266,), (1375558437,), (1375558448,), (1375558449,), (1375558456,), (1375558526,), (1375558527,), (1375558528,), (1375558531,), (1375558555,), (1375558556,), (1375558557,), (1375558562,), (1375558564,), (1375558567,), (1375558580,), (1375558581,), (1375558582,), (1375558602,), (1375558603,), (1375558604,), (1375558605,), (1375558619,), (1375558620,), (1375558621,), (1375558642,), (1375558667,), (1375558692,), (1375558914,), (1375558938,), (1375558963,), (1375558987,), (1375559011,), (1375559020,), (1375559130,), (1375559154,), (1375559155,), (1375559174,), (1375559199,), (1375559200,), (1375559201,), (1375559202,), (1375559212,), (1375559213,), (1375559215,), (1375559219,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'07082025': {'nb_upload': 58, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25754559]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1375559219, 1375559215, 1375559213, 1375559212] map_info['map_portfolio_photo'] : {25754559: [1375559219, 1375559215, 1375559213, 1375559212, 1375559202, 1375559201, 1375559200, 1375559199, 1375559174, 1375559155, 1375559154, 1375559130, 1375559020, 1375559011, 1375558987, 1375558963, 1375558938, 1375558914, 1375558692, 1375558667, 1375558642, 1375558621, 1375558620, 1375558619, 1375558605, 1375558604, 1375558603, 1375558602, 1375558582, 1375558581, 1375558580, 1375558567, 1375558564, 1375558562, 1375558557, 1375558556, 1375558555, 1375558531, 1375558528, 1375558527, 1375558526, 1375558456, 1375558449, 1375558448, 1375558437, 1375558266, 1375558264, 1375558262, 1375558261, 1375558260, 1375558038, 1375557991, 1375557954, 1375557926, 1375557898, 1375557851, 1375557362, 1375557326]} final : True mtd_id 4302 list_pids : [1375559219, 1375559215, 1375559213, 1375559212] Looping around the photos to save general results len do output : 1 /25754559Didn'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, '3468033') ('4302', '25754559', '1375559219', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559215', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559213', None, None, None, None, None, '3468033') ('4302', None, None, None, None, None, None, None, '3468033') ('4302', '25754559', '1375559212', None, None, None, None, None, '3468033') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25754559', 'None', None, None, None, None, '3468033'), ('4302', '25754559', '1375559219', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559215', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559213', None, None, None, None, None, '3468033'), ('4302', '25754559', '1375559212', None, None, None, None, None, '3468033')] time used for this insertion : 0.01355123519897461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.70424485206604 time spend to save output : 0.013734102249145508 total time spend for step 5 : 0.7179789543151855 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 (3468033) 1.96user 2.29system 0:07.38elapsed 57%CPU (0avgtext+0avgdata 158888maxresident)k 16inputs+6040outputs (0major+63839minor)pagefaults 0swaps