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 : 1572657 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 (3312628) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3312628) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119309 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3312628'] with mtr_portfolio_ids : ['25119309'] and first list_photo_ids : [] new path : /proc/1572657/ Name: python3 Umask: 0002 State: R (running) Tgid: 1572657 Ngid: 0 Pid: 1572657 PPid: 1572656 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1572657 NSpid: 1572657 NSpgid: 1571683 NSsid: 1571683 VmPeak: 1106880 kB VmSize: 1106880 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99136 kB VmRSS: 99136 kB RssAnon: 59792 kB RssFile: 39344 kB RssShmem: 0 kB VmData: 865632 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: 46 nonvoluntary_ctxt_switches: 98 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1572657', 'Ngid': '0', 'Pid': '1572657', 'PPid': '1572656', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1572657', 'NSpid': '1572657', 'NSpgid': '1571683', 'NSsid': '1571683', 'VmPeak': '1106880 kB', 'VmSize': '1106880 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99136 kB', 'VmRSS': '99136 kB', 'RssAnon': '59792 kB', 'RssFile': '39344 kB', 'RssShmem': '0 kB', 'VmData': '865632 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': '46', 'nonvoluntary_ctxt_switches': '98'} ('datou_batch_current', '1572657', '1106880', '0', '1106880', '865632', '99136', b'', 'marlene', '3312628') 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 (25119309) 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 (3312628 ) ) 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 (25119309) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1372967893, 'portfolio_id': 25119309}, {'photo_id': 1372967892, 'portfolio_id': 25119309}, {'photo_id': 1372967891, 'portfolio_id': 25119309}, {'photo_id': 1372967890, 'portfolio_id': 25119309}, {'photo_id': 1372967888, 'portfolio_id': 25119309}, {'photo_id': 1372967886, 'portfolio_id': 25119309}, {'photo_id': 1372967871, 'portfolio_id': 25119309}, {'photo_id': 1372967843, 'portfolio_id': 25119309}, {'photo_id': 1372967842, 'portfolio_id': 25119309}, {'photo_id': 1372967841, 'portfolio_id': 25119309}, {'photo_id': 1372967839, 'portfolio_id': 25119309}, {'photo_id': 1372967838, 'portfolio_id': 25119309}, {'photo_id': 1372967836, 'portfolio_id': 25119309}, {'photo_id': 1372967812, 'portfolio_id': 25119309}, {'photo_id': 1372967810, 'portfolio_id': 25119309}, {'photo_id': 1372967808, 'portfolio_id': 25119309}, {'photo_id': 1372967805, 'portfolio_id': 25119309}, {'photo_id': 1372967803, 'portfolio_id': 25119309}, {'photo_id': 1372967802, 'portfolio_id': 25119309}, {'photo_id': 1372967794, 'portfolio_id': 25119309}, {'photo_id': 1372967793, 'portfolio_id': 25119309}, {'photo_id': 1372967791, 'portfolio_id': 25119309}, {'photo_id': 1372967788, 'portfolio_id': 25119309}, {'photo_id': 1372967784, 'portfolio_id': 25119309}, {'photo_id': 1372967780, 'portfolio_id': 25119309}, {'photo_id': 1372967770, 'portfolio_id': 25119309}, {'photo_id': 1372967769, 'portfolio_id': 25119309}, {'photo_id': 1372967768, 'portfolio_id': 25119309}, {'photo_id': 1372967767, 'portfolio_id': 25119309}, {'photo_id': 1372967766, 'portfolio_id': 25119309}, {'photo_id': 1372967764, 'portfolio_id': 25119309}, {'photo_id': 1372967740, 'portfolio_id': 25119309}, {'photo_id': 1372967729, 'portfolio_id': 25119309}, {'photo_id': 1372967728, 'portfolio_id': 25119309}, {'photo_id': 1372967727, 'portfolio_id': 25119309}, {'photo_id': 1372967726, 'portfolio_id': 25119309}, {'photo_id': 1372967724, 'portfolio_id': 25119309}, {'photo_id': 1372967722, 'portfolio_id': 25119309}, {'photo_id': 1372967717, 'portfolio_id': 25119309}, {'photo_id': 1372967716, 'portfolio_id': 25119309}, {'photo_id': 1372967715, 'portfolio_id': 25119309}, {'photo_id': 1372967713, 'portfolio_id': 25119309}, {'photo_id': 1372967711, 'portfolio_id': 25119309}, {'photo_id': 1372967710, 'portfolio_id': 25119309}, {'photo_id': 1372967697, 'portfolio_id': 25119309}, {'photo_id': 1372967696, 'portfolio_id': 25119309}, {'photo_id': 1372967695, 'portfolio_id': 25119309}, {'photo_id': 1372967693, 'portfolio_id': 25119309}, {'photo_id': 1372967690, 'portfolio_id': 25119309}, {'photo_id': 1372967686, 'portfolio_id': 25119309}, {'photo_id': 1372967659, 'portfolio_id': 25119309}, {'photo_id': 1372967641, 'portfolio_id': 25119309}, {'photo_id': 1372967633, 'portfolio_id': 25119309}, {'photo_id': 1372967630, 'portfolio_id': 25119309}, {'photo_id': 1372967628, 'portfolio_id': 25119309}, {'photo_id': 1372967625, 'portfolio_id': 25119309}, {'photo_id': 1372967622, 'portfolio_id': 25119309}] map_portfolio_id_photo_id: {25119309: [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886, 1372967871, 1372967843, 1372967842, 1372967841, 1372967839, 1372967838, 1372967836, 1372967812, 1372967810, 1372967808, 1372967805, 1372967803, 1372967802, 1372967794, 1372967793, 1372967791, 1372967788, 1372967784, 1372967780, 1372967770, 1372967769, 1372967768, 1372967767, 1372967766, 1372967764, 1372967740, 1372967729, 1372967728, 1372967727, 1372967726, 1372967724, 1372967722, 1372967717, 1372967716, 1372967715, 1372967713, 1372967711, 1372967710, 1372967697, 1372967696, 1372967695, 1372967693, 1372967690, 1372967686, 1372967659, 1372967641, 1372967633, 1372967630, 1372967628, 1372967625, 1372967622]} ##### 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.12030267715454102 #### 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 Mon Jul 21 06:14: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 (25119309) 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 : 25119309 get user id for portfolio 25119309 get sub ptf for main ptf 25119309, type 3726 and hashtags ['environnement', 'mal_croppe', 'Carton_gris', 'Carton_brun', 'autre_refus', 'plastique', 'flou', 'kraft', 'papier', 'cartonnette', 'Teint_Dans_La_Masse', 'metal'] 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`=25119309 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_gris','Carton_brun','autre_refus','plastique','flou','kraft','papier','cartonnette','Teint_Dans_La_Masse','metal')) 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`=25119309 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_gris','Carton_brun','autre_refus','plastique','flou','kraft','papier','cartonnette','Teint_Dans_La_Masse','metal')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25119309, 'sub_port_id': 25119362, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935799, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'cartonnette': {'main_port_id': 25119309, 'sub_port_id': 25119364, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935800, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'Carton_brun': {'main_port_id': 25119309, 'sub_port_id': 25119365, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935801, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'autre_refus': {'main_port_id': 25119309, 'sub_port_id': 25119366, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935802, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'plastique': {'main_port_id': 25119309, 'sub_port_id': 25119368, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935803, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'metal': {'main_port_id': 25119309, 'sub_port_id': 25119369, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935804, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'kraft': {'main_port_id': 25119309, 'sub_port_id': 25119370, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935805, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'mal_croppe': {'main_port_id': 25119309, 'sub_port_id': 25119372, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935806, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'flou': {'main_port_id': 25119309, 'sub_port_id': 25119373, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935807, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 25119309, 'sub_port_id': 25119374, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935808, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'Carton_gris': {'main_port_id': 25119309, 'sub_port_id': 25119376, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935809, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}, 'environnement': {'main_port_id': 25119309, 'sub_port_id': 25119377, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935810, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 2, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119362 , 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=25119309 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 (25119362) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119364 , 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=25119309 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 (25119364) result : ((1372967759,), (1372967861,), (1372967862,), (1372967925,), (1372967926,), (1372967927,), (1372967928,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119365 , 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=25119309 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 (25119365) result : ((1372967682,), (1372967760,), (1372967761,), (1372967864,), (1372967865,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119366 , 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=25119309 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 (25119366) result : ((1372967678,), (1372967679,), (1372967854,), (1372967855,), (1372967856,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119368 , 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=25119309 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 (25119368) result : ((1372967683,), (1372967684,), (1372967685,), (1372967687,), (1372967801,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119369 , 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=25119309 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 (25119369) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119370 , 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=25119309 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 (25119370) result : ((1372967762,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119372 , 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=25119309 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 (25119372) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119373 , 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=25119309 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 (25119373) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119374 , 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=25119309 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 (25119374) result : ((1372967676,), (1372967677,), (1372967881,), (1372967904,), (1372967905,), (1372967922,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119376 , 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=25119309 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 (25119376) result : ((1372967857,), (1372967859,), (1372967906,), (1372967907,), (1372967923,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25119377 , 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=25119309 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 (25119377) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25119309) result : ((1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25119309 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_gris','Carton_brun','autre_refus','plastique','flou','kraft','papier','cartonnette','Teint_Dans_La_Masse','metal')) 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`=25119309 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','mal_croppe','Carton_gris','Carton_brun','autre_refus','plastique','flou','kraft','papier','cartonnette','Teint_Dans_La_Masse','metal')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25119309, 'sub_port_id': 25119383, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935823, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'cartonnette': {'main_port_id': 25119309, 'sub_port_id': 25119384, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935824, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'Carton_brun': {'main_port_id': 25119309, 'sub_port_id': 25119385, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935825, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'autre_refus': {'main_port_id': 25119309, 'sub_port_id': 25119386, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935826, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'plastique': {'main_port_id': 25119309, 'sub_port_id': 25119387, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935827, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'metal': {'main_port_id': 25119309, 'sub_port_id': 25119388, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935828, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'kraft': {'main_port_id': 25119309, 'sub_port_id': 25119389, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935829, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'mal_croppe': {'main_port_id': 25119309, 'sub_port_id': 25119390, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935830, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'flou': {'main_port_id': 25119309, 'sub_port_id': 25119391, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935831, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'Teint_Dans_La_Masse': {'main_port_id': 25119309, 'sub_port_id': 25119392, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935832, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'Carton_gris': {'main_port_id': 25119309, 'sub_port_id': 25119393, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935833, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 3), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}, 'environnement': {'main_port_id': 25119309, 'sub_port_id': 25119394, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16935834, 'last_updated_at': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_desc': datetime.datetime(2025, 7, 21, 6, 13), 'last_updated_at_asc': datetime.datetime(2025, 7, 21, 6, 3)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119383,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119362 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119384,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119364 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119385,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119365 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119386,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119366 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119387,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119368 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119388,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119369 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119389,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119370 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119390,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119372 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119391,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119373 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119392,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119374 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119393,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119376 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25119394,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25119377 lien utilise dans velours : https://www.fotonower.com/velours/25119383,25119384,25119385,25119386,25119387,25119388,25119389,25119390,25119391,25119392,25119393,25119394?tags=papier,cartonnette,Carton_brun,autre_refus,plastique,metal,kraft,mal_croppe,flou,Teint_Dans_La_Masse,Carton_gris,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25119309]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] map_info['map_portfolio_photo'] : {25119309: [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886, 1372967871, 1372967843, 1372967842, 1372967841, 1372967839, 1372967838, 1372967836, 1372967812, 1372967810, 1372967808, 1372967805, 1372967803, 1372967802, 1372967794, 1372967793, 1372967791, 1372967788, 1372967784, 1372967780, 1372967770, 1372967769, 1372967768, 1372967767, 1372967766, 1372967764, 1372967740, 1372967729, 1372967728, 1372967727, 1372967726, 1372967724, 1372967722, 1372967717, 1372967716, 1372967715, 1372967713, 1372967711, 1372967710, 1372967697, 1372967696, 1372967695, 1372967693, 1372967690, 1372967686, 1372967659, 1372967641, 1372967633, 1372967630, 1372967628, 1372967625, 1372967622]} final : False mtd_id 4302 list_pids : [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] Looping around the photos to save general results len do output : 1 /25119309. 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, '3312628') ('4302', '25119309', '1372967893', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967892', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967891', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967890', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967888', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967886', None, None, None, None, None, '3312628') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25119309', "{'papier': 25119362, 'cartonnette': 25119364, 'Carton_brun': 25119365, 'autre_refus': 25119366, 'plastique': 25119368, 'metal': 25119369, 'kraft': 25119370, 'mal_croppe': 25119372, 'flou': 25119373, 'Teint_Dans_La_Masse': 25119374, 'Carton_gris': 25119376, 'environnement': 25119377}", None, None, None, None, '3312628'), ('4302', '25119309', '1372967893', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967892', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967891', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967890', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967888', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967886', None, None, None, None, None, '3312628')] time used for this insertion : 0.01389169692993164 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.77665114402771 time spend to save output : 0.014116525650024414 total time spend for step 1 : 1.7907676696777344 step2:final Mon Jul 21 06:14:59 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 (25119309) 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 25119309 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1372967633,1372967630,1372967628,1372967625,1372967622,1372967641,1372967659,1372967697,1372967696,1372967695,1372967693,1372967690,1372967686,1372967717,1372967716,1372967715,1372967713,1372967711,1372967710,1372967729,1372967728,1372967727,1372967726,1372967724,1372967722,1372967740,1372967770,1372967769,1372967768,1372967767,1372967766,1372967764,1372967794,1372967793,1372967791,1372967788,1372967784,1372967780,1372967812,1372967810,1372967808,1372967805,1372967803,1372967802,1372967843,1372967842,1372967841,1372967839,1372967838,1372967836,1372967871,1372967893,1372967892,1372967891,1372967890,1372967888,1372967886); 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([25119309]) Inside saveOutput : final : False verbose : True original output for save of step final : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} new output for save of step final : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] map_info['map_portfolio_photo'] : {25119309: [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886, 1372967871, 1372967843, 1372967842, 1372967841, 1372967839, 1372967838, 1372967836, 1372967812, 1372967810, 1372967808, 1372967805, 1372967803, 1372967802, 1372967794, 1372967793, 1372967791, 1372967788, 1372967784, 1372967780, 1372967770, 1372967769, 1372967768, 1372967767, 1372967766, 1372967764, 1372967740, 1372967729, 1372967728, 1372967727, 1372967726, 1372967724, 1372967722, 1372967717, 1372967716, 1372967715, 1372967713, 1372967711, 1372967710, 1372967697, 1372967696, 1372967695, 1372967693, 1372967690, 1372967686, 1372967659, 1372967641, 1372967633, 1372967630, 1372967628, 1372967625, 1372967622]} final : False mtd_id 4302 list_pids : [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] Looping around the photos to save general results len do output : 6 /1372967893.Didn't retrieve data . /1372967892.Didn't retrieve data . /1372967891.Didn't retrieve data . /1372967890.Didn't retrieve data . /1372967888.Didn't retrieve data . /1372967886.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, '3312628') ('4302', '25119309', '1372967893', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967892', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967891', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967890', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967888', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967886', None, None, None, None, None, '3312628') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25119309', '1372967893', '0.027453358201679597', None, None, None, None, '3312628'), ('4302', '25119309', '1372967892', '0.027453358201679597', None, None, None, None, '3312628'), ('4302', '25119309', '1372967891', '0.027453358201679597', None, None, None, None, '3312628'), ('4302', '25119309', '1372967890', '0.027453358201679597', None, None, None, None, '3312628'), ('4302', '25119309', '1372967888', '0.027453358201679597', None, None, None, None, '3312628'), ('4302', '25119309', '1372967886', '0.027453358201679597', None, None, None, None, '3312628')] time used for this insertion : 0.34398865699768066 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07264041900634766 time spend to save output : 0.34437108039855957 total time spend for step 2 : 0.4170114994049072 step3:velours_tree Mon Jul 21 06:14:59 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 : {25119309: [{'papier': 25119362, 'cartonnette': 25119364, 'Carton_brun': 25119365, 'autre_refus': 25119366, 'plastique': 25119368, 'metal': 25119369, 'kraft': 25119370, 'mal_croppe': 25119372, 'flou': 25119373, 'Teint_Dans_La_Masse': 25119374, 'Carton_gris': 25119376, 'environnement': 25119377}]} input_args_next_step : {25119309: ()} output_args : {25119309: [{'papier': 25119362, 'cartonnette': 25119364, 'Carton_brun': 25119365, 'autre_refus': 25119366, 'plastique': 25119368, 'metal': 25119369, 'kraft': 25119370, 'mal_croppe': 25119372, 'flou': 25119373, 'Teint_Dans_La_Masse': 25119374, 'Carton_gris': 25119376, 'environnement': 25119377}]} args : 25119309 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 : ({'papier': 25119362, 'cartonnette': 25119364, 'Carton_brun': 25119365, 'autre_refus': 25119366, 'plastique': 25119368, 'metal': 25119369, 'kraft': 25119370, 'mal_croppe': 25119372, 'flou': 25119373, 'Teint_Dans_La_Masse': 25119374, 'Carton_gris': 25119376, 'environnement': 25119377},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25119309) 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([25119309]) 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.2756032943725586 time spend to save output : 5.555152893066406e-05 total time spend for step 3 : 0.27565884590148926 step4:send_mail_cod Mon Jul 21 06:14:59 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 : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} input_args_next_step : {1372967893: ()} output_args : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} args : 1372967893 depend.output_id : 0 input_args_next_step : {1372967893: ('0.027453358201679597',), 1372967892: ()} output_args : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} args : 1372967892 depend.output_id : 0 input_args_next_step : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ()} output_args : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} args : 1372967891 depend.output_id : 0 input_args_next_step : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ()} output_args : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} args : 1372967890 depend.output_id : 0 input_args_next_step : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ()} output_args : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} args : 1372967888 depend.output_id : 0 input_args_next_step : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ()} output_args : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',)} args : 1372967886 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {25119309: [{'papier': 25119362, 'cartonnette': 25119364, 'Carton_brun': 25119365, 'autre_refus': 25119366, 'plastique': 25119368, 'metal': 25119369, 'kraft': 25119370, 'mal_croppe': 25119372, 'flou': 25119373, 'Teint_Dans_La_Masse': 25119374, 'Carton_gris': 25119376, 'environnement': 25119377}]} input_args_next_step : {1372967893: ('0.027453358201679597',), 1372967892: ('0.027453358201679597',), 1372967891: ('0.027453358201679597',), 1372967890: ('0.027453358201679597',), 1372967888: ('0.027453358201679597',), 1372967886: ('0.027453358201679597',), 25119309: ()} output_args : {25119309: [{'papier': 25119362, 'cartonnette': 25119364, 'Carton_brun': 25119365, 'autre_refus': 25119366, 'plastique': 25119368, 'metal': 25119369, 'kraft': 25119370, 'mal_croppe': 25119372, 'flou': 25119373, 'Teint_Dans_La_Masse': 25119374, 'Carton_gris': 25119376, 'environnement': 25119377}]} args : 25119309 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :7, first value : ('0.027453358201679597',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25119309) 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 (1372967893,1372967892,1372967891,1372967890,1372967888,1372967886) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1372967886 begin to download photo : 1372967890 begin to download photo : 1372967892 download finish for photo 1372967886 begin to download photo : 1372967888 download finish for photo 1372967892 begin to download photo : 1372967893 download finish for photo 1372967890 begin to download photo : 1372967891 download finish for photo 1372967888 download finish for photo 1372967893 download finish for photo 1372967891 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P25119309_21-07-2025_06_15_00.pdf 25119364 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=25119364 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372967759: '1753070847_2902745_1372967728_4de073a834abecb38fd6ff96bf04ecb6_rle_crop_3888657734_0.png', 1372967861: '1753071084_2909241_1372967770_861738ac3b6a6f76ee468eb8360fb021_rle_crop_3888658303_0.png', 1372967862: '1753071084_2909241_1372967767_c64707cf22bfff2bef0f157425095b1b_rle_crop_3888658335_0.png', 1372967925: '1753071246_1896122_1372967812_705595a9ed56222abc93343019806da8_rle_crop_3888658901_0.png', 1372967926: '1753071246_1896122_1372967808_4487a2167623e91d4137459f40b1efa2_rle_crop_3888658934_0.png', 1372967927: '1753071246_1896122_1372967803_33c34cfd1e0f67f789a218e6117e366b_rle_crop_3888658968_0.png', 1372967928: '1753071246_1896122_1372967802_1b1847f6fa817c8ac2c6b35abc63c288_rle_crop_3888658977_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/ad6121e55b47ba7823f914687574030c_61266826.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/48edeaf7844017c42b18a2ea9f621f3e_23255809.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/3418c954f3cef885dd6fea80089a3911_75925570.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f915482c84fa9c6c19c554741fd7e45d_88158331.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f20aa8dcbd35c4478e6ed863ef8edc54_23846654.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/7d8008bc899163bf8153768fedeabe67_74066376.png change filename to text .imagette251193641753071300/ imagette251193641753071300/1753071246_1896122_1372967808_4487a2167623e91d4137459f40b1efa2_rle_crop_3888658934_0.png.png imagette251193641753071300/1753071246_1896122_1372967803_33c34cfd1e0f67f789a218e6117e366b_rle_crop_3888658968_0.png.png imagette251193641753071300/1753071084_2909241_1372967767_c64707cf22bfff2bef0f157425095b1b_rle_crop_3888658335_0.png.png imagette251193641753071300/1753071246_1896122_1372967802_1b1847f6fa817c8ac2c6b35abc63c288_rle_crop_3888658977_0.png.png imagette251193641753071300/1753070847_2902745_1372967728_4de073a834abecb38fd6ff96bf04ecb6_rle_crop_3888657734_0.png.png imagette251193641753071300/1753071246_1896122_1372967812_705595a9ed56222abc93343019806da8_rle_crop_3888658901_0.png.png imagette251193641753071300/1753071084_2909241_1372967770_861738ac3b6a6f76ee468eb8360fb021_rle_crop_3888658303_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/50f0dda6c28ef3f5d2142e23c8f4c166_12401767.png imagette251193641753071300 25119366 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=25119366 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372967678: '1753070605_2898630_1372967622_cc3ac06fbd2f80c4c1ec9efcaf1ca680_rle_crop_3888657552_0.png', 1372967679: '1753070605_2898630_1372967622_cc3ac06fbd2f80c4c1ec9efcaf1ca680_rle_crop_3888657556_0.png', 1372967854: '1753071084_2909241_1372967768_027699041036d4e09064f714f5e03161_rle_crop_3888658326_0.png', 1372967855: '1753071084_2909241_1372967767_c64707cf22bfff2bef0f157425095b1b_rle_crop_3888658337_0.png', 1372967856: '1753071084_2909241_1372967766_0354b32cb046e1397e276680403d13b1_rle_crop_3888658345_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/13625a08950e389f442d625b8d76005c_26032554.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/172176f7aa2d5126a4b2263f6b6f99c0_18718742.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/a4822ef1ab6e67ef0e0b475b08d05364_88216394.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/3fa3bcf01950ba9dc263e0857f7141b4_90957624.png change filename to text .imagette251193661753071300/ imagette251193661753071300/1753071084_2909241_1372967767_c64707cf22bfff2bef0f157425095b1b_rle_crop_3888658337_0.png.png imagette251193661753071300/1753070605_2898630_1372967622_cc3ac06fbd2f80c4c1ec9efcaf1ca680_rle_crop_3888657556_0.png.png imagette251193661753071300/1753071084_2909241_1372967768_027699041036d4e09064f714f5e03161_rle_crop_3888658326_0.png.png imagette251193661753071300/1753071084_2909241_1372967766_0354b32cb046e1397e276680403d13b1_rle_crop_3888658345_0.png.png imagette251193661753071300/1753070605_2898630_1372967622_cc3ac06fbd2f80c4c1ec9efcaf1ca680_rle_crop_3888657552_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/966472e69d6c57993a284e09c1e126bf_11878154.png imagette251193661753071300 25119368 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=25119368 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372967683: '1753070605_2898630_1372967633_495bf1187e4e0eb2e132d7e7eca509a8_rle_crop_3888657513_0.png', 1372967684: '1753070605_2898630_1372967630_f3d263030d206ff972d22bcebe380d63_rle_crop_3888657528_0.png', 1372967685: '1753070605_2898630_1372967628_7cec6d6163144aa070e9d0020bd48203_rle_crop_3888657535_0.png', 1372967687: '1753070605_2898630_1372967625_8cdeb59ca08ba15a6a5dda315f34ea24_rle_crop_3888657544_0.png', 1372967801: '1753070965_2905409_1372967686_84c924877dab34b95298fc5fd1c814f1_rle_crop_3888658134_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/2249770c18c74084f08f2731af7d2ba3_40084419.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/a5771fe7b7a52c73a2f0f08f3ab7b06d_84232639.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/4c9f6471fc4c0c7bab236b9a306dce0a_9030674.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/70b69f130aa4aa7bc32e3b2ac4cb5521_56552031.png change filename to text .imagette251193681753071300/ imagette251193681753071300/1753070605_2898630_1372967630_f3d263030d206ff972d22bcebe380d63_rle_crop_3888657528_0.png.png imagette251193681753071300/1753070605_2898630_1372967625_8cdeb59ca08ba15a6a5dda315f34ea24_rle_crop_3888657544_0.png.png imagette251193681753071300/1753070605_2898630_1372967633_495bf1187e4e0eb2e132d7e7eca509a8_rle_crop_3888657513_0.png.png imagette251193681753071300/1753070605_2898630_1372967628_7cec6d6163144aa070e9d0020bd48203_rle_crop_3888657535_0.png.png imagette251193681753071300/1753070965_2905409_1372967686_84c924877dab34b95298fc5fd1c814f1_rle_crop_3888658134_0.png.png imagette251193691753071301/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/635a4f829fcb1e1bd7d19e43691f77ac_32748403.png imagette251193681753071300 25119369 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=25119369 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251193691753071301 25119370 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=25119370 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372967762: '1753070847_2902745_1372967729_debcac525f3223c08d9d1fb741903ae8_rle_crop_3888657723_0.png'} change filename to text .imagette251193701753071301/ imagette251193701753071301/1753070847_2902745_1372967729_debcac525f3223c08d9d1fb741903ae8_rle_crop_3888657723_0.png.png imagette251193721753071301/ imagette251193731753071301/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/c15b9aea9180b6643d2bfddffae5a638_72971288.png imagette251193701753071301 25119372 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=25119372 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251193721753071301 25119373 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=25119373 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette251193731753071301 25119365 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=25119365 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372967682: '1753070605_2898630_1372967633_495bf1187e4e0eb2e132d7e7eca509a8_rle_crop_3888657504_0.png', 1372967760: '1753070847_2902745_1372967729_debcac525f3223c08d9d1fb741903ae8_rle_crop_3888657727_0.png', 1372967761: '1753070847_2902745_1372967728_4de073a834abecb38fd6ff96bf04ecb6_rle_crop_3888657740_0.png', 1372967864: '1753071084_2909241_1372967770_861738ac3b6a6f76ee468eb8360fb021_rle_crop_3888658298_0.png', 1372967865: '1753071084_2909241_1372967768_027699041036d4e09064f714f5e03161_rle_crop_3888658324_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/5ee85b03c60e2fa42b37dfb2d5960c44_33914025.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/6d93cba949f838daa664ae86e46f4798_41489233.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/4bf6994f25480f78232745577f471228_72758811.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f2c127b641efe3eafcf7c0784f795138_822885.png change filename to text .imagette251193651753071301/ imagette251193651753071301/1753070847_2902745_1372967728_4de073a834abecb38fd6ff96bf04ecb6_rle_crop_3888657740_0.png.png imagette251193651753071301/1753071084_2909241_1372967768_027699041036d4e09064f714f5e03161_rle_crop_3888658324_0.png.png imagette251193651753071301/1753070605_2898630_1372967633_495bf1187e4e0eb2e132d7e7eca509a8_rle_crop_3888657504_0.png.png imagette251193651753071301/1753070847_2902745_1372967729_debcac525f3223c08d9d1fb741903ae8_rle_crop_3888657727_0.png.png imagette251193651753071301/1753071084_2909241_1372967770_861738ac3b6a6f76ee468eb8360fb021_rle_crop_3888658298_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/cbb61a6d59fba490aa3fbd76b05a4f43_84838050.png imagette251193651753071301 25119374 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=25119374 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372967676: '1753070605_2898630_1372967633_495bf1187e4e0eb2e132d7e7eca509a8_rle_crop_3888657510_0.png', 1372967677: '1753070605_2898630_1372967630_f3d263030d206ff972d22bcebe380d63_rle_crop_3888657524_0.png', 1372967881: '1753071126_1890274_1372967780_6342d0c334c73e5cd8ded993ae191f1a_rle_crop_3888658482_0.png', 1372967904: '1753071204_2912374_1372967843_d2274941e7605b380876d3dea5e6ffc2_rle_crop_3888658648_0.png', 1372967905: '1753071204_2912374_1372967842_138d79e6d6c4949f416b1e7de1558370_rle_crop_3888658663_0.png', 1372967922: '1753071246_1896122_1372967812_705595a9ed56222abc93343019806da8_rle_crop_3888658908_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/302b0820f1bdddb57e7733fd3333a74b_59753778.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/a5bb372b84a4e13b311d53ab0dd4fade_87048940.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/43218219407687babe14a2484d7e8caf_84113177.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/9d098a235a7c9d0962fead6739e4fae4_27146641.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/c2ebf653834ef31265dd9796eafba484_76539989.png change filename to text .imagette251193741753071301/ imagette251193741753071301/1753071246_1896122_1372967812_705595a9ed56222abc93343019806da8_rle_crop_3888658908_0.png.png imagette251193741753071301/1753070605_2898630_1372967633_495bf1187e4e0eb2e132d7e7eca509a8_rle_crop_3888657510_0.png.png imagette251193741753071301/1753071204_2912374_1372967842_138d79e6d6c4949f416b1e7de1558370_rle_crop_3888658663_0.png.png imagette251193741753071301/1753071126_1890274_1372967780_6342d0c334c73e5cd8ded993ae191f1a_rle_crop_3888658482_0.png.png imagette251193741753071301/1753070605_2898630_1372967630_f3d263030d206ff972d22bcebe380d63_rle_crop_3888657524_0.png.png imagette251193741753071301/1753071204_2912374_1372967843_d2274941e7605b380876d3dea5e6ffc2_rle_crop_3888658648_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/e89ddbdef0c538f79c284c0ce37608e2_97961690.png imagette251193741753071301 25119376 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=25119376 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1372967857: '1753071084_2909241_1372967770_861738ac3b6a6f76ee468eb8360fb021_rle_crop_3888658299_0.png', 1372967859: '1753071084_2909241_1372967768_027699041036d4e09064f714f5e03161_rle_crop_3888658320_0.png', 1372967906: '1753071204_2912374_1372967843_d2274941e7605b380876d3dea5e6ffc2_rle_crop_3888658644_0.png', 1372967907: '1753071204_2912374_1372967843_d2274941e7605b380876d3dea5e6ffc2_rle_crop_3888658645_0.png', 1372967923: '1753071246_1896122_1372967810_7cf4c3957682eb5071281d04232fe4b3_rle_crop_3888658922_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/71c714d4f5a6d6cb2a21cca2618e9de3_33701041.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/c7d72172b0226ec4ed4bd847f0eef41c_59833219.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/2721d91d9b73b1acc4923a8d93f2e454_82209137.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/5d8e7fb5a39617ad849b5683a02f2f93_69966269.png change filename to text .imagette251193761753071301/ imagette251193761753071301/1753071084_2909241_1372967770_861738ac3b6a6f76ee468eb8360fb021_rle_crop_3888658299_0.png.png imagette251193761753071301/1753071084_2909241_1372967768_027699041036d4e09064f714f5e03161_rle_crop_3888658320_0.png.png imagette251193761753071301/1753071204_2912374_1372967843_d2274941e7605b380876d3dea5e6ffc2_rle_crop_3888658645_0.png.png imagette251193761753071301/1753071246_1896122_1372967810_7cf4c3957682eb5071281d04232fe4b3_rle_crop_3888658922_0.png.png imagette251193761753071301/1753071204_2912374_1372967843_d2274941e7605b380876d3dea5e6ffc2_rle_crop_3888658644_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/66fbf834d806b2768a19485fba3935f6_30725881.png imagette251193761753071301 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25119309 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25119383,25119384,25119385,25119386,25119387,25119388,25119389,25119390,25119391,25119392,25119393,25119394?tags=papier,cartonnette,Carton_brun,autre_refus,plastique,metal,kraft,mal_croppe,flou,Teint_Dans_La_Masse,Carton_gris,environnement your option no_mail is active, we will not send the real mail to your client args[1372967893] : ('0.027453358201679597',) no score found for photo 1372967893 We are sending mail with results at report@fotonower.com args[1372967892] : ('0.027453358201679597',) no score found for photo 1372967892 We are sending mail with results at report@fotonower.com args[1372967891] : ('0.027453358201679597',) no score found for photo 1372967891 We are sending mail with results at report@fotonower.com args[1372967890] : ('0.027453358201679597',) no score found for photo 1372967890 We are sending mail with results at report@fotonower.com args[1372967888] : ('0.027453358201679597',) no score found for photo 1372967888 We are sending mail with results at report@fotonower.com args[1372967886] : ('0.027453358201679597',) no score found for photo 1372967886 We are sending mail with results at report@fotonower.com refus_total : 0.027453358201679597 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=25119309 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_P25119309_21-07-2025_06_15_00.pdf results_Auto_P25119309_21-07-2025_06_15_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119309_21-07-2025_06_15_00.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','25119309','results_Auto_P25119309_21-07-2025_06_15_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119309_21-07-2025_06_15_00.pdf','pdf','','0.17','0.027453358201679597') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25119309]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] map_info['map_portfolio_photo'] : {25119309: [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886, 1372967871, 1372967843, 1372967842, 1372967841, 1372967839, 1372967838, 1372967836, 1372967812, 1372967810, 1372967808, 1372967805, 1372967803, 1372967802, 1372967794, 1372967793, 1372967791, 1372967788, 1372967784, 1372967780, 1372967770, 1372967769, 1372967768, 1372967767, 1372967766, 1372967764, 1372967740, 1372967729, 1372967728, 1372967727, 1372967726, 1372967724, 1372967722, 1372967717, 1372967716, 1372967715, 1372967713, 1372967711, 1372967710, 1372967697, 1372967696, 1372967695, 1372967693, 1372967690, 1372967686, 1372967659, 1372967641, 1372967633, 1372967630, 1372967628, 1372967625, 1372967622]} final : False mtd_id 4302 list_pids : [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] 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, '3312628') ('4302', '25119309', '1372967893', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967892', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967891', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967890', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967888', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967886', None, None, None, None, None, '3312628') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25119309', '1372967893', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967892', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967891', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967890', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967888', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967886', None, None, None, None, None, '3312628')] time used for this insertion : 0.015887022018432617 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.1608009338378906 time spend to save output : 0.016071319580078125 total time spend for step 4 : 3.1768722534179688 step5:split_time_score Mon Jul 21 06:15:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25119309'] 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 : [('25119309',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25119309) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1372967886: {'path': 'temp/1753071299_1572657_1372967886_80fdf9feb84aeb469ddb29d08631dc7a.jpg', 'extension': 'jpg'}, 1372967888: {'path': 'temp/1753071299_1572657_1372967888_29e9b09749a1174bec382d651e1cd203.jpg', 'extension': 'jpg'}, 1372967892: {'path': 'temp/1753071299_1572657_1372967892_1eb91cad22bd1f99b5b8fe9a197b9937.jpg', 'extension': 'jpg'}, 1372967893: {'path': 'temp/1753071299_1572657_1372967893_edf8f3f97da4086fd3c69ae21ccb3ce4.jpg', 'extension': 'jpg'}, 1372967890: {'path': 'temp/1753071299_1572657_1372967890_303c443dd00125ca53137fc3488e242f.jpg', 'extension': 'jpg'}, 1372967891: {'path': 'temp/1753071299_1572657_1372967891_2c4a3d3727d49ef54e68d2d739d0801b.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 = 25119309; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25119309 group by h (('06', 57),) 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=25119309 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 (25119309) 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 (25119309) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 21072025 25119309 Nombre de photos uploadées : 57 / 23040 (0%) 21072025 25119309 Nombre de photos taguées (types de déchets): 0 / 57 (0%) 21072025 25119309 Nombre de photos taguées (volume) : 0 / 57 (0%) [{'photo_id': 1372967633, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/495bf1187e4e0eb2e132d7e7eca509a8.jpg', 'username': None, 'uploaded_at': 1753070463, 'text': 'image_21072025_06_00_14_010202m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1372967630, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/f3d263030d206ff972d22bcebe380d63.jpg', 'username': None, 'uploaded_at': 1753070463, 'text': 'image_21072025_06_00_24_010142m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1372967628, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/7cec6d6163144aa070e9d0020bd48203.jpg', 'username': None, 'uploaded_at': 1753070463, 'text': 'image_21072025_06_00_34_010144m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1372967625, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/21/8cdeb59ca08ba15a6a5dda315f34ea24.jpg', 'username': None, 'uploaded_at': 1753070463, 'text': 'image_21072025_06_00_44_010137m0.jpg 4e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 9.5367431640625e-07 elapsed_time : order_list_meta_photo_and_scores 4.5299530029296875e-06 ????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0024182796478271484 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25119309, '2025-07-21' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1992378,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02861618995666504 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= 1992378 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1992378, 'dashboard_run_id': 1999843, 'mtr_portfolio_id': 25117802, 'dashboard_result_id': 12778226, '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_P25117802_21-07-2025_05_16_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25117803, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25117804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25117805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25117806, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25117807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25117808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25117809, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25117810, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25117811, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25117812, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25117813, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25117814, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 1999843, 'mtr_portfolio_id': 25118162, 'dashboard_result_id': 12778227, '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_P25118162_21-07-2025_05_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118177, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118178, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118179, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118181, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118185, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118188, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 1999843, 'mtr_portfolio_id': 25118583, 'dashboard_result_id': 12778228, '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_P25118583_21-07-2025_05_46_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118610, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118612, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118614, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118621, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 1999843, 'mtr_portfolio_id': 25118867, 'dashboard_result_id': 12778229, '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_P25118867_21-07-2025_06_00_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25118870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118871, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118872, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118877, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118880, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118881, 'pht': 3726}}"}, {'dashboat_entry_day': 1992378, 'dashboard_run_id': 1999843, 'mtr_portfolio_id': 25119309, 'dashboard_result_id': 12778230, '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_P25119309_21-07-2025_06_13_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25119362, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119364, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119366, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119368, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119369, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119370, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119374, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119377, '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 = 25117802 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': 3312464, 'mtr_portfolio_id': 25117802, 'created_at': datetime.datetime(2025, 7, 21, 5, 16, 27), 'result': '0.03593403662891448', 'result_long': None, 'result_double': None}] Qualite : 0.03593403662891448 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25117802 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25117802_21-07-2025_05_16_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25117802 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_P25117802_21-07-2025_05_16_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25117803, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25117804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25117805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25117806, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25117807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25117808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25117809, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25117810, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25117811, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25117812, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25117813, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25117814, 'pht': 3726}}" where mtr_portfolio_id = 25117802 and dashboard_run_id = 1999843 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`=25117802 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12778226, 0.03593403662891448, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25117802_21-07-2025_05_16_28.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25117803, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25117804, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25117805, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25117806, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25117807, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25117808, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25117809, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25117810, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25117811, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25117812, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25117813, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25117814, '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 = 25118162 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': 3312503, 'mtr_portfolio_id': 25118162, 'created_at': datetime.datetime(2025, 7, 21, 5, 32, 58), 'result': '0.032502647683057155', 'result_long': None, 'result_double': None}] Qualite : 0.032502647683057155 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25118162 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118162_21-07-2025_05_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25118162 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_P25118162_21-07-2025_05_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118177, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118178, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118179, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118181, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118185, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118188, 'pht': 3726}}" where mtr_portfolio_id = 25118162 and dashboard_run_id = 1999845 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`=25118162 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12778227, 0.032502647683057155, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118162_21-07-2025_05_32_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118177, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118178, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118179, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118180, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118181, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118182, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118185, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118188, '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 = 25118583 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': 3312548, 'mtr_portfolio_id': 25118583, 'created_at': datetime.datetime(2025, 7, 21, 5, 46, 57), 'result': '0.03308538033732772', 'result_long': None, 'result_double': None}] Qualite : 0.03308538033732772 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25118583 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118583_21-07-2025_05_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25118583 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_P25118583_21-07-2025_05_46_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118610, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118612, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118614, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118621, 'pht': 3726}}" where mtr_portfolio_id = 25118583 and dashboard_run_id = 1999845 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`=25118583 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12778228, 0.03308538033732772, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118583_21-07-2025_05_46_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118610, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118611, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118612, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118613, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118614, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118615, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25118616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118617, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118619, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118620, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118621, '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 = 25118867 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': 3312576, 'mtr_portfolio_id': 25118867, 'created_at': datetime.datetime(2025, 7, 21, 6, 0, 30), 'result': '0.037794704530617076', 'result_long': None, 'result_double': None}] Qualite : 0.037794704530617076 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25118867 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118867_21-07-2025_06_00_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25118867 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_P25118867_21-07-2025_06_00_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25118870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118871, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118872, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118877, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118880, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118881, 'pht': 3726}}" where mtr_portfolio_id = 25118867 and dashboard_run_id = 1999845 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`=25118867 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12778229, 0.037794704530617076, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25118867_21-07-2025_06_00_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25118870, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25118871, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25118872, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25118873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25118874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25118875, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25118876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25118877, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25118878, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25118879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25118880, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25118881, '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 = 25119309 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': 3312628, 'mtr_portfolio_id': 25119309, 'created_at': datetime.datetime(2025, 7, 21, 6, 14, 59), 'result': '0.027453358201679597', 'result_long': None, 'result_double': None}] Qualite : 0.027453358201679597 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25119309 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119309_21-07-2025_06_15_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25119309 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_P25119309_21-07-2025_06_15_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25119362, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119364, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119366, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119368, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119369, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119370, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119374, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119377, 'pht': 3726}}" where mtr_portfolio_id = 25119309 and dashboard_run_id = 1999845 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`=25119309 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12778230, 0.027453358201679597, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25119309_21-07-2025_06_15_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25119362, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25119364, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25119365, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25119366, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25119368, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25119369, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25119370, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25119372, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25119373, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25119374, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25119376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25119377, '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 (25117802,25118162,25118583,25118867,25119309) result : ((1372964074,), (1372964101,), (1372964128,), (1372964152,), (1372964177,), (1372964403,), (1372964596,), (1372964606,), (1372964608,), (1372964610,), (1372964612,), (1372964614,), (1372964631,), (1372964635,), (1372964637,), (1372964641,), (1372964645,), (1372964648,), (1372964668,), (1372964691,), (1372964692,), (1372964693,), (1372964694,), (1372964695,), (1372964696,), (1372964720,), (1372964722,), (1372964723,), (1372964724,), (1372964725,), (1372964726,), (1372964739,), (1372964741,), (1372964742,), (1372964743,), (1372964744,), (1372964745,), (1372964758,), (1372964760,), (1372964761,), (1372964762,), (1372964764,), (1372964766,), (1372964792,), (1372964795,), (1372964798,), (1372964800,), (1372964802,), (1372964803,), (1372964831,), (1372964855,), (1372964857,), (1372964858,), (1372964860,), (1372964861,), (1372964862,), (1372964878,), (1372964880,), (1372964881,), (1372964883,), (1372964884,), (1372964885,), (1372964898,), (1372964900,), (1372964902,), (1372964904,), (1372964905,), (1372964906,), (1372964930,), (1372964933,), (1372964935,), (1372964936,), (1372964937,), (1372964938,), (1372964945,), (1372964946,), (1372964947,), (1372964948,), (1372964949,), (1372964951,), (1372964959,), (1372964960,), (1372964962,), (1372964964,), (1372964966,), (1372964968,), (1372964981,), (1372964983,), (1372964984,), (1372964985,), (1372964986,), (1372964987,), (1372965001,), (1372965003,), (1372965005,), (1372965006,), (1372965007,), (1372965008,), (1372965018,), (1372965021,), (1372965023,), (1372965024,), (1372965025,), (1372965026,), (1372965046,), (1372965063,), (1372965083,), (1372965088,), (1372965091,), (1372965092,), (1372965093,), (1372965095,), (1372965142,), (1372965147,), (1372965151,), (1372965153,), (1372965154,), (1372965155,), (1372965171,), (1372965173,), (1372965176,), (1372965179,), (1372965180,), (1372965181,), (1372965193,), (1372965195,), (1372965196,), (1372965197,), (1372965198,), (1372965199,), (1372965212,), (1372965213,), (1372965214,), (1372965219,), (1372965220,), (1372965221,), (1372965262,), (1372965264,), (1372965265,), (1372965266,), (1372965267,), (1372965269,), (1372965296,), (1372965297,), (1372965298,), (1372965299,), (1372965300,), (1372965301,), (1372965318,), (1372965322,), (1372965326,), (1372965327,), (1372965329,), (1372965331,), (1372965381,), (1372965402,), (1372965404,), (1372965405,), (1372965408,), (1372965410,), (1372965412,), (1372965425,), (1372965426,), (1372965428,), (1372965430,), (1372965431,), (1372965432,), (1372965444,), (1372965448,), (1372965452,), (1372965454,), (1372965455,), (1372965456,), (1372965469,), (1372965471,), (1372965472,), (1372965474,), (1372965475,), (1372965476,), (1372965484,), (1372965486,), (1372965489,), (1372965491,), (1372965493,), (1372965494,), (1372965509,), (1372965530,), (1372965536,), (1372965539,), (1372965540,), (1372965541,), (1372965542,), (1372965552,), (1372965554,), (1372965555,), (1372965556,), (1372965557,), (1372965558,), (1372965568,), (1372965577,), (1372965581,), (1372965582,), (1372965583,), (1372965584,), (1372965601,), (1372965602,), (1372965603,), (1372965604,), (1372965606,), (1372965607,), (1372965629,), (1372965645,), (1372965650,), (1372965652,), (1372965656,), (1372965658,), (1372965660,), (1372965672,), (1372965678,), (1372965679,), (1372965681,), (1372965682,), (1372965683,), (1372965693,), (1372965696,), (1372965697,), (1372965699,), (1372965700,), (1372965701,), (1372965706,), (1372965709,), (1372965711,), (1372965713,), (1372965715,), (1372965718,), (1372965732,), (1372965733,), (1372965734,), (1372965735,), (1372965736,), (1372965738,), (1372965752,), (1372965753,), (1372965754,), (1372965755,), (1372965756,), (1372965757,), (1372965772,), (1372965774,), (1372965776,), (1372965778,), (1372965779,), (1372965781,), (1372965805,), (1372965808,), (1372965810,), (1372965811,), (1372965812,), (1372965813,), (1372965839,), (1372965842,), (1372965845,), (1372965847,), (1372965849,), (1372965850,), (1372965861,), (1372965882,), (1372965884,), (1372965886,), (1372965887,), (1372965888,), (1372965889,), (1372965907,), (1372965909,), (1372965910,), (1372965913,), (1372965914,), (1372965916,), (1372965928,), (1372965931,), (1372965933,), (1372965935,), (1372965936,), (1372965937,), (1372965942,), (1372965944,), (1372965946,), (1372965948,), (1372965949,), (1372965950,), (1372965968,), (1372966179,), (1372966220,), (1372966267,), (1372966312,), (1372966357,), (1372966434,), (1372967508,), (1372967622,), (1372967625,), (1372967628,), (1372967630,), (1372967633,), (1372967641,), (1372967659,), (1372967686,), (1372967690,), (1372967693,), (1372967695,), (1372967696,), (1372967697,), (1372967710,), (1372967711,), (1372967713,), (1372967715,), (1372967716,), (1372967717,), (1372967722,), (1372967724,), (1372967726,), (1372967727,), (1372967728,), (1372967729,), (1372967740,), (1372967764,), (1372967766,), (1372967767,), (1372967768,), (1372967769,), (1372967770,), (1372967780,), (1372967784,), (1372967788,), (1372967791,), (1372967793,), (1372967794,), (1372967802,), (1372967803,), (1372967805,), (1372967808,), (1372967810,), (1372967812,), (1372967836,), (1372967838,), (1372967839,), (1372967841,), (1372967842,), (1372967843,), (1372967871,), (1372967886,), (1372967888,), (1372967890,), (1372967891,), (1372967892,), (1372967893,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'21072025': {'nb_upload': 57, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25119309]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] map_info['map_portfolio_photo'] : {25119309: [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886, 1372967871, 1372967843, 1372967842, 1372967841, 1372967839, 1372967838, 1372967836, 1372967812, 1372967810, 1372967808, 1372967805, 1372967803, 1372967802, 1372967794, 1372967793, 1372967791, 1372967788, 1372967784, 1372967780, 1372967770, 1372967769, 1372967768, 1372967767, 1372967766, 1372967764, 1372967740, 1372967729, 1372967728, 1372967727, 1372967726, 1372967724, 1372967722, 1372967717, 1372967716, 1372967715, 1372967713, 1372967711, 1372967710, 1372967697, 1372967696, 1372967695, 1372967693, 1372967690, 1372967686, 1372967659, 1372967641, 1372967633, 1372967630, 1372967628, 1372967625, 1372967622]} final : True mtd_id 4302 list_pids : [1372967893, 1372967892, 1372967891, 1372967890, 1372967888, 1372967886] Looping around the photos to save general results len do output : 1 /25119309Didn'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, '3312628') ('4302', '25119309', '1372967893', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967892', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967891', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967890', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967888', None, None, None, None, None, '3312628') ('4302', None, None, None, None, None, None, None, '3312628') ('4302', '25119309', '1372967886', None, None, None, None, None, '3312628') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25119309', 'None', None, None, None, None, '3312628'), ('4302', '25119309', '1372967893', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967892', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967891', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967890', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967888', None, None, None, None, None, '3312628'), ('4302', '25119309', '1372967886', None, None, None, None, None, '3312628')] time used for this insertion : 0.28426432609558105 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5266978740692139 time spend to save output : 0.2844812870025635 total time spend for step 5 : 0.8111791610717773 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 (3312628) 1.96user 2.47system 0:08.90elapsed 49%CPU (0avgtext+0avgdata 159256maxresident)k 224inputs+9200outputs (1major+63808minor)pagefaults 0swaps