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 : 3937695 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 (3661808) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3661808) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514642 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3661808'] with mtr_portfolio_ids : ['26514642'] and first list_photo_ids : [] new path : /proc/3937695/ Name: python3 Umask: 0002 State: R (running) Tgid: 3937695 Ngid: 0 Pid: 3937695 PPid: 3937694 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3937695 NSpid: 3937695 NSpgid: 3934643 NSsid: 3934643 VmPeak: 1107340 kB VmSize: 1107340 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98452 kB VmRSS: 98452 kB RssAnon: 60176 kB RssFile: 38276 kB RssShmem: 0 kB VmData: 866092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 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: 62 nonvoluntary_ctxt_switches: 89 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3937695', 'Ngid': '0', 'Pid': '3937695', 'PPid': '3937694', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3937695', 'NSpid': '3937695', 'NSpgid': '3934643', 'NSsid': '3934643', 'VmPeak': '1107340 kB', 'VmSize': '1107340 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98452 kB', 'VmRSS': '98452 kB', 'RssAnon': '60176 kB', 'RssFile': '38276 kB', 'RssShmem': '0 kB', 'VmData': '866092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 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': '62', 'nonvoluntary_ctxt_switches': '89'} ('datou_batch_current', '3937695', '1107340', '0', '1107340', '866092', '98452', b'', 'marlene', '3661808') 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 (26514642) 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 (3661808 ) ) 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 (26514642) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1381347376, 'portfolio_id': 26514642}, {'photo_id': 1381346948, 'portfolio_id': 26514642}, {'photo_id': 1381346946, 'portfolio_id': 26514642}, {'photo_id': 1381346944, 'portfolio_id': 26514642}, {'photo_id': 1381346942, 'portfolio_id': 26514642}, {'photo_id': 1381346740, 'portfolio_id': 26514642}, {'photo_id': 1381346739, 'portfolio_id': 26514642}, {'photo_id': 1381346738, 'portfolio_id': 26514642}, {'photo_id': 1381346737, 'portfolio_id': 26514642}, {'photo_id': 1381346736, 'portfolio_id': 26514642}, {'photo_id': 1381346735, 'portfolio_id': 26514642}, {'photo_id': 1381346683, 'portfolio_id': 26514642}, {'photo_id': 1381346682, 'portfolio_id': 26514642}, {'photo_id': 1381346681, 'portfolio_id': 26514642}, {'photo_id': 1381346680, 'portfolio_id': 26514642}, {'photo_id': 1381346679, 'portfolio_id': 26514642}, {'photo_id': 1381346642, 'portfolio_id': 26514642}, {'photo_id': 1381346641, 'portfolio_id': 26514642}, {'photo_id': 1381346602, 'portfolio_id': 26514642}, {'photo_id': 1381346601, 'portfolio_id': 26514642}, {'photo_id': 1381346600, 'portfolio_id': 26514642}, {'photo_id': 1381346599, 'portfolio_id': 26514642}, {'photo_id': 1381346598, 'portfolio_id': 26514642}, {'photo_id': 1381346562, 'portfolio_id': 26514642}, {'photo_id': 1381346561, 'portfolio_id': 26514642}, {'photo_id': 1381346560, 'portfolio_id': 26514642}, {'photo_id': 1381346559, 'portfolio_id': 26514642}, {'photo_id': 1381346558, 'portfolio_id': 26514642}, {'photo_id': 1381346504, 'portfolio_id': 26514642}, {'photo_id': 1381346503, 'portfolio_id': 26514642}, {'photo_id': 1381346502, 'portfolio_id': 26514642}, {'photo_id': 1381346501, 'portfolio_id': 26514642}, {'photo_id': 1381346500, 'portfolio_id': 26514642}, {'photo_id': 1381346433, 'portfolio_id': 26514642}, {'photo_id': 1381346432, 'portfolio_id': 26514642}, {'photo_id': 1381346431, 'portfolio_id': 26514642}, {'photo_id': 1381346430, 'portfolio_id': 26514642}, {'photo_id': 1381346428, 'portfolio_id': 26514642}, {'photo_id': 1381346372, 'portfolio_id': 26514642}, {'photo_id': 1381346371, 'portfolio_id': 26514642}, {'photo_id': 1381346370, 'portfolio_id': 26514642}, {'photo_id': 1381346323, 'portfolio_id': 26514642}, {'photo_id': 1381346322, 'portfolio_id': 26514642}, {'photo_id': 1381346321, 'portfolio_id': 26514642}, {'photo_id': 1381346320, 'portfolio_id': 26514642}, {'photo_id': 1381346319, 'portfolio_id': 26514642}, {'photo_id': 1381346318, 'portfolio_id': 26514642}, {'photo_id': 1381346258, 'portfolio_id': 26514642}, {'photo_id': 1381346256, 'portfolio_id': 26514642}, {'photo_id': 1381346255, 'portfolio_id': 26514642}, {'photo_id': 1381346254, 'portfolio_id': 26514642}, {'photo_id': 1381346232, 'portfolio_id': 26514642}, {'photo_id': 1381346183, 'portfolio_id': 26514642}, {'photo_id': 1381346182, 'portfolio_id': 26514642}, {'photo_id': 1381346117, 'portfolio_id': 26514642}, {'photo_id': 1381346116, 'portfolio_id': 26514642}, {'photo_id': 1381346115, 'portfolio_id': 26514642}, {'photo_id': 1381346114, 'portfolio_id': 26514642}, {'photo_id': 1381346048, 'portfolio_id': 26514642}, {'photo_id': 1381346046, 'portfolio_id': 26514642}, {'photo_id': 1381346045, 'portfolio_id': 26514642}, {'photo_id': 1381346044, 'portfolio_id': 26514642}] map_portfolio_id_photo_id: {26514642: [1381347376, 1381346948, 1381346946, 1381346944, 1381346942, 1381346740, 1381346739, 1381346738, 1381346737, 1381346736, 1381346735, 1381346683, 1381346682, 1381346681, 1381346680, 1381346679, 1381346642, 1381346641, 1381346602, 1381346601, 1381346600, 1381346599, 1381346598, 1381346562, 1381346561, 1381346560, 1381346559, 1381346558, 1381346504, 1381346503, 1381346502, 1381346501, 1381346500, 1381346433, 1381346432, 1381346431, 1381346430, 1381346428, 1381346372, 1381346371, 1381346370, 1381346323, 1381346322, 1381346321, 1381346320, 1381346319, 1381346318, 1381346258, 1381346256, 1381346255, 1381346254, 1381346232, 1381346183, 1381346182, 1381346117, 1381346116, 1381346115, 1381346114, 1381346048, 1381346046, 1381346045, 1381346044]} ##### 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.017468690872192383 #### 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 Sep 4 02:02:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26514642) 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 : 26514642 get user id for portfolio 26514642 get sub ptf for main ptf 26514642, type 3726 and hashtags ['Carton_gris', 'papier', 'Teint_Dans_La_Masse', 'environnement', 'flou', 'autre_refus', 'plastique', 'cartonnette', 'mal_croppe', 'Carton_brun', 'metal', '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`=26514642 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','Teint_Dans_La_Masse','environnement','flou','autre_refus','plastique','cartonnette','mal_croppe','Carton_brun','metal','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`=26514642 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','Teint_Dans_La_Masse','environnement','flou','autre_refus','plastique','cartonnette','mal_croppe','Carton_brun','metal','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26514642, 'sub_port_id': 26514648, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851608, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 26514642, 'sub_port_id': 26514649, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851609, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'metal': {'main_port_id': 26514642, 'sub_port_id': 26514650, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851610, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'flou': {'main_port_id': 26514642, 'sub_port_id': 26514651, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851611, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'plastique': {'main_port_id': 26514642, 'sub_port_id': 26514652, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851612, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'autre_refus': {'main_port_id': 26514642, 'sub_port_id': 26514653, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851613, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'cartonnette': {'main_port_id': 26514642, 'sub_port_id': 26514654, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851614, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'Carton_brun': {'main_port_id': 26514642, 'sub_port_id': 26514655, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851615, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'environnement': {'main_port_id': 26514642, 'sub_port_id': 26514656, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851616, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'kraft': {'main_port_id': 26514642, 'sub_port_id': 26514657, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851617, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'papier': {'main_port_id': 26514642, 'sub_port_id': 26514658, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851618, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}, 'Carton_gris': {'main_port_id': 26514642, 'sub_port_id': 26514659, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851619, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26514648 , 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=26514642 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 (26514648) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514649 , 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=26514642 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 (26514649) result : ((1381346170,), (1381346171,), (1381346296,), (1381346422,), (1381346424,), (1381346426,), (1381346703,), (1381346704,), (1381346705,), (1381346706,), (1381346707,), (1381346921,), (1381347697,), (1381347698,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514650 , 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=26514642 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 (26514650) result : ((1381346435,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514651 , 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=26514642 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 (26514651) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514652 , 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=26514642 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 (26514652) result : ((1381346554,), (1381346555,), (1381346556,), (1381346557,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514653 , 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=26514642 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 (26514653) result : ((1381346297,), (1381346542,), (1381347699,), (1381347701,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514654 , 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=26514642 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 (26514654) result : ((1381346298,), (1381346429,), (1381346537,), (1381346545,), (1381346546,), (1381346616,), (1381346710,), (1381346721,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514655 , 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=26514642 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 (26514655) result : ((1381346434,), (1381346538,), (1381346547,), (1381346711,), (1381346929,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514656 , 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=26514642 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 (26514656) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514657 , 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=26514642 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 (26514657) result : ((1381346539,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514658 , 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=26514642 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 (26514658) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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 26514659 , 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=26514642 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 (26514659) result : ((1381346427,), (1381346543,), (1381346544,), (1381346708,), (1381346720,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26514642) result : ((1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) 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 (1381346600,1381346500) 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`=26514642 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','Teint_Dans_La_Masse','environnement','flou','autre_refus','plastique','cartonnette','mal_croppe','Carton_brun','metal','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`=26514642 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','papier','Teint_Dans_La_Masse','environnement','flou','autre_refus','plastique','cartonnette','mal_croppe','Carton_brun','metal','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26514642, 'sub_port_id': 26514660, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851620, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 26514642, 'sub_port_id': 26514661, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851621, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'metal': {'main_port_id': 26514642, 'sub_port_id': 26514662, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851622, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'flou': {'main_port_id': 26514642, 'sub_port_id': 26514663, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851623, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'plastique': {'main_port_id': 26514642, 'sub_port_id': 26514664, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851624, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'autre_refus': {'main_port_id': 26514642, 'sub_port_id': 26514665, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851625, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'cartonnette': {'main_port_id': 26514642, 'sub_port_id': 26514666, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851626, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'Carton_brun': {'main_port_id': 26514642, 'sub_port_id': 26514667, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851627, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'environnement': {'main_port_id': 26514642, 'sub_port_id': 26514668, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851628, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'kraft': {'main_port_id': 26514642, 'sub_port_id': 26514669, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851629, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'papier': {'main_port_id': 26514642, 'sub_port_id': 26514670, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851630, 'last_updated_at': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 1, 47, 29), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}, 'Carton_gris': {'main_port_id': 26514642, 'sub_port_id': 26514671, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17851631, 'last_updated_at': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_desc': datetime.datetime(2025, 9, 4, 2, 0, 59), 'last_updated_at_asc': datetime.datetime(2025, 9, 4, 1, 47, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514660,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514648 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514661,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514649 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514662,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514650 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514663,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514651 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514664,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514652 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514665,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514653 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514666,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514654 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514667,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514655 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514668,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514656 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514669,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514657 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514670,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514658 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26514671,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26514659 lien utilise dans velours : https://marlene.fotonower.com/velours/26514660,26514661,26514662,26514663,26514664,26514665,26514666,26514667,26514668,26514669,26514670,26514671?tags=mal_croppe,Teint_Dans_La_Masse,metal,flou,plastique,autre_refus,cartonnette,Carton_brun,environnement,kraft,papier,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26514642]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1381347376] map_info['map_portfolio_photo'] : {26514642: [1381347376, 1381346948, 1381346946, 1381346944, 1381346942, 1381346740, 1381346739, 1381346738, 1381346737, 1381346736, 1381346735, 1381346683, 1381346682, 1381346681, 1381346680, 1381346679, 1381346642, 1381346641, 1381346602, 1381346601, 1381346600, 1381346599, 1381346598, 1381346562, 1381346561, 1381346560, 1381346559, 1381346558, 1381346504, 1381346503, 1381346502, 1381346501, 1381346500, 1381346433, 1381346432, 1381346431, 1381346430, 1381346428, 1381346372, 1381346371, 1381346370, 1381346323, 1381346322, 1381346321, 1381346320, 1381346319, 1381346318, 1381346258, 1381346256, 1381346255, 1381346254, 1381346232, 1381346183, 1381346182, 1381346117, 1381346116, 1381346115, 1381346114, 1381346048, 1381346046, 1381346045, 1381346044]} final : False mtd_id 4302 list_pids : [1381347376] Looping around the photos to save general results len do output : 1 /26514642. 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, '3661808') ('4302', '26514642', '1381347376', None, None, None, None, None, '3661808') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '26514642', "{'mal_croppe': 26514648, 'Teint_Dans_La_Masse': 26514649, 'metal': 26514650, 'flou': 26514651, 'plastique': 26514652, 'autre_refus': 26514653, 'cartonnette': 26514654, 'Carton_brun': 26514655, 'environnement': 26514656, 'kraft': 26514657, 'papier': 26514658, 'Carton_gris': 26514659}", None, None, None, None, '3661808'), ('4302', '26514642', '1381347376', None, None, None, None, None, '3661808')] time used for this insertion : 0.013023853302001953 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.482558012008667 time spend to save output : 0.013224601745605469 total time spend for step 1 : 0.49578261375427246 step2:final Thu Sep 4 02:02:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26514642) 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 26514642 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1381346048,1381346046,1381346045,1381346044,1381346117,1381346116,1381346115,1381346114,1381346183,1381346182,1381346258,1381346232,1381346256,1381346255,1381346254,1381346323,1381346322,1381346321,1381346320,1381346319,1381346318,1381346372,1381346371,1381346370,1381346433,1381346432,1381346431,1381346430,1381346428,1381346504,1381346503,1381346502,1381346501,1381346500,1381346562,1381346561,1381346560,1381346559,1381346558,1381346602,1381346601,1381346600,1381346599,1381346598,1381346642,1381346641,1381346683,1381346682,1381346681,1381346680,1381346679,1381346740,1381346739,1381346738,1381346737,1381346736,1381346735,1381346948,1381346946,1381346944,1381346942,1381347376); 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([26514642]) Inside saveOutput : final : False verbose : True original output for save of step final : {1381347376: ('0.059590210984218656',)} new output for save of step final : {1381347376: ('0.059590210984218656',)} [1381347376] map_info['map_portfolio_photo'] : {26514642: [1381347376, 1381346948, 1381346946, 1381346944, 1381346942, 1381346740, 1381346739, 1381346738, 1381346737, 1381346736, 1381346735, 1381346683, 1381346682, 1381346681, 1381346680, 1381346679, 1381346642, 1381346641, 1381346602, 1381346601, 1381346600, 1381346599, 1381346598, 1381346562, 1381346561, 1381346560, 1381346559, 1381346558, 1381346504, 1381346503, 1381346502, 1381346501, 1381346500, 1381346433, 1381346432, 1381346431, 1381346430, 1381346428, 1381346372, 1381346371, 1381346370, 1381346323, 1381346322, 1381346321, 1381346320, 1381346319, 1381346318, 1381346258, 1381346256, 1381346255, 1381346254, 1381346232, 1381346183, 1381346182, 1381346117, 1381346116, 1381346115, 1381346114, 1381346048, 1381346046, 1381346045, 1381346044]} final : False mtd_id 4302 list_pids : [1381347376] Looping around the photos to save general results len do output : 1 /1381347376.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, '3661808') ('4302', '26514642', '1381347376', None, None, None, None, None, '3661808') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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', '26514642', '1381347376', '0.059590210984218656', None, None, None, None, '3661808')] time used for this insertion : 0.01869678497314453 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.23197722434997559 time spend to save output : 0.018868684768676758 total time spend for step 2 : 0.25084590911865234 step3:velours_tree Thu Sep 4 02:02:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {26514642: [{'mal_croppe': 26514648, 'Teint_Dans_La_Masse': 26514649, 'metal': 26514650, 'flou': 26514651, 'plastique': 26514652, 'autre_refus': 26514653, 'cartonnette': 26514654, 'Carton_brun': 26514655, 'environnement': 26514656, 'kraft': 26514657, 'papier': 26514658, 'Carton_gris': 26514659}]} input_args_next_step : {26514642: ()} output_args : {26514642: [{'mal_croppe': 26514648, 'Teint_Dans_La_Masse': 26514649, 'metal': 26514650, 'flou': 26514651, 'plastique': 26514652, 'autre_refus': 26514653, 'cartonnette': 26514654, 'Carton_brun': 26514655, 'environnement': 26514656, 'kraft': 26514657, 'papier': 26514658, 'Carton_gris': 26514659}]} args : 26514642 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'mal_croppe': 26514648, 'Teint_Dans_La_Masse': 26514649, 'metal': 26514650, 'flou': 26514651, 'plastique': 26514652, 'autre_refus': 26514653, 'cartonnette': 26514654, 'Carton_brun': 26514655, 'environnement': 26514656, 'kraft': 26514657, 'papier': 26514658, 'Carton_gris': 26514659},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26514642) 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([26514642]) 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.31407690048217773 time spend to save output : 5.8650970458984375e-05 total time spend for step 3 : 0.3141355514526367 step4:send_mail_cod Thu Sep 4 02:02:58 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 : {1381347376: ('0.059590210984218656',)} input_args_next_step : {1381347376: ()} output_args : {1381347376: ('0.059590210984218656',)} args : 1381347376 depend.output_id : 0 complete output_args for input 3 : {26514642: [{'mal_croppe': 26514648, 'Teint_Dans_La_Masse': 26514649, 'metal': 26514650, 'flou': 26514651, 'plastique': 26514652, 'autre_refus': 26514653, 'cartonnette': 26514654, 'Carton_brun': 26514655, 'environnement': 26514656, 'kraft': 26514657, 'papier': 26514658, 'Carton_gris': 26514659}]} input_args_next_step : {1381347376: ('0.059590210984218656',), 26514642: ()} output_args : {26514642: [{'mal_croppe': 26514648, 'Teint_Dans_La_Masse': 26514649, 'metal': 26514650, 'flou': 26514651, 'plastique': 26514652, 'autre_refus': 26514653, 'cartonnette': 26514654, 'Carton_brun': 26514655, 'environnement': 26514656, 'kraft': 26514657, 'papier': 26514658, 'Carton_gris': 26514659}]} args : 26514642 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 :2, first value : ('0.059590210984218656',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26514642) 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 (1381347376) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1381347376 download finish for photo 1381347376 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette265146481756944178/ length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P26514642_04-09-2025_02_02_58.pdf 26514648 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=26514648 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette265146481756944178 26514650 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=26514650 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346435: '1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694725_0.png'} change filename to text .imagette265146501756944178/ imagette265146501756944178/1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694725_0.png.png imagette265146511756944178/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/e79ab4dc2f1a6657bce82e7b1a1db722_43667862.png imagette265146501756944178 26514651 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=26514651 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette265146511756944178 26514652 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=26514652 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346554: '1756943584_1188177_1381346322_b4366640442a884dc15e7b80942ad449_92995439_rle_crop_3943694956_0.png', 1381346555: '1756943584_1188177_1381346320_db1c33d07c19faab0cbdd87275c09d9d_7145599_rle_crop_3943694982_0.png', 1381346556: '1756943584_1188177_1381346319_b3bb1cad7239bbe778df930807db9c05_90280019_rle_crop_3943694996_0.png', 1381346557: '1756943584_1188177_1381346318_5ae8771984d2c7f81466c4b898a4894e_39674585_rle_crop_3943695009_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/3c5baa55db23def4fa4848d7ac8791e3_84031672.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/a7f36526b1344d8c8564107162a305bc_4803247.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/d5666a9c0e791b7c4ed7fabe173dda43_27852384.png change filename to text .imagette265146521756944178/ imagette265146521756944178/1756943584_1188177_1381346319_b3bb1cad7239bbe778df930807db9c05_90280019_rle_crop_3943694996_0.png.png imagette265146521756944178/1756943584_1188177_1381346318_5ae8771984d2c7f81466c4b898a4894e_39674585_rle_crop_3943695009_0.png.png imagette265146521756944178/1756943584_1188177_1381346322_b4366640442a884dc15e7b80942ad449_92995439_rle_crop_3943694956_0.png.png imagette265146521756944178/1756943584_1188177_1381346320_db1c33d07c19faab0cbdd87275c09d9d_7145599_rle_crop_3943694982_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/e3f24cd6f62453cce7faa54edcd1d55c_46967461.png imagette265146521756944178 26514653 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=26514653 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346297: '1756943367_1176540_1381346114_d6ec60260c713a6c5046d1df1c66ca4b_49502841_rle_crop_3943694143_0.png', 1381346542: '1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694968_0.png', 1381347699: '1756944085_1315989_1381346946_4cd118a5a4e95ee1003ae8613d5ab738_73414629_rle_crop_3943707591_0.png', 1381347701: '1756944085_1315989_1381346944_7f52975f405bf3845205d24c12d248b2_71696581_rle_crop_3943709156_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/0ba9479b2c4f73de52d1d85ff2d712a9_84178322.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/0b16a38336bf17905402c8d48f4a698b_36514996.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/3cf38d93083266313337cfc97f8cead6_14398215.png change filename to text .imagette265146531756944178/ imagette265146531756944178/1756943367_1176540_1381346114_d6ec60260c713a6c5046d1df1c66ca4b_49502841_rle_crop_3943694143_0.png.png imagette265146531756944178/1756944085_1315989_1381346944_7f52975f405bf3845205d24c12d248b2_71696581_rle_crop_3943709156_0.png.png imagette265146531756944178/1756944085_1315989_1381346946_4cd118a5a4e95ee1003ae8613d5ab738_73414629_rle_crop_3943707591_0.png.png imagette265146531756944178/1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694968_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/737aac8c49b42a1331c1aa618c3ab571_65479034.png imagette265146531756944178 26514654 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=26514654 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346298: '1756943367_1176540_1381346114_d6ec60260c713a6c5046d1df1c66ca4b_49502841_rle_crop_3943694141_0.png', 1381346429: '1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694728_0.png', 1381346537: '1756943606_1188516_1381346370_1ac8c3d420d8078ac75482d54f86679c_81548500_rle_crop_3943694941_0.png', 1381346545: '1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694965_0.png', 1381346546: '1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694967_0.png', 1381346616: '1756943704_1193425_1381346258_ee6cc13a836d55d3bb75bbaa68a34a0f_33316227_rle_crop_3943695034_0.png', 1381346710: '1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701074_0.png', 1381346721: '1756943846_1198329_1381346601_4eb5d78949457692c7ea6f2bacdea47b_48691027_rle_crop_3943701238_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/36acc00280c8bfc3a43608694f137e7d_12660240.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/341d473e78c151d376baca4c874ee972_5588225.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/c8ff59bb662c6ebeae686c567975cc0b_58246329.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/fc8105eda04ff2e654b29e6ccc671c74_37041892.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/719e6c6a4459d0a44fac511fcc700732_67864390.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/971d1db71269b918c75c98fee0ee346e_89754966.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/db25ab28bcab7dd4ed57fe0d35d91f14_2168548.png change filename to text .imagette265146541756944178/ imagette265146541756944178/1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694965_0.png.png imagette265146541756944178/1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694728_0.png.png imagette265146541756944178/1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694967_0.png.png imagette265146541756944178/1756943704_1193425_1381346258_ee6cc13a836d55d3bb75bbaa68a34a0f_33316227_rle_crop_3943695034_0.png.png imagette265146541756944178/1756943606_1188516_1381346370_1ac8c3d420d8078ac75482d54f86679c_81548500_rle_crop_3943694941_0.png.png imagette265146541756944178/1756943846_1198329_1381346601_4eb5d78949457692c7ea6f2bacdea47b_48691027_rle_crop_3943701238_0.png.png imagette265146541756944178/1756943367_1176540_1381346114_d6ec60260c713a6c5046d1df1c66ca4b_49502841_rle_crop_3943694141_0.png.png imagette265146541756944178/1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701074_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/256e5b05df289fc006410b605054d9fd_95507564.png imagette265146541756944178 26514657 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=26514657 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346539: '1756943606_1188516_1381346370_1ac8c3d420d8078ac75482d54f86679c_81548500_rle_crop_3943694944_0.png'} change filename to text .imagette265146571756944179/ imagette265146571756944179/1756943606_1188516_1381346370_1ac8c3d420d8078ac75482d54f86679c_81548500_rle_crop_3943694944_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/3ae9329e67e6da74532e9b6587ade0c3_64783913.png imagette265146571756944179 26514649 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=26514649 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346170: '1756943245_1171201_1381346044_f7d041b9c0bd2188dada090d06f18840_75478438_rle_crop_3943694004_0.png', 1381346171: '1756943245_1171201_1381346044_f7d041b9c0bd2188dada090d06f18840_75478438_rle_crop_3943694002_0.png', 1381346296: '1756943367_1176540_1381346115_2d51f3a4243b64235cfc68344f30e7a4_37891918_rle_crop_3943694131_0.png', 1381346422: '1756943487_1181838_1381346323_a85adb70f8db0827cf7bae29dc781956_61762457_rle_crop_3943694664_0.png', 1381346424: '1756943487_1181838_1381346254_0970e1b2961e9adc0d516a0c3e024605_70277334_rle_crop_3943694703_0.png', 1381346426: '1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694723_0.png', 1381346703: '1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701077_0.png', 1381346704: '1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701078_0.png', 1381346705: '1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701076_0.png', 1381346706: '1756943826_1197987_1381346501_b1276c7b4d754947918330b4537c1645_92800760_rle_crop_3943701100_0.png', 1381346707: '1756943826_1197987_1381346500_6838d62f8e9f98c88315c28f81d97304_68617834_rle_crop_3943701217_0.png', 1381346921: '1756943965_1203819_1381346735_09689e6d6098db7592d20f1b1db434fa_59878225_rle_crop_3943705881_0.png', 1381347697: '1756944085_1315989_1381346946_4cd118a5a4e95ee1003ae8613d5ab738_73414629_rle_crop_3943707604_0.png', 1381347698: '1756944085_1315989_1381346946_4cd118a5a4e95ee1003ae8613d5ab738_73414629_rle_crop_3943707605_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/faaafd466991033d9fc9f9ed75817fad_25715616.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/50257bc6dde44e8d89478630a7e57326_58815513.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/1ebd0fef3361fba79e5d40ecccba4074_97458046.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/8001299d540f90f040cf84d4af82f607_86805410.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/6e95ecad4d155e7b7077dbac2f4832ed_19925795.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/198080cbb22225e32d2b86ca4156346c_5045740.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/9a822f823f760d5d97a8b0821e0caec6_8967302.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/0e98fab2b9444a86bf818fe07e39ee47_62785876.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/7e99db1430cde985afac641b0e2ea7e8_90550917.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/53d0de4b1e573b3684ad2a7ae6574558_63723164.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/e5478df5b17624e91aa5a7221348dfb0_89793465.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/56dc088c7a5310086a73b395c124c46c_32210861.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/9b299ee5f5fa062ccb1005cd07ea11c0_5025632.png change filename to text .imagette265146491756944179/ imagette265146491756944179/1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701078_0.png.png imagette265146491756944179/1756943487_1181838_1381346323_a85adb70f8db0827cf7bae29dc781956_61762457_rle_crop_3943694664_0.png.png imagette265146491756944179/1756943367_1176540_1381346115_2d51f3a4243b64235cfc68344f30e7a4_37891918_rle_crop_3943694131_0.png.png imagette265146491756944179/1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701076_0.png.png imagette265146491756944179/1756943965_1203819_1381346735_09689e6d6098db7592d20f1b1db434fa_59878225_rle_crop_3943705881_0.png.png imagette265146491756944179/1756943826_1197987_1381346503_5a67c1cf7aabe16d8111e65d68f8d292_63595836_rle_crop_3943701077_0.png.png imagette265146491756944179/1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694723_0.png.png imagette265146491756944179/1756943826_1197987_1381346500_6838d62f8e9f98c88315c28f81d97304_68617834_rle_crop_3943701217_0.png.png imagette265146491756944179/1756944085_1315989_1381346946_4cd118a5a4e95ee1003ae8613d5ab738_73414629_rle_crop_3943707605_0.png.png imagette265146491756944179/1756944085_1315989_1381346946_4cd118a5a4e95ee1003ae8613d5ab738_73414629_rle_crop_3943707604_0.png.png imagette265146491756944179/1756943245_1171201_1381346044_f7d041b9c0bd2188dada090d06f18840_75478438_rle_crop_3943694002_0.png.png imagette265146491756944179/1756943245_1171201_1381346044_f7d041b9c0bd2188dada090d06f18840_75478438_rle_crop_3943694004_0.png.png imagette265146491756944179/1756943826_1197987_1381346501_b1276c7b4d754947918330b4537c1645_92800760_rle_crop_3943701100_0.png.png imagette265146491756944179/1756943487_1181838_1381346254_0970e1b2961e9adc0d516a0c3e024605_70277334_rle_crop_3943694703_0.png.png wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/80219ba9ec942d9272ecd31a98abb004_83143744.png imagette265146491756944179 26514655 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=26514655 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346434: '1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694718_0.png', 1381346538: '1756943606_1188516_1381346371_17faf7732a68121e450df388b914e61c_80134561_rle_crop_3943694931_0.png', 1381346547: '1756943584_1188177_1381346318_5ae8771984d2c7f81466c4b898a4894e_39674585_rle_crop_3943695002_0.png', 1381346711: '1756943826_1197987_1381346501_b1276c7b4d754947918330b4537c1645_92800760_rle_crop_3943701101_0.png', 1381346929: '1756943965_1203819_1381346737_14bfb09503ff427f1d9e168e3895e15e_22468043_rle_crop_3943705857_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/1f35e60bb3cff2369dc0984e55594f93_11564109.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/69008b62201cba9eea71ae2181137fe6_22526881.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/33c79725e685ced90da6ddf127301fbb_23697342.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/effac7f65ede1b39ddf02a22794c9e87_91592456.png change filename to text .imagette265146551756944180/ imagette265146551756944180/1756943965_1203819_1381346737_14bfb09503ff427f1d9e168e3895e15e_22468043_rle_crop_3943705857_0.png.png imagette265146551756944180/1756943606_1188516_1381346371_17faf7732a68121e450df388b914e61c_80134561_rle_crop_3943694931_0.png.png imagette265146551756944180/1756943584_1188177_1381346318_5ae8771984d2c7f81466c4b898a4894e_39674585_rle_crop_3943695002_0.png.png imagette265146551756944180/1756943826_1197987_1381346501_b1276c7b4d754947918330b4537c1645_92800760_rle_crop_3943701101_0.png.png imagette265146551756944180/1756943487_1181838_1381346232_e5f7a3e8c27e78e7178ef9457fbe7564_64556418_rle_crop_3943694718_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/7250876c37580cb03c471022302e0e62_25400807.png imagette265146551756944180 26514659 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=26514659 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1381346427: '1756943487_1181838_1381346256_db5c609f552945772f248e21136d8688_42753902_rle_crop_3943694679_0.png', 1381346543: '1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694966_0.png', 1381346544: '1756943584_1188177_1381346318_5ae8771984d2c7f81466c4b898a4894e_39674585_rle_crop_3943695005_0.png', 1381346708: '1756943826_1197987_1381346562_c2be28c96e4c5a62aab208befeec8229_1416965_rle_crop_3943701063_0.png', 1381346720: '1756943846_1198329_1381346598_9c5266a58cdcebca6300b75d688384da_41671630_rle_crop_3943701265_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/8bcea68168375bef1e887abe813806da_68184691.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/c5d8f2db3b99debd0a3c5218de26911b_62882666.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/4c2acf8a368bc204ae373b6783dade7a_12069047.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/867a9c83faa332048677dac98f84f688_53543596.png change filename to text .imagette265146591756944180/ imagette265146591756944180/1756943584_1188177_1381346321_9899f75f93d6261b840adb329333ed69_84446105_rle_crop_3943694966_0.png.png imagette265146591756944180/1756943846_1198329_1381346598_9c5266a58cdcebca6300b75d688384da_41671630_rle_crop_3943701265_0.png.png imagette265146591756944180/1756943487_1181838_1381346256_db5c609f552945772f248e21136d8688_42753902_rle_crop_3943694679_0.png.png imagette265146591756944180/1756943826_1197987_1381346562_c2be28c96e4c5a62aab208befeec8229_1416965_rle_crop_3943701063_0.png.png imagette265146591756944180/1756943584_1188177_1381346318_5ae8771984d2c7f81466c4b898a4894e_39674585_rle_crop_3943695005_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/c7bc784f3ab2a7faecf4d44c2104d4f6_67255700.png imagette265146591756944180 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26514642 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26514660,26514661,26514662,26514663,26514664,26514665,26514666,26514667,26514668,26514669,26514670,26514671?tags=mal_croppe,Teint_Dans_La_Masse,metal,flou,plastique,autre_refus,cartonnette,Carton_brun,environnement,kraft,papier,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1381347376] : ('0.059590210984218656',) no score found for photo 1381347376 We are sending mail with results at report@fotonower.com refus_total : 0.059590210984218656 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=26514642 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_P26514642_04-09-2025_02_02_58.pdf results_Auto_P26514642_04-09-2025_02_02_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26514642_04-09-2025_02_02_58.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','26514642','results_Auto_P26514642_04-09-2025_02_02_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26514642_04-09-2025_02_02_58.pdf','pdf','','0.17','0.059590210984218656') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26514642]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1381347376] map_info['map_portfolio_photo'] : {26514642: [1381347376, 1381346948, 1381346946, 1381346944, 1381346942, 1381346740, 1381346739, 1381346738, 1381346737, 1381346736, 1381346735, 1381346683, 1381346682, 1381346681, 1381346680, 1381346679, 1381346642, 1381346641, 1381346602, 1381346601, 1381346600, 1381346599, 1381346598, 1381346562, 1381346561, 1381346560, 1381346559, 1381346558, 1381346504, 1381346503, 1381346502, 1381346501, 1381346500, 1381346433, 1381346432, 1381346431, 1381346430, 1381346428, 1381346372, 1381346371, 1381346370, 1381346323, 1381346322, 1381346321, 1381346320, 1381346319, 1381346318, 1381346258, 1381346256, 1381346255, 1381346254, 1381346232, 1381346183, 1381346182, 1381346117, 1381346116, 1381346115, 1381346114, 1381346048, 1381346046, 1381346045, 1381346044]} final : False mtd_id 4302 list_pids : [1381347376] 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, '3661808') ('4302', '26514642', '1381347376', None, None, None, None, None, '3661808') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 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', '26514642', '1381347376', None, None, None, None, None, '3661808')] time used for this insertion : 0.015839576721191406 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.945021152496338 time spend to save output : 0.01607680320739746 total time spend for step 4 : 3.9610979557037354 step5:split_time_score Thu Sep 4 02:03:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26514642'] 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 : [('26514642',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26514642) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1381347376: {'path': 'temp/1756944178_3937695_1381347376_994d9c790e8c427304e8e45b65f6fbf6_55697984.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 = 26514642; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26514642 group by h (('01', 62),) 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=26514642 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 (26514642) 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 (26514642) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04092025 26514642 Nombre de photos uploadées : 62 / 23040 (0%) 04092025 26514642 Nombre de photos taguées (types de déchets): 0 / 62 (0%) 04092025 26514642 Nombre de photos taguées (volume) : 0 / 62 (0%) [{'photo_id': 1381346048, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/d892d6b693abb5a0c2eb409315fb5702_26374749.jpg', 'username': None, 'uploaded_at': 1756943173, 'text': 'image_04092025_01_45_04_009141m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1381346046, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/45ca4dd72b95dfbc7ddb29a8b5cb789b_28055646.jpg', 'username': None, 'uploaded_at': 1756943173, 'text': 'image_04092025_01_45_14_010136m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1381346045, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/00d573dacc76de782b3ca10411425871_3786936.jpg', 'username': None, 'uploaded_at': 1756943173, 'text': 'image_04092025_01_45_24_010138m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1381346044, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/4/f7d041b9c0bd2188dada090d06f18840_75478438.jpg', 'username': None, 'uploaded_at': 1756943173, 'text': 'image_04092025_01_45_45_010146m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.5762786865234375e-06 elapsed_time : order_list_meta_photo_and_scores 1.1444091796875e-05 ?????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002979755401611328 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26514642, '2025-09-04' ) 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-09-04' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2228087,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2013406753540039 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= 2228087 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2228087, 'dashboard_run_id': 2235821, 'mtr_portfolio_id': 26511239, 'dashboard_result_id': 14722468, '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_P26511239_04-09-2025_00_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26511248, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26511249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26511250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26511251, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26511252, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26511253, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26511254, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26511255, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26511256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26511257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26511258, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26511259, 'pht': 3726}}"}, {'dashboat_entry_day': 2228087, 'dashboard_run_id': 2235821, 'mtr_portfolio_id': 26512008, 'dashboard_result_id': 14722469, '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_P26512008_04-09-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26512011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26512012, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26512013, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26512014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26512015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26512016, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26512017, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26512018, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26512019, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26512020, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26512021, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26512022, 'pht': 3726}}"}, {'dashboat_entry_day': 2228087, 'dashboard_run_id': 2235821, 'mtr_portfolio_id': 26512746, 'dashboard_result_id': 14722470, '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_P26512746_04-09-2025_00_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26512749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26512750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26512751, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26512752, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26512753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26512754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26512755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26512756, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26512757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26512758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26512759, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26512760, 'pht': 3726}}"}, {'dashboat_entry_day': 2228087, 'dashboard_run_id': 2235821, 'mtr_portfolio_id': 26513045, 'dashboard_result_id': 14722471, '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_P26513045_04-09-2025_01_33_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26513049, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26513050, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26513051, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26513052, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26513053, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26513054, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26513055, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26513056, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26513057, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26513058, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26513059, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26513060, 'pht': 3726}}"}, {'dashboat_entry_day': 2228087, 'dashboard_run_id': 2235821, 'mtr_portfolio_id': 26514289, 'dashboard_result_id': 14722472, '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_P26514289_04-09-2025_01_46_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26514290, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26514291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26514292, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26514293, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26514294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26514295, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26514296, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26514297, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26514298, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26514299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26514300, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26514301, 'pht': 3726}}"}, {'dashboat_entry_day': 2228087, 'dashboard_run_id': 2235821, 'mtr_portfolio_id': 26514642, 'dashboard_result_id': 14722473, '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_P26514642_04-09-2025_01_59_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26514648, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26514649, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26514650, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26514651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26514652, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26514653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26514654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26514655, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26514656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26514657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26514658, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26514659, '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 = 26511239 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': 3661530, 'mtr_portfolio_id': 26511239, 'created_at': datetime.datetime(2025, 9, 4, 0, 18, 58), 'result': '0.05027331027112363', 'result_long': None, 'result_double': None}] Qualite : 0.05027331027112363 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26511239 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26511239_04-09-2025_00_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26511239 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_P26511239_04-09-2025_00_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26511248, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26511249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26511250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26511251, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26511252, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26511253, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26511254, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26511255, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26511256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26511257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26511258, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26511259, 'pht': 3726}}" where mtr_portfolio_id = 26511239 and dashboard_run_id = 2235821 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`=26511239 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14722468, 0.05027331027112363, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26511239_04-09-2025_00_18_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26511248, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26511249, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26511250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26511251, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26511252, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26511253, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26511254, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26511255, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26511256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26511257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26511258, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26511259, '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 = 26512008 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': 3661564, 'mtr_portfolio_id': 26512008, 'created_at': datetime.datetime(2025, 9, 4, 0, 32, 58), 'result': '0.06376195561344973', 'result_long': None, 'result_double': None}] Qualite : 0.06376195561344973 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26512008 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26512008_04-09-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26512008 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_P26512008_04-09-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26512011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26512012, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26512013, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26512014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26512015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26512016, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26512017, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26512018, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26512019, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26512020, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26512021, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26512022, 'pht': 3726}}" where mtr_portfolio_id = 26512008 and dashboard_run_id = 2235821 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`=26512008 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14722469, 0.06376195561344973, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26512008_04-09-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26512011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26512012, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26512013, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26512014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26512015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26512016, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26512017, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26512018, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26512019, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26512020, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26512021, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26512022, '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 = 26512746 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': 3661610, 'mtr_portfolio_id': 26512746, 'created_at': datetime.datetime(2025, 9, 4, 0, 46, 59), 'result': '0.06048141476015288', 'result_long': None, 'result_double': None}] Qualite : 0.06048141476015288 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26512746 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26512746_04-09-2025_00_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26512746 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_P26512746_04-09-2025_00_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26512749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26512750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26512751, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26512752, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26512753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26512754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26512755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26512756, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26512757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26512758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26512759, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26512760, 'pht': 3726}}" where mtr_portfolio_id = 26512746 and dashboard_run_id = 2235821 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`=26512746 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14722470, 0.06048141476015288, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26512746_04-09-2025_00_46_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26512749, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26512750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26512751, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26512752, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26512753, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26512754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26512755, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26512756, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26512757, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26512758, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26512759, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26512760, '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 = 26513045 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': 3661639, 'mtr_portfolio_id': 26513045, 'created_at': datetime.datetime(2025, 9, 4, 1, 33, 1), 'result': '0.05307991528254644', 'result_long': None, 'result_double': None}] Qualite : 0.05307991528254644 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26513045 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26513045_04-09-2025_01_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26513045 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_P26513045_04-09-2025_01_33_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26513049, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26513050, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26513051, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26513052, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26513053, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26513054, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26513055, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26513056, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26513057, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26513058, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26513059, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26513060, 'pht': 3726}}" where mtr_portfolio_id = 26513045 and dashboard_run_id = 2235821 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`=26513045 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14722471, 0.05307991528254644, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26513045_04-09-2025_01_33_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26513049, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26513050, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26513051, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26513052, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26513053, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26513054, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26513055, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26513056, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26513057, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26513058, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26513059, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26513060, '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 = 26514289 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': 3661766, 'mtr_portfolio_id': 26514289, 'created_at': datetime.datetime(2025, 9, 4, 1, 46, 57), 'result': '0.06679185906021409', 'result_long': None, 'result_double': None}] Qualite : 0.06679185906021409 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26514289 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26514289_04-09-2025_01_46_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26514289 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_P26514289_04-09-2025_01_46_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26514290, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26514291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26514292, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26514293, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26514294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26514295, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26514296, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26514297, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26514298, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26514299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26514300, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26514301, 'pht': 3726}}" where mtr_portfolio_id = 26514289 and dashboard_run_id = 2235817 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`=26514289 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14722472, 0.06679185906021409, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26514289_04-09-2025_01_46_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26514290, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26514291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26514292, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26514293, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26514294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26514295, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26514296, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26514297, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26514298, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26514299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26514300, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26514301, '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 = 26514642 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': 3661808, 'mtr_portfolio_id': 26514642, 'created_at': datetime.datetime(2025, 9, 4, 2, 2, 57), 'result': '0.059590210984218656', 'result_long': None, 'result_double': None}] Qualite : 0.059590210984218656 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26514642 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26514642_04-09-2025_02_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26514642 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_P26514642_04-09-2025_02_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26514648, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26514649, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26514650, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26514651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26514652, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26514653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26514654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26514655, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26514656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26514657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26514658, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26514659, 'pht': 3726}}" where mtr_portfolio_id = 26514642 and dashboard_run_id = 2235817 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`=26514642 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14722473, 0.059590210984218656, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26514642_04-09-2025_02_02_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26514648, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26514649, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26514650, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26514651, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26514652, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26514653, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26514654, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26514655, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26514656, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26514657, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26514658, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26514659, '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 (26511239,26512008,26512746,26513045,26514289,26514642) result : ((1381310396,), (1381310399,), (1381311379,), (1381311381,), (1381311384,), (1381312220,), (1381312223,), (1381312226,), (1381312229,), (1381312232,), (1381312235,), (1381313264,), (1381313267,), (1381313270,), (1381313273,), (1381313276,), (1381313862,), (1381313864,), (1381313866,), (1381313868,), (1381314117,), (1381314118,), (1381314119,), (1381314120,), (1381314122,), (1381314348,), (1381314350,), (1381314353,), (1381314355,), (1381314357,), (1381314752,), (1381314827,), (1381314829,), (1381314831,), (1381314833,), (1381314835,), (1381315040,), (1381315041,), (1381315042,), (1381315043,), (1381315098,), (1381315099,), (1381315100,), (1381315102,), (1381315103,), (1381315104,), (1381315270,), (1381315271,), (1381315272,), (1381315273,), (1381315274,), (1381315580,), (1381315581,), (1381315583,), (1381315584,), (1381315585,), (1381315586,), (1381315682,), (1381315683,), (1381315684,), (1381315685,), (1381315729,), (1381315730,), (1381315731,), (1381315732,), (1381315826,), (1381315828,), (1381315830,), (1381315832,), (1381316466,), (1381316707,), (1381316463,), (1381316465,), (1381316658,), (1381316659,), (1381316661,), (1381316663,), (1381316665,), (1381316667,), (1381316706,), (1381316821,), (1381316823,), (1381316825,), (1381316827,), (1381316829,), (1381316831,), (1381317023,), (1381317025,), (1381317027,), (1381317796,), (1381317801,), (1381317806,), (1381319184,), (1381319187,), (1381319191,), (1381319195,), (1381319199,), (1381319652,), (1381319654,), (1381319656,), (1381319658,), (1381319660,), (1381319662,), (1381320119,), (1381320121,), (1381320123,), (1381320125,), (1381321423,), (1381321431,), (1381321439,), (1381321449,), (1381321456,), (1381322593,), (1381322596,), (1381322598,), (1381322600,), (1381322602,), (1381322604,), (1381323215,), (1381323216,), (1381323217,), (1381323218,), (1381323940,), (1381323941,), (1381323942,), (1381323943,), (1381324018,), (1381324019,), (1381324020,), (1381324021,), (1381324023,), (1381324200,), (1381324202,), (1381324204,), (1381324206,), (1381324610,), (1381324611,), (1381324613,), (1381324616,), (1381324878,), (1381324875,), (1381324876,), (1381324877,), (1381325084,), (1381325086,), (1381325088,), (1381325089,), (1381325320,), (1381325321,), (1381325322,), (1381325323,), (1381325324,), (1381325325,), (1381325518,), (1381325521,), (1381325523,), (1381325525,), (1381325907,), (1381325909,), (1381325911,), (1381325913,), (1381326296,), (1381326298,), (1381326300,), (1381326302,), (1381326585,), (1381329291,), (1381329294,), (1381329706,), (1381329708,), (1381329710,), (1381329712,), (1381329714,), (1381329716,), (1381330124,), (1381330127,), (1381330130,), (1381330133,), (1381330847,), (1381330853,), (1381330858,), (1381331946,), (1381331949,), (1381331952,), (1381331955,), (1381332414,), (1381332404,), (1381332406,), (1381332408,), (1381332410,), (1381332412,), (1381333367,), (1381333370,), (1381333373,), (1381333376,), (1381333379,), (1381333941,), (1381333943,), (1381333945,), (1381333947,), (1381333949,), (1381334631,), (1381334634,), (1381334637,), (1381335104,), (1381335106,), (1381335108,), (1381335110,), (1381335807,), (1381335809,), (1381335811,), (1381335814,), (1381335816,), (1381336258,), (1381336259,), (1381336260,), (1381336261,), (1381336262,), (1381336263,), (1381336801,), (1381336803,), (1381336805,), (1381336966,), (1381336967,), (1381336968,), (1381336969,), (1381336970,), (1381336971,), (1381337452,), (1381337455,), (1381337458,), (1381337461,), (1381337464,), (1381337467,), (1381337643,), (1381337644,), (1381337645,), (1381337646,), (1381337647,), (1381337686,), (1381337687,), (1381337688,), (1381337735,), (1381345142,), (1381345189,), (1381345190,), (1381345259,), (1381345260,), (1381345262,), (1381345263,), (1381345302,), (1381345304,), (1381345305,), (1381345347,), (1381345348,), (1381345349,), (1381345394,), (1381345395,), (1381345396,), (1381345397,), (1381345398,), (1381345399,), (1381345436,), (1381345437,), (1381345438,), (1381345439,), (1381345440,), (1381345486,), (1381345487,), (1381345488,), (1381345490,), (1381345528,), (1381345529,), (1381345530,), (1381345531,), (1381345577,), (1381345585,), (1381345586,), (1381345587,), (1381345589,), (1381345633,), (1381345634,), (1381345635,), (1381345636,), (1381345637,), (1381345638,), (1381345679,), (1381345680,), (1381345681,), (1381345682,), (1381345717,), (1381345718,), (1381345719,), (1381345915,), (1381345919,), (1381345923,), (1381345927,), (1381345930,), (1381345999,), (1381346000,), (1381346001,), (1381346002,), (1381346003,), (1381346049,), (1381346044,), (1381346045,), (1381346046,), (1381346048,), (1381346114,), (1381346115,), (1381346116,), (1381346117,), (1381346182,), (1381346183,), (1381346232,), (1381346254,), (1381346255,), (1381346256,), (1381346258,), (1381346318,), (1381346319,), (1381346320,), (1381346321,), (1381346322,), (1381346323,), (1381346370,), (1381346371,), (1381346372,), (1381346428,), (1381346430,), (1381346431,), (1381346432,), (1381346433,), (1381346500,), (1381346501,), (1381346502,), (1381346503,), (1381346504,), (1381346558,), (1381346559,), (1381346560,), (1381346561,), (1381346562,), (1381346598,), (1381346599,), (1381346600,), (1381346601,), (1381346602,), (1381346641,), (1381346642,), (1381346679,), (1381346680,), (1381346681,), (1381346682,), (1381346683,), (1381346735,), (1381346736,), (1381346737,), (1381346738,), (1381346739,), (1381346740,), (1381346942,), (1381346944,), (1381346946,), (1381346948,), (1381347376,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04092025': {'nb_upload': 62, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26514642]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1381347376] map_info['map_portfolio_photo'] : {26514642: [1381347376, 1381346948, 1381346946, 1381346944, 1381346942, 1381346740, 1381346739, 1381346738, 1381346737, 1381346736, 1381346735, 1381346683, 1381346682, 1381346681, 1381346680, 1381346679, 1381346642, 1381346641, 1381346602, 1381346601, 1381346600, 1381346599, 1381346598, 1381346562, 1381346561, 1381346560, 1381346559, 1381346558, 1381346504, 1381346503, 1381346502, 1381346501, 1381346500, 1381346433, 1381346432, 1381346431, 1381346430, 1381346428, 1381346372, 1381346371, 1381346370, 1381346323, 1381346322, 1381346321, 1381346320, 1381346319, 1381346318, 1381346258, 1381346256, 1381346255, 1381346254, 1381346232, 1381346183, 1381346182, 1381346117, 1381346116, 1381346115, 1381346114, 1381346048, 1381346046, 1381346045, 1381346044]} final : True mtd_id 4302 list_pids : [1381347376] Looping around the photos to save general results len do output : 1 /26514642Didn'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, '3661808') ('4302', '26514642', '1381347376', None, None, None, None, None, '3661808') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '26514642', 'None', None, None, None, None, '3661808'), ('4302', '26514642', '1381347376', None, None, None, None, None, '3661808')] time used for this insertion : 0.028693675994873047 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7891626358032227 time spend to save output : 0.028896808624267578 total time spend for step 5 : 0.8180594444274902 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 (3661808) 1.89user 2.53system 0:07.29elapsed 60%CPU (0avgtext+0avgdata 155536maxresident)k 10648inputs+7592outputs (117major+62192minor)pagefaults 0swaps