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 : 1028449 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 (3982061) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3982061) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084189 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3982061'] with mtr_portfolio_ids : ['28084189'] and first list_photo_ids : [] new path : /proc/1028449/ Name: python3 Umask: 0002 State: R (running) Tgid: 1028449 Ngid: 0 Pid: 1028449 PPid: 1028448 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1028449 NSpid: 1028449 NSpgid: 1026808 NSsid: 1026808 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99816 kB VmRSS: 99816 kB RssAnon: 59908 kB RssFile: 39908 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 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: 51 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1028449', 'Ngid': '0', 'Pid': '1028449', 'PPid': '1028448', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1028449', 'NSpid': '1028449', 'NSpgid': '1026808', 'NSsid': '1026808', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99816 kB', 'VmRSS': '99816 kB', 'RssAnon': '59908 kB', 'RssFile': '39908 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 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': '51'} ('datou_batch_current', '1028449', '1106908', '0', '1106884', '865636', '99816', b'', 'marlene', '3982061') 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_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28084189) 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 (3982061 ) ) 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 (28084189) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1392001477, 'portfolio_id': 28084189}, {'photo_id': 1392001454, 'portfolio_id': 28084189}, {'photo_id': 1392001438, 'portfolio_id': 28084189}, {'photo_id': 1392001435, 'portfolio_id': 28084189}, {'photo_id': 1392001170, 'portfolio_id': 28084189}, {'photo_id': 1392001168, 'portfolio_id': 28084189}, {'photo_id': 1392001154, 'portfolio_id': 28084189}, {'photo_id': 1392001101, 'portfolio_id': 28084189}, {'photo_id': 1392000499, 'portfolio_id': 28084189}, {'photo_id': 1392000416, 'portfolio_id': 28084189}, {'photo_id': 1392000340, 'portfolio_id': 28084189}, {'photo_id': 1392000270, 'portfolio_id': 28084189}, {'photo_id': 1392000228, 'portfolio_id': 28084189}, {'photo_id': 1392000190, 'portfolio_id': 28084189}, {'photo_id': 1391999945, 'portfolio_id': 28084189}, {'photo_id': 1391999942, 'portfolio_id': 28084189}, {'photo_id': 1391999940, 'portfolio_id': 28084189}, {'photo_id': 1391999936, 'portfolio_id': 28084189}, {'photo_id': 1391999934, 'portfolio_id': 28084189}, {'photo_id': 1391999928, 'portfolio_id': 28084189}, {'photo_id': 1391999926, 'portfolio_id': 28084189}, {'photo_id': 1391999924, 'portfolio_id': 28084189}, {'photo_id': 1391999921, 'portfolio_id': 28084189}, {'photo_id': 1391999918, 'portfolio_id': 28084189}, {'photo_id': 1391999812, 'portfolio_id': 28084189}, {'photo_id': 1391999776, 'portfolio_id': 28084189}, {'photo_id': 1391999737, 'portfolio_id': 28084189}, {'photo_id': 1391999699, 'portfolio_id': 28084189}, {'photo_id': 1391999663, 'portfolio_id': 28084189}, {'photo_id': 1391999627, 'portfolio_id': 28084189}, {'photo_id': 1391999198, 'portfolio_id': 28084189}, {'photo_id': 1391999159, 'portfolio_id': 28084189}, {'photo_id': 1391999097, 'portfolio_id': 28084189}, {'photo_id': 1391999060, 'portfolio_id': 28084189}, {'photo_id': 1391999023, 'portfolio_id': 28084189}, {'photo_id': 1391998994, 'portfolio_id': 28084189}, {'photo_id': 1391998900, 'portfolio_id': 28084189}, {'photo_id': 1391998896, 'portfolio_id': 28084189}, {'photo_id': 1391998892, 'portfolio_id': 28084189}, {'photo_id': 1391998888, 'portfolio_id': 28084189}, {'photo_id': 1391998758, 'portfolio_id': 28084189}, {'photo_id': 1391998753, 'portfolio_id': 28084189}, {'photo_id': 1391998699, 'portfolio_id': 28084189}, {'photo_id': 1391998664, 'portfolio_id': 28084189}, {'photo_id': 1391998628, 'portfolio_id': 28084189}, {'photo_id': 1391998590, 'portfolio_id': 28084189}, {'photo_id': 1391998385, 'portfolio_id': 28084189}, {'photo_id': 1391998384, 'portfolio_id': 28084189}, {'photo_id': 1391998381, 'portfolio_id': 28084189}, {'photo_id': 1391998121, 'portfolio_id': 28084189}, {'photo_id': 1391998074, 'portfolio_id': 28084189}, {'photo_id': 1391998027, 'portfolio_id': 28084189}, {'photo_id': 1391997989, 'portfolio_id': 28084189}, {'photo_id': 1391997953, 'portfolio_id': 28084189}, {'photo_id': 1391997916, 'portfolio_id': 28084189}, {'photo_id': 1391997792, 'portfolio_id': 28084189}, {'photo_id': 1391997786, 'portfolio_id': 28084189}, {'photo_id': 1391997783, 'portfolio_id': 28084189}, {'photo_id': 1391997781, 'portfolio_id': 28084189}, {'photo_id': 1391997779, 'portfolio_id': 28084189}, {'photo_id': 1391997762, 'portfolio_id': 28084189}, {'photo_id': 1391997758, 'portfolio_id': 28084189}, {'photo_id': 1391997754, 'portfolio_id': 28084189}, {'photo_id': 1391997750, 'portfolio_id': 28084189}, {'photo_id': 1391997746, 'portfolio_id': 28084189}, {'photo_id': 1391997743, 'portfolio_id': 28084189}, {'photo_id': 1391997721, 'portfolio_id': 28084189}, {'photo_id': 1391997717, 'portfolio_id': 28084189}, {'photo_id': 1391997713, 'portfolio_id': 28084189}, {'photo_id': 1391997710, 'portfolio_id': 28084189}, {'photo_id': 1391997705, 'portfolio_id': 28084189}] map_portfolio_id_photo_id: {28084189: [1392001477, 1392001454, 1392001438, 1392001435, 1392001170, 1392001168, 1392001154, 1392001101, 1392000499, 1392000416, 1392000340, 1392000270, 1392000228, 1392000190, 1391999945, 1391999942, 1391999940, 1391999936, 1391999934, 1391999928, 1391999926, 1391999924, 1391999921, 1391999918, 1391999812, 1391999776, 1391999737, 1391999699, 1391999663, 1391999627, 1391999198, 1391999159, 1391999097, 1391999060, 1391999023, 1391998994, 1391998900, 1391998896, 1391998892, 1391998888, 1391998758, 1391998753, 1391998699, 1391998664, 1391998628, 1391998590, 1391998385, 1391998384, 1391998381, 1391998121, 1391998074, 1391998027, 1391997989, 1391997953, 1391997916, 1391997792, 1391997786, 1391997783, 1391997781, 1391997779, 1391997762, 1391997758, 1391997754, 1391997750, 1391997746, 1391997743, 1391997721, 1391997717, 1391997713, 1391997710, 1391997705]} ##### 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.017266273498535156 #### 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 Nov 3 08:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28084189) 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 : 28084189 get user id for portfolio 28084189 get sub ptf for main ptf 28084189, type 3726 and hashtags ['plastique', 'papier', 'Carton_gris', 'environnement', 'Teint_Dans_La_Masse', 'mal_croppe', 'metal', 'flou', 'autre_refus', 'Carton_brun', 'kraft', 'cartonnette'] 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`=28084189 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','papier','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','metal','flou','autre_refus','Carton_brun','kraft','cartonnette')) 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`=28084189 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','papier','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','metal','flou','autre_refus','Carton_brun','kraft','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 28084189, 'sub_port_id': 28084202, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981346, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'mal_croppe': {'main_port_id': 28084189, 'sub_port_id': 28084203, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981347, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 28084189, 'sub_port_id': 28084204, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981348, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'cartonnette': {'main_port_id': 28084189, 'sub_port_id': 28084205, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981349, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'autre_refus': {'main_port_id': 28084189, 'sub_port_id': 28084206, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981350, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'Carton_gris': {'main_port_id': 28084189, 'sub_port_id': 28084207, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981351, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'plastique': {'main_port_id': 28084189, 'sub_port_id': 28084208, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981352, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'Carton_brun': {'main_port_id': 28084189, 'sub_port_id': 28084209, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981353, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'kraft': {'main_port_id': 28084189, 'sub_port_id': 28084210, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981354, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'papier': {'main_port_id': 28084189, 'sub_port_id': 28084211, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981355, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'metal': {'main_port_id': 28084189, 'sub_port_id': 28084212, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981356, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}, 'flou': {'main_port_id': 28084189, 'sub_port_id': 28084213, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981357, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084202 , 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=28084189 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 (28084202) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084203 , 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=28084189 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 (28084203) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084204 , 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=28084189 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 (28084204) result : ((1392000520,), (1392001571,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084205 , 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=28084189 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 (28084205) result : ((1392001575,), (1392001576,), (1392001577,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084206 , 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=28084189 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 (28084206) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084207 , 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=28084189 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 (28084207) result : ((1392001572,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084208 , 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=28084189 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 (28084208) result : ((1392001579,), (1392001580,), (1392001581,), (1392001582,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084209 , 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=28084189 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 (28084209) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084210 , 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=28084189 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 (28084210) result : ((1392001583,), (1392001584,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084211 , 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=28084189 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 (28084211) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084212 , 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=28084189 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 (28084212) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28084213 , 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=28084189 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 (28084213) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28084189) result : ((1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) 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 (1391998900) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28084189 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','papier','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','metal','flou','autre_refus','Carton_brun','kraft','cartonnette')) 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`=28084189 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('plastique','papier','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','metal','flou','autre_refus','Carton_brun','kraft','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 28084189, 'sub_port_id': 28084216, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981358, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'mal_croppe': {'main_port_id': 28084189, 'sub_port_id': 28084217, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981359, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'Teint_Dans_La_Masse': {'main_port_id': 28084189, 'sub_port_id': 28084218, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981360, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'cartonnette': {'main_port_id': 28084189, 'sub_port_id': 28084219, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981361, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'autre_refus': {'main_port_id': 28084189, 'sub_port_id': 28084220, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981362, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'Carton_gris': {'main_port_id': 28084189, 'sub_port_id': 28084221, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981363, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'plastique': {'main_port_id': 28084189, 'sub_port_id': 28084222, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981364, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'Carton_brun': {'main_port_id': 28084189, 'sub_port_id': 28084223, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981365, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'kraft': {'main_port_id': 28084189, 'sub_port_id': 28084224, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981366, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'papier': {'main_port_id': 28084189, 'sub_port_id': 28084225, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981367, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'metal': {'main_port_id': 28084189, 'sub_port_id': 28084226, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981368, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 3, 30), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}, 'flou': {'main_port_id': 28084189, 'sub_port_id': 28084227, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18981369, 'last_updated_at': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_desc': datetime.datetime(2025, 11, 3, 8, 12, 57), 'last_updated_at_asc': datetime.datetime(2025, 11, 3, 8, 3, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084216,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084202 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084217,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084203 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084218,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084204 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084219,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084205 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084220,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084206 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084221,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084207 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084222,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084208 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084223,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084209 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084224,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084210 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084225,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084211 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084226,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084212 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28084227,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28084213 lien utilise dans velours : https://marlene.fotonower.com/velours/28084216,28084217,28084218,28084219,28084220,28084221,28084222,28084223,28084224,28084225,28084226,28084227?tags=environnement,mal_croppe,Teint_Dans_La_Masse,cartonnette,autre_refus,Carton_gris,plastique,Carton_brun,kraft,papier,metal,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28084189]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1392001477, 1392001454, 1392001438, 1392001435] map_info['map_portfolio_photo'] : {28084189: [1392001477, 1392001454, 1392001438, 1392001435, 1392001170, 1392001168, 1392001154, 1392001101, 1392000499, 1392000416, 1392000340, 1392000270, 1392000228, 1392000190, 1391999945, 1391999942, 1391999940, 1391999936, 1391999934, 1391999928, 1391999926, 1391999924, 1391999921, 1391999918, 1391999812, 1391999776, 1391999737, 1391999699, 1391999663, 1391999627, 1391999198, 1391999159, 1391999097, 1391999060, 1391999023, 1391998994, 1391998900, 1391998896, 1391998892, 1391998888, 1391998758, 1391998753, 1391998699, 1391998664, 1391998628, 1391998590, 1391998385, 1391998384, 1391998381, 1391998121, 1391998074, 1391998027, 1391997989, 1391997953, 1391997916, 1391997792, 1391997786, 1391997783, 1391997781, 1391997779, 1391997762, 1391997758, 1391997754, 1391997750, 1391997746, 1391997743, 1391997721, 1391997717, 1391997713, 1391997710, 1391997705]} final : False mtd_id 4302 list_pids : [1392001477, 1392001454, 1392001438, 1392001435] Looping around the photos to save general results len do output : 1 /28084189. 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, '3982061') ('4302', '28084189', '1392001477', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001454', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001438', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001435', None, None, None, None, None, '3982061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '28084189', "{'environnement': 28084202, 'mal_croppe': 28084203, 'Teint_Dans_La_Masse': 28084204, 'cartonnette': 28084205, 'autre_refus': 28084206, 'Carton_gris': 28084207, 'plastique': 28084208, 'Carton_brun': 28084209, 'kraft': 28084210, 'papier': 28084211, 'metal': 28084212, 'flou': 28084213}", None, None, None, None, '3982061'), ('4302', '28084189', '1392001477', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001454', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001438', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001435', None, None, None, None, None, '3982061')] time used for this insertion : 0.011792421340942383 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.44219112396240234 time spend to save output : 0.01208353042602539 total time spend for step 1 : 0.45427465438842773 step2:final Mon Nov 3 08:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (28084189) 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 28084189 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1391997721,1391997717,1391997713,1391997710,1391997705,1391997762,1391997758,1391997754,1391997750,1391997746,1391997743,1391997792,1391997786,1391997783,1391997781,1391997779,1391998121,1391998074,1391998027,1391997989,1391997953,1391997916,1391998385,1391998384,1391998381,1391998758,1391998753,1391998699,1391998664,1391998628,1391998590,1391998900,1391998896,1391998892,1391998888,1391999198,1391999928,1391999159,1391999926,1391999097,1391999924,1391999060,1391999921,1391999023,1391999918,1391998994,1391999812,1391999776,1391999737,1391999699,1391999663,1391999627,1391999945,1391999942,1391999940,1391999936,1391999934,1392000499,1392000416,1392000340,1392000270,1392000228,1392000190,1392001170,1392001168,1392001154,1392001101,1392001477,1392001454,1392001438,1392001435); 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([28084189]) Inside saveOutput : final : False verbose : True original output for save of step final : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',)} new output for save of step final : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',)} [1392001477, 1392001454, 1392001438, 1392001435] map_info['map_portfolio_photo'] : {28084189: [1392001477, 1392001454, 1392001438, 1392001435, 1392001170, 1392001168, 1392001154, 1392001101, 1392000499, 1392000416, 1392000340, 1392000270, 1392000228, 1392000190, 1391999945, 1391999942, 1391999940, 1391999936, 1391999934, 1391999928, 1391999926, 1391999924, 1391999921, 1391999918, 1391999812, 1391999776, 1391999737, 1391999699, 1391999663, 1391999627, 1391999198, 1391999159, 1391999097, 1391999060, 1391999023, 1391998994, 1391998900, 1391998896, 1391998892, 1391998888, 1391998758, 1391998753, 1391998699, 1391998664, 1391998628, 1391998590, 1391998385, 1391998384, 1391998381, 1391998121, 1391998074, 1391998027, 1391997989, 1391997953, 1391997916, 1391997792, 1391997786, 1391997783, 1391997781, 1391997779, 1391997762, 1391997758, 1391997754, 1391997750, 1391997746, 1391997743, 1391997721, 1391997717, 1391997713, 1391997710, 1391997705]} final : False mtd_id 4302 list_pids : [1392001477, 1392001454, 1392001438, 1392001435] Looping around the photos to save general results len do output : 4 /1392001477.Didn't retrieve data . /1392001454.Didn't retrieve data . /1392001438.Didn't retrieve data . /1392001435.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, '3982061') ('4302', '28084189', '1392001477', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001454', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001438', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001435', None, None, None, None, None, '3982061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '28084189', '1392001477', '0.05320417742214173', None, None, None, None, '3982061'), ('4302', '28084189', '1392001454', '0.05320417742214173', None, None, None, None, '3982061'), ('4302', '28084189', '1392001438', '0.05320417742214173', None, None, None, None, '3982061'), ('4302', '28084189', '1392001435', '0.05320417742214173', None, None, None, None, '3982061')] time used for this insertion : 0.013452768325805664 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.08034825325012207 time spend to save output : 0.01382136344909668 total time spend for step 2 : 0.09416961669921875 step3:velours_tree Mon Nov 3 08:14:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {28084189: [{'environnement': 28084202, 'mal_croppe': 28084203, 'Teint_Dans_La_Masse': 28084204, 'cartonnette': 28084205, 'autre_refus': 28084206, 'Carton_gris': 28084207, 'plastique': 28084208, 'Carton_brun': 28084209, 'kraft': 28084210, 'papier': 28084211, 'metal': 28084212, 'flou': 28084213}]} input_args_next_step : {28084189: ()} output_args : {28084189: [{'environnement': 28084202, 'mal_croppe': 28084203, 'Teint_Dans_La_Masse': 28084204, 'cartonnette': 28084205, 'autre_refus': 28084206, 'Carton_gris': 28084207, 'plastique': 28084208, 'Carton_brun': 28084209, 'kraft': 28084210, 'papier': 28084211, 'metal': 28084212, 'flou': 28084213}]} args : 28084189 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 : ({'environnement': 28084202, 'mal_croppe': 28084203, 'Teint_Dans_La_Masse': 28084204, 'cartonnette': 28084205, 'autre_refus': 28084206, 'Carton_gris': 28084207, 'plastique': 28084208, 'Carton_brun': 28084209, 'kraft': 28084210, 'papier': 28084211, 'metal': 28084212, 'flou': 28084213},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28084189) 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([28084189]) 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.3178853988647461 time spend to save output : 5.936622619628906e-05 total time spend for step 3 : 0.3179447650909424 step4:send_mail_cod Mon Nov 3 08: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 : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',)} input_args_next_step : {1392001477: ()} output_args : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',)} args : 1392001477 depend.output_id : 0 input_args_next_step : {1392001477: ('0.05320417742214173',), 1392001454: ()} output_args : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',)} args : 1392001454 depend.output_id : 0 input_args_next_step : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ()} output_args : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',)} args : 1392001438 depend.output_id : 0 input_args_next_step : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ()} output_args : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',)} args : 1392001435 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 : {28084189: [{'environnement': 28084202, 'mal_croppe': 28084203, 'Teint_Dans_La_Masse': 28084204, 'cartonnette': 28084205, 'autre_refus': 28084206, 'Carton_gris': 28084207, 'plastique': 28084208, 'Carton_brun': 28084209, 'kraft': 28084210, 'papier': 28084211, 'metal': 28084212, 'flou': 28084213}]} input_args_next_step : {1392001477: ('0.05320417742214173',), 1392001454: ('0.05320417742214173',), 1392001438: ('0.05320417742214173',), 1392001435: ('0.05320417742214173',), 28084189: ()} output_args : {28084189: [{'environnement': 28084202, 'mal_croppe': 28084203, 'Teint_Dans_La_Masse': 28084204, 'cartonnette': 28084205, 'autre_refus': 28084206, 'Carton_gris': 28084207, 'plastique': 28084208, 'Carton_brun': 28084209, 'kraft': 28084210, 'papier': 28084211, 'metal': 28084212, 'flou': 28084213}]} args : 28084189 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :5, first value : ('0.05320417742214173',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28084189) 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_view ph WHERE photo_id IN (1392001477,1392001454,1392001438,1392001435) Found this number of photos: 4 ##### Call download_photos : nb_thread : 5 begin to download photo : 1392001435 begin to download photo : 1392001438 begin to download photo : 1392001454 begin to download photo : 1392001477 download finish for photo 1392001438 download finish for photo 1392001435 download finish for photo 1392001454 download finish for photo 1392001477 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette280842031762154099/ length of list_filenames : 4 ; length of list_pids : 4 ; length of list_args : 4 results_Auto_P28084189_03-11-2025_08_14_59.pdf 28084203 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084203 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette280842031762154099 28084205 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084205 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392001575: '1762153987_1455536_1391998664_713667b1fa9c5b33e03bc21cd4f25f9e_rle_crop_4016212512_0.png', 1392001576: '1762153987_1455536_1391998590_d87a9d7f6e3b5d0f24dc0473d301afaf_rle_crop_4016212556_0.png', 1392001577: '1762153987_1455536_1391998590_d87a9d7f6e3b5d0f24dc0473d301afaf_rle_crop_4016212551_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/4acf8bad456cdfa355d95f3280306e64_54748276.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/46ff4be81e1e553fd1488633b525ed1f_52499587.png change filename to text .imagette280842051762154099/ imagette280842051762154099/1762153987_1455536_1391998664_713667b1fa9c5b33e03bc21cd4f25f9e_rle_crop_4016212512_0.png.png imagette280842051762154099/1762153987_1455536_1391998590_d87a9d7f6e3b5d0f24dc0473d301afaf_rle_crop_4016212551_0.png.png imagette280842051762154099/1762153987_1455536_1391998590_d87a9d7f6e3b5d0f24dc0473d301afaf_rle_crop_4016212556_0.png.png imagette280842061762154099/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/ec15b10a933da605655d2482cc9cdc02_84017590.png imagette280842051762154099 28084206 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084206 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette280842061762154099 28084208 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084208 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392001579: '1762153987_1455536_1391998753_2757d43b620f3a2fea82bfc0050ed363_rle_crop_4016212479_0.png', 1392001580: '1762153987_1455536_1391998699_949eac3ad573fb23a120510d4188cf5e_rle_crop_4016212502_0.png', 1392001581: '1762153987_1455536_1391998664_713667b1fa9c5b33e03bc21cd4f25f9e_rle_crop_4016212523_0.png', 1392001582: '1762153987_1455536_1391998628_2bf5fc0967fd37bcb869ed7ff670cd46_rle_crop_4016212540_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/1cad7c816d34eeb273ed568e39bca0ad_52785102.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/5d1fe609cd61f9c477c9e8ab9ffb89f3_30106408.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/f77d91fe53d73731a89300df9cac6f16_71993777.png change filename to text .imagette280842081762154099/ imagette280842081762154099/1762153987_1455536_1391998628_2bf5fc0967fd37bcb869ed7ff670cd46_rle_crop_4016212540_0.png.png imagette280842081762154099/1762153987_1455536_1391998753_2757d43b620f3a2fea82bfc0050ed363_rle_crop_4016212479_0.png.png imagette280842081762154099/1762153987_1455536_1391998664_713667b1fa9c5b33e03bc21cd4f25f9e_rle_crop_4016212523_0.png.png imagette280842081762154099/1762153987_1455536_1391998699_949eac3ad573fb23a120510d4188cf5e_rle_crop_4016212502_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/ab4c3e50aca4d373b6f5ade938188ae8_23190704.png imagette280842081762154099 28084210 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084210 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392001583: '1762153987_1455536_1391998753_2757d43b620f3a2fea82bfc0050ed363_rle_crop_4016212486_0.png', 1392001584: '1762153987_1455536_1391998753_2757d43b620f3a2fea82bfc0050ed363_rle_crop_4016212478_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/11fd89c0e500e6dabddc352e0f4c026e_39809659.png change filename to text .imagette280842101762154099/ imagette280842101762154099/1762153987_1455536_1391998753_2757d43b620f3a2fea82bfc0050ed363_rle_crop_4016212478_0.png.png imagette280842101762154099/1762153987_1455536_1391998753_2757d43b620f3a2fea82bfc0050ed363_rle_crop_4016212486_0.png.png imagette280842121762154099/ imagette280842131762154099/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/316b8262feaf8e6bccfaf7b8920c4413_67568188.png imagette280842101762154099 28084212 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084212 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette280842121762154099 28084213 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084213 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette280842131762154099 28084204 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084204 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392000520: '1762153866_1452256_1391998381_0188ba8e65cdeca8002c3b59d9f4a0e2_rle_crop_4016209795_0.png', 1392001571: '1762153987_1455536_1391998699_949eac3ad573fb23a120510d4188cf5e_rle_crop_4016212503_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/e66e5c6bcf05c2a0d150ea4ec7a55841_45711259.png change filename to text .imagette280842041762154099/ imagette280842041762154099/1762153866_1452256_1391998381_0188ba8e65cdeca8002c3b59d9f4a0e2_rle_crop_4016209795_0.png.png imagette280842041762154099/1762153987_1455536_1391998699_949eac3ad573fb23a120510d4188cf5e_rle_crop_4016212503_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/b0edc987ded2628bd7098b32227f2038_50937567.png imagette280842041762154099 28084207 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084207 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392001572: '1762153987_1455536_1391998900_c0b561bfc6d256ed27c8ce65da91c6a4_rle_crop_4016212460_0.png'} change filename to text .imagette280842071762154100/ imagette280842071762154100/1762153987_1455536_1391998900_c0b561bfc6d256ed27c8ce65da91c6a4_rle_crop_4016212460_0.png.png imagette280842091762154100/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/30938ab6b3ea9c998b0c6456a7bb887f_96553084.png imagette280842071762154100 28084209 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084209 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette280842091762154100 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28084189 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28084216,28084217,28084218,28084219,28084220,28084221,28084222,28084223,28084224,28084225,28084226,28084227?tags=environnement,mal_croppe,Teint_Dans_La_Masse,cartonnette,autre_refus,Carton_gris,plastique,Carton_brun,kraft,papier,metal,flou your option no_mail is active, we will not send the real mail to your client args[1392001477] : ('0.05320417742214173',) no score found for photo 1392001477 We are sending mail with results at report@fotonower.com args[1392001454] : ('0.05320417742214173',) no score found for photo 1392001454 We are sending mail with results at report@fotonower.com args[1392001438] : ('0.05320417742214173',) no score found for photo 1392001438 We are sending mail with results at report@fotonower.com args[1392001435] : ('0.05320417742214173',) no score found for photo 1392001435 We are sending mail with results at report@fotonower.com refus_total : 0.05320417742214173 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084189 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_P28084189_03-11-2025_08_14_59.pdf results_Auto_P28084189_03-11-2025_08_14_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28084189_03-11-2025_08_14_59.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','28084189','results_Auto_P28084189_03-11-2025_08_14_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28084189_03-11-2025_08_14_59.pdf','pdf','','0.1','0.05320417742214173') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28084189]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1392001477, 1392001454, 1392001438, 1392001435] map_info['map_portfolio_photo'] : {28084189: [1392001477, 1392001454, 1392001438, 1392001435, 1392001170, 1392001168, 1392001154, 1392001101, 1392000499, 1392000416, 1392000340, 1392000270, 1392000228, 1392000190, 1391999945, 1391999942, 1391999940, 1391999936, 1391999934, 1391999928, 1391999926, 1391999924, 1391999921, 1391999918, 1391999812, 1391999776, 1391999737, 1391999699, 1391999663, 1391999627, 1391999198, 1391999159, 1391999097, 1391999060, 1391999023, 1391998994, 1391998900, 1391998896, 1391998892, 1391998888, 1391998758, 1391998753, 1391998699, 1391998664, 1391998628, 1391998590, 1391998385, 1391998384, 1391998381, 1391998121, 1391998074, 1391998027, 1391997989, 1391997953, 1391997916, 1391997792, 1391997786, 1391997783, 1391997781, 1391997779, 1391997762, 1391997758, 1391997754, 1391997750, 1391997746, 1391997743, 1391997721, 1391997717, 1391997713, 1391997710, 1391997705]} final : False mtd_id 4302 list_pids : [1392001477, 1392001454, 1392001438, 1392001435] 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, '3982061') ('4302', '28084189', '1392001477', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001454', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001438', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001435', None, None, None, None, None, '3982061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '28084189', '1392001477', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001454', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001438', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001435', None, None, None, None, None, '3982061')] time used for this insertion : 0.009591102600097656 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9306623935699463 time spend to save output : 0.009825944900512695 total time spend for step 4 : 1.940488338470459 step5:split_time_score Mon Nov 3 08:15:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['28084189'] 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 : [('28084189',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28084189) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1392001438: {'path': 'temp/1762154099_1028449_1392001438_8d95ba0ebcc302775e75cfab3bf0deac.jpg', 'extension': 'jpg'}, 1392001435: {'path': 'temp/1762154099_1028449_1392001435_ca573dce4170950ce6d906b4573dd221.jpg', 'extension': 'jpg'}, 1392001454: {'path': 'temp/1762154099_1028449_1392001454_9ebcaafed587fea4c3e618457f23c14d.jpg', 'extension': 'jpg'}, 1392001477: {'path': 'temp/1762154099_1028449_1392001477_5f6285984093f7db764eb1da4839598b.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 = 28084189; (('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_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28084189 group by h (('08', 71),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28084189 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 (28084189) 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 (28084189) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 03112025 28084189 Nombre de photos uploadées : 71 / 23040 (0%) 03112025 28084189 Nombre de photos taguées (types de déchets): 0 / 71 (0%) 03112025 28084189 Nombre de photos taguées (volume) : 0 / 71 (0%) [{'photo_id': 1391997721, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/3589cdc7fd03d45515a697d0fdbabde2.jpg', 'username': None, 'uploaded_at': 1762153282, 'text': 'image_03112025_08_00_04_10147.jpg'}, {'photo_id': 1391997717, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/50fd8377776a6d47c9aa1a6bf7e12ba3.jpg', 'username': None, 'uploaded_at': 1762153282, 'text': 'image_03112025_08_00_14_10133.jpg'}, {'photo_id': 1391997713, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/b3cd902726dc6748b54d5b6a048c94f6.jpg', 'username': None, 'uploaded_at': 1762153282, 'text': 'image_03112025_08_00_24_10135.jpg'}, {'photo_id': 1391997710, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/3/7edb179846adf8dbfe2692b1a3a799a1.jpg', 'username': None, 'uploaded_at': 1762153282, 'text': 'image_03112025_08_00_33_9127.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.384185791015625e-06 elapsed_time : order_list_meta_photo_and_scores 6.198883056640625e-06 ??????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0042514801025390625 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28084189, '2025-11-03' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-11-03' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2496756,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21072936058044434 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= 2496756 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28078721, 'dashboard_result_id': 16699132, '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_P28078721_03-11-2025_05_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28078722, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28078723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28078724, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28078725, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28078726, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28078727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28078728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28078729, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28078730, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28078731, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28078732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28078733, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28078945, 'dashboard_result_id': 16699133, '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_P28078945_03-11-2025_05_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28078950, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28078951, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28078952, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28078953, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28078954, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28078955, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28078956, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28078957, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28078958, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28078959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28078960, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28078961, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28079283, 'dashboard_result_id': 16699134, '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_P28079283_03-11-2025_06_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28079286, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28079287, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28079288, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28079289, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28079290, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28079291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28079292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28079293, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28079294, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28079295, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28079296, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28079297, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28079678, 'dashboard_result_id': 16699135, '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_P28079678_03-11-2025_06_19_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28079688, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28079689, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28079690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28079691, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28079692, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28079693, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28079694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28079695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28079696, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28079697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28079698, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28079699, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28080272, 'dashboard_result_id': 16699136, '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_P28080272_03-11-2025_06_32_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28080274, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28080275, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28080276, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28080277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28080278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28080279, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28080280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28080281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28080282, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28080283, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28080284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28080285, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28080736, 'dashboard_result_id': 16699137, '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_P28080736_03-11-2025_06_49_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28080748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28080749, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28080750, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28080751, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28080752, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28080753, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28080754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28080755, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28080756, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28080757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28080758, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28080759, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28081410, 'dashboard_result_id': 16699138, '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_P28081410_03-11-2025_07_03_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28081411, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28081412, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28081413, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28081414, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28081415, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28081416, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28081417, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28081418, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28081419, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28081420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28081421, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28081422, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28081721, 'dashboard_result_id': 16699139, '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_P28081721_03-11-2025_07_22_27.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28081722, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28081723, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28081724, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28081725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28081726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28081727, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28081728, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28081729, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28081730, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28081731, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28081732, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28081733, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28082511, 'dashboard_result_id': 16699140, '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_P28082511_03-11-2025_07_34_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28082530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28082531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28082532, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28082533, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28082534, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28082535, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28082536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28082537, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28082538, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28082539, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28082540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28082541, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28083055, 'dashboard_result_id': 16699141, '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_P28083055_03-11-2025_07_54_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28083070, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28083071, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28083072, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28083073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28083074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28083075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28083076, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28083077, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28083078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28083079, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28083080, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28083081, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28083660, 'dashboard_result_id': 16699142, '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_P28083660_03-11-2025_08_02_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28083696, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28083697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28083698, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28083699, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28083700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28083701, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28083702, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28083703, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28083704, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28083705, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28083706, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28083707, 'pht': 3726}}"}, {'dashboat_entry_day': 2496756, 'dashboard_run_id': 2504845, 'mtr_portfolio_id': 28084189, 'dashboard_result_id': 16699143, '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_P28084189_03-11-2025_08_12_58.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28084202, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28084203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28084204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28084205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28084206, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28084207, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28084208, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28084209, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28084210, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28084211, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28084212, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28084213, '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 = 28078721 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': 3980789, 'mtr_portfolio_id': 28078721, 'created_at': datetime.datetime(2025, 11, 3, 5, 32, 59), 'result': '0.06213698275240268', 'result_long': None, 'result_double': None}] Qualite : 0.06213698275240268 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28078721 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28078721_03-11-2025_05_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28078721 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_P28078721_03-11-2025_05_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28078722, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28078723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28078724, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28078725, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28078726, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28078727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28078728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28078729, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28078730, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28078731, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28078732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28078733, 'pht': 3726}}" where mtr_portfolio_id = 28078721 and dashboard_run_id = 2504845 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`=28078721 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699132, 0.06213698275240268, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28078721_03-11-2025_05_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28078722, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28078723, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28078724, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28078725, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28078726, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28078727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28078728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28078729, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28078730, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28078731, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28078732, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28078733, '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 = 28078945 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': 3980816, 'mtr_portfolio_id': 28078945, 'created_at': datetime.datetime(2025, 11, 3, 5, 47), 'result': '0.05357560531748889', 'result_long': None, 'result_double': None}] Qualite : 0.05357560531748889 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28078945 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28078945_03-11-2025_05_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28078945 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_P28078945_03-11-2025_05_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28078950, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28078951, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28078952, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28078953, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28078954, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28078955, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28078956, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28078957, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28078958, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28078959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28078960, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28078961, 'pht': 3726}}" where mtr_portfolio_id = 28078945 and dashboard_run_id = 2504845 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`=28078945 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699133, 0.05357560531748889, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28078945_03-11-2025_05_47_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28078950, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28078951, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28078952, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28078953, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28078954, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28078955, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28078956, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28078957, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28078958, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28078959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28078960, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28078961, '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 = 28079283 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': 3980856, 'mtr_portfolio_id': 28079283, 'created_at': datetime.datetime(2025, 11, 3, 6, 2, 58), 'result': '0.06118860467769547', 'result_long': None, 'result_double': None}] Qualite : 0.06118860467769547 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28079283 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28079283_03-11-2025_06_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28079283 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_P28079283_03-11-2025_06_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28079286, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28079287, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28079288, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28079289, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28079290, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28079291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28079292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28079293, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28079294, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28079295, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28079296, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28079297, 'pht': 3726}}" where mtr_portfolio_id = 28079283 and dashboard_run_id = 2504845 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`=28079283 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699134, 0.06118860467769547, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28079283_03-11-2025_06_02_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28079286, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28079287, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28079288, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28079289, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28079290, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28079291, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28079292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28079293, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28079294, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28079295, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28079296, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28079297, '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 = 28079678 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': 3980915, 'mtr_portfolio_id': 28079678, 'created_at': datetime.datetime(2025, 11, 3, 6, 19, 30), 'result': '0.054086436706921835', 'result_long': None, 'result_double': None}] Qualite : 0.054086436706921835 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28079678 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28079678_03-11-2025_06_19_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28079678 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_P28079678_03-11-2025_06_19_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28079688, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28079689, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28079690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28079691, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28079692, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28079693, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28079694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28079695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28079696, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28079697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28079698, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28079699, 'pht': 3726}}" where mtr_portfolio_id = 28079678 and dashboard_run_id = 2504845 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`=28079678 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699135, 0.054086436706921835, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28079678_03-11-2025_06_19_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28079688, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28079689, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28079690, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28079691, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28079692, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28079693, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28079694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28079695, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28079696, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28079697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28079698, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28079699, '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 = 28080272 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': 3981008, 'mtr_portfolio_id': 28080272, 'created_at': datetime.datetime(2025, 11, 3, 6, 32, 59), 'result': '0.05890342958004019', 'result_long': None, 'result_double': None}] Qualite : 0.05890342958004019 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28080272 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28080272_03-11-2025_06_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28080272 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_P28080272_03-11-2025_06_32_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28080274, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28080275, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28080276, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28080277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28080278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28080279, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28080280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28080281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28080282, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28080283, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28080284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28080285, 'pht': 3726}}" where mtr_portfolio_id = 28080272 and dashboard_run_id = 2504845 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`=28080272 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699136, 0.05890342958004019, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28080272_03-11-2025_06_32_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28080274, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28080275, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28080276, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28080277, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28080278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28080279, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28080280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28080281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28080282, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28080283, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28080284, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28080285, '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 = 28080736 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': 3981126, 'mtr_portfolio_id': 28080736, 'created_at': datetime.datetime(2025, 11, 3, 6, 48, 59), 'result': '0.04173890434520197', 'result_long': None, 'result_double': None}] Qualite : 0.04173890434520197 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28080736 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28080736_03-11-2025_06_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28080736 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_P28080736_03-11-2025_06_49_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28080748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28080749, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28080750, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28080751, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28080752, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28080753, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28080754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28080755, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28080756, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28080757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28080758, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28080759, 'pht': 3726}}" where mtr_portfolio_id = 28080736 and dashboard_run_id = 2504845 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`=28080736 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699137, 0.04173890434520197, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28080736_03-11-2025_06_49_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28080748, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28080749, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28080750, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28080751, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28080752, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28080753, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28080754, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28080755, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28080756, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28080757, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28080758, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28080759, '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 = 28081410 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': 3981352, 'mtr_portfolio_id': 28081410, 'created_at': datetime.datetime(2025, 11, 3, 7, 3, 28), 'result': '0.06989483009508517', 'result_long': None, 'result_double': None}] Qualite : 0.06989483009508517 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28081410 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28081410_03-11-2025_07_03_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28081410 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_P28081410_03-11-2025_07_03_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28081411, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28081412, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28081413, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28081414, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28081415, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28081416, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28081417, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28081418, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28081419, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28081420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28081421, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28081422, 'pht': 3726}}" where mtr_portfolio_id = 28081410 and dashboard_run_id = 2504845 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`=28081410 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699138, 0.06989483009508517, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28081410_03-11-2025_07_03_29.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28081411, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28081412, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28081413, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28081414, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28081415, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28081416, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28081417, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28081418, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28081419, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28081420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28081421, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28081422, '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 = 28081721 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': 3981436, 'mtr_portfolio_id': 28081721, 'created_at': datetime.datetime(2025, 11, 3, 7, 22, 27), 'result': '0.03132682695307808', 'result_long': None, 'result_double': None}] Qualite : 0.03132682695307808 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28081721 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28081721_03-11-2025_07_22_27.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28081721 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_P28081721_03-11-2025_07_22_27.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28081722, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28081723, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28081724, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28081725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28081726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28081727, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28081728, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28081729, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28081730, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28081731, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28081732, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28081733, 'pht': 3726}}" where mtr_portfolio_id = 28081721 and dashboard_run_id = 2504845 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`=28081721 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699139, 0.03132682695307808, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28081721_03-11-2025_07_22_27.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28081722, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28081723, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28081724, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28081725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28081726, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28081727, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28081728, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28081729, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28081730, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28081731, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28081732, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28081733, '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 = 28082511 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': 3981595, 'mtr_portfolio_id': 28082511, 'created_at': datetime.datetime(2025, 11, 3, 7, 34, 59), 'result': '0.0323361473894988', 'result_long': None, 'result_double': None}] Qualite : 0.0323361473894988 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28082511 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28082511_03-11-2025_07_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28082511 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_P28082511_03-11-2025_07_34_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28082530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28082531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28082532, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28082533, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28082534, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28082535, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28082536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28082537, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28082538, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28082539, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28082540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28082541, 'pht': 3726}}" where mtr_portfolio_id = 28082511 and dashboard_run_id = 2504847 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`=28082511 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699140, 0.0323361473894988, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28082511_03-11-2025_07_34_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28082530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28082531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28082532, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28082533, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28082534, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28082535, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28082536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28082537, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28082538, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28082539, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28082540, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28082541, '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 = 28083055 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': 3981727, 'mtr_portfolio_id': 28083055, 'created_at': datetime.datetime(2025, 11, 3, 7, 53, 59), 'result': '0.05406582288390696', 'result_long': None, 'result_double': None}] Qualite : 0.05406582288390696 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28083055 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28083055_03-11-2025_07_54_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28083055 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_P28083055_03-11-2025_07_54_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28083070, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28083071, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28083072, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28083073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28083074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28083075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28083076, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28083077, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28083078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28083079, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28083080, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28083081, 'pht': 3726}}" where mtr_portfolio_id = 28083055 and dashboard_run_id = 2504847 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`=28083055 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699141, 0.05406582288390696, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28083055_03-11-2025_07_54_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28083070, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28083071, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28083072, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28083073, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28083074, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28083075, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28083076, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28083077, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28083078, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28083079, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28083080, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28083081, '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 = 28083660 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28083660 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 28083660 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28083660 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28083660 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 3981888, 'mtr_portfolio_id': 28083660, 'created_at': datetime.datetime(2025, 11, 3, 8, 2, 58), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28083660 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28083660_03-11-2025_08_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28083660 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_P28083660_03-11-2025_08_02_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28083696, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28083697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28083698, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28083699, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28083700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28083701, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28083702, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28083703, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28083704, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28083705, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28083706, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28083707, 'pht': 3726}}" where mtr_portfolio_id = 28083660 and dashboard_run_id = 2504847 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`=28083660 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699142, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28083660_03-11-2025_08_02_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28083696, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28083697, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28083698, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28083699, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28083700, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28083701, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28083702, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28083703, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28083704, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28083705, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28083706, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28083707, '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 = 28084189 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': 3982061, 'mtr_portfolio_id': 28084189, 'created_at': datetime.datetime(2025, 11, 3, 8, 14, 58), 'result': '0.05320417742214173', 'result_long': None, 'result_double': None}] Qualite : 0.05320417742214173 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28084189 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28084189_03-11-2025_08_14_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28084189 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_P28084189_03-11-2025_08_14_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28084202, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28084203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28084204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28084205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28084206, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28084207, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28084208, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28084209, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28084210, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28084211, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28084212, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28084213, 'pht': 3726}}" where mtr_portfolio_id = 28084189 and dashboard_run_id = 2504847 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`=28084189 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16699143, 0.05320417742214173, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28084189_03-11-2025_08_14_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28084202, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28084203, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28084204, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28084205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28084206, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28084207, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28084208, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28084209, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28084210, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28084211, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28084212, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28084213, '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 (28078721,28078945,28079283,28079678,28080272,28080736,28081410,28081721,28082511,28083055,28083660,28084189) result : ((1391984846,), (1391984848,), (1391984849,), (1391984850,), (1391984881,), (1391984884,), (1391984887,), (1391984889,), (1391984937,), (1391984942,), (1391984944,), (1391984946,), (1391985006,), (1391985008,), (1391985010,), (1391985031,), (1391985035,), (1391985038,), (1391985041,), (1391985045,), (1391985070,), (1391985073,), (1391985075,), (1391985098,), (1391985099,), (1391985102,), (1391985105,), (1391985109,), (1391985115,), (1391985132,), (1391985135,), (1391985138,), (1391985141,), (1391985143,), (1391985178,), (1391985172,), (1391985174,), (1391985175,), (1391985177,), (1391985203,), (1391985204,), (1391985209,), (1391985210,), (1391985212,), (1391985261,), (1391985264,), (1391985267,), (1391985270,), (1391985302,), (1391985305,), (1391985310,), (1391985315,), (1391985317,), (1391985319,), (1391985336,), (1391985338,), (1391985340,), (1391985343,), (1391985346,), (1391985368,), (1391985371,), (1391985374,), (1391985377,), (1391985379,), (1391985381,), (1391985401,), (1391985405,), (1391985409,), (1391985413,), (1391985421,), (1391985422,), (1391985424,), (1391985427,), (1391985430,), (1391985442,), (1391985445,), (1391985447,), (1391985451,), (1391985475,), (1391985478,), (1391985481,), (1391985483,), (1391985487,), (1391985490,), (1391985503,), (1391985515,), (1391985518,), (1391985521,), (1391985529,), (1391985531,), (1391985540,), (1391985546,), (1391985563,), (1391985564,), (1391985566,), (1391985568,), (1391985571,), (1391985574,), (1391985602,), (1391985605,), (1391985608,), (1391985611,), (1391985637,), (1391985641,), (1391985642,), (1391985643,), (1391985645,), (1391985649,), (1391985681,), (1391985685,), (1391985689,), (1391985691,), (1391985693,), (1391985697,), (1391985703,), (1391985706,), (1391985709,), (1391985720,), (1391985723,), (1391985726,), (1391985734,), (1391985745,), (1391985747,), (1391985780,), (1391985770,), (1391985774,), (1391985777,), (1391985802,), (1391985803,), (1391985804,), (1391985806,), (1391985809,), (1391985812,), (1391985836,), (1391985840,), (1391985843,), (1391985847,), (1391985850,), (1391985853,), (1391985879,), (1391985881,), (1391985883,), (1391985885,), (1391985887,), (1391985888,), (1391985913,), (1391985915,), (1391985918,), (1391985921,), (1391985923,), (1391985926,), (1391985933,), (1391985934,), (1391985935,), (1391985936,), (1391985939,), (1391985942,), (1391985954,), (1391985957,), (1391985961,), (1391985971,), (1391985975,), (1391985988,), (1391985992,), (1391985995,), (1391985998,), (1391986001,), (1391986003,), (1391986005,), (1391986022,), (1391986024,), (1391986027,), (1391986033,), (1391986040,), (1391986042,), (1391986043,), (1391986045,), (1391986047,), (1391986071,), (1391986074,), (1391986077,), (1391986079,), (1391986084,), (1391986086,), (1391986108,), (1391986112,), (1391986115,), (1391986118,), (1391986147,), (1391986150,), (1391986151,), (1391986152,), (1391986153,), (1391986155,), (1391986172,), (1391986174,), (1391986176,), (1391986178,), (1391986181,), (1391986219,), (1391986221,), (1391986225,), (1391986226,), (1391986266,), (1391986277,), (1391986280,), (1391986283,), (1391986285,), (1391986289,), (1391986294,), (1391986295,), (1391986297,), (1391986300,), (1391986302,), (1391986304,), (1391986321,), (1391986309,), (1391986312,), (1391986314,), (1391986317,), (1391986320,), (1391986467,), (1391986512,), (1391986580,), (1391986641,), (1391987246,), (1391987286,), (1391987319,), (1391987354,), (1391987390,), (1391987424,), (1391987763,), (1391987792,), (1391987793,), (1391987794,), (1391987796,), (1391987816,), (1391987817,), (1391987818,), (1391987820,), (1391987823,), (1391987827,), (1391987981,), (1391988018,), (1391988051,), (1391988089,), (1391988126,), (1391988162,), (1391988299,), (1391988336,), (1391988369,), (1391988386,), (1391988442,), (1391988445,), (1391988481,), (1391988505,), (1391988517,), (1391988526,), (1391988558,), (1391988559,), (1391988560,), (1391988562,), (1391988564,), (1391988591,), (1391988593,), (1391988595,), (1391988598,), (1391988599,), (1391988601,), (1391988621,), (1391988625,), (1391988630,), (1391988635,), (1391988637,), (1391988641,), (1391988642,), (1391988644,), (1391988647,), (1391988665,), (1391988666,), (1391988667,), (1391988669,), (1391988672,), (1391988703,), (1391988708,), (1391988720,), (1391988726,), (1391988730,), (1391988747,), (1391988748,), (1391988749,), (1391988751,), (1391988753,), (1391988755,), (1391988767,), (1391988770,), (1391988774,), (1391988777,), (1391988786,), (1391988836,), (1391988839,), (1391988841,), (1391988842,), (1391988844,), (1391988846,), (1391988856,), (1391988859,), (1391988861,), (1391988869,), (1391988875,), (1391988878,), (1391988890,), (1391988892,), (1391988894,), (1391988916,), (1391988917,), (1391988898,), (1391988899,), (1391988904,), (1391988905,), (1391988909,), (1391988910,), (1391988931,), (1391988932,), (1391988934,), (1391988937,), (1391988966,), (1391988979,), (1391988989,), (1391988992,), (1391988996,), (1391989000,), (1391989025,), (1391989027,), (1391989029,), (1391989032,), (1391989035,), (1391989036,), (1391989053,), (1391989057,), (1391989060,), (1391989063,), (1391989066,), (1391989071,), (1391989075,), (1391989080,), (1391989083,), (1391989088,), (1391989093,), (1391989099,), (1391989101,), (1391989104,), (1391989137,), (1391989140,), (1391989153,), (1391989159,), (1391989182,), (1391989184,), (1391989186,), (1391989189,), (1391989193,), (1391989197,), (1391989220,), (1391989223,), (1391989227,), (1391989230,), (1391989257,), (1391989260,), (1391989261,), (1391989262,), (1391989264,), (1391989266,), (1391989282,), (1391989285,), (1391989290,), (1391989299,), (1391989306,), (1391989327,), (1391989330,), (1391989334,), (1391989339,), (1391989344,), (1391989347,), (1391989389,), (1391989392,), (1391989393,), (1391989394,), (1391989424,), (1391989429,), (1391989434,), (1391989439,), (1391989443,), (1391989446,), (1391989454,), (1391989457,), (1391989462,), (1391989464,), (1391989491,), (1391989497,), (1391989501,), (1391989503,), (1391989532,), (1391989520,), (1391989522,), (1391989523,), (1391989525,), (1391989529,), (1391989565,), (1391989568,), (1391989570,), (1391989573,), (1391989578,), (1391989598,), (1391989601,), (1391989604,), (1391989608,), (1391989611,), (1391989615,), (1391989632,), (1391989633,), (1391989634,), (1391989637,), (1391989641,), (1391989661,), (1391989664,), (1391989667,), (1391989670,), (1391989674,), (1391989678,), (1391989700,), (1391989702,), (1391989704,), (1391989707,), (1391989734,), (1391989738,), (1391989740,), (1391989743,), (1391989745,), (1391989748,), (1391989761,), (1391989763,), (1391989765,), (1391989771,), (1391989788,), (1391989792,), (1391989794,), (1391989802,), (1391989806,), (1391989810,), (1391989813,), (1391989819,), (1391989824,), (1391989852,), (1391989861,), (1391989865,), (1391989868,), (1391989894,), (1391989898,), (1391989902,), (1391989904,), (1391990164,), (1391990196,), (1391990199,), (1391990202,), (1391990205,), (1391990208,), (1391990226,), (1391990228,), (1391990229,), (1391990232,), (1391990260,), (1391990265,), (1391990268,), (1391990273,), (1391990279,), (1391990306,), (1391990309,), (1391990312,), (1391990317,), (1391990322,), (1391990326,), (1391990341,), (1391990344,), (1391990345,), (1391990346,), (1391990348,), (1391990350,), (1391990388,), (1391990397,), (1391990399,), (1391990402,), (1391990406,), (1391990427,), (1391990430,), (1391990434,), (1391990439,), (1391990444,), (1391990447,), (1391990470,), (1391990474,), (1391990476,), (1391990477,), (1391990479,), (1391990499,), (1391990501,), (1391990503,), (1391990506,), (1391990532,), (1391990534,), (1391990536,), (1391990539,), (1391990543,), (1391990547,), (1391990580,), (1391990586,), (1391990600,), (1391990637,), (1391990676,), (1391990715,), (1391990886,), (1391990921,), (1391990960,), (1391990992,), (1391991033,), (1391991067,), (1391991243,), (1391991245,), (1391991295,), (1391991338,), (1391991206,), (1391991237,), (1391991240,), (1391991242,), (1391991411,), (1391991425,), (1391991436,), (1391991438,), (1391991441,), (1391991443,), (1391991459,), (1391991462,), (1391991465,), (1391992101,), (1391992166,), (1391992231,), (1391992304,), (1391992371,), (1391992800,), (1391992944,), (1391993024,), (1391993087,), (1391993159,), (1391993235,), (1391993379,), (1391993382,), (1391993386,), (1391993389,), (1391993422,), (1391993426,), (1391993430,), (1391993447,), (1391993485,), (1391993520,), (1391993933,), (1391993966,), (1391994000,), (1391994011,), (1391994015,), (1391994039,), (1391994240,), (1391994244,), (1391994247,), (1391994250,), (1391994253,), (1391994258,), (1391994270,), (1391994273,), (1391994274,), (1391994275,), (1391994277,), (1391994280,), (1391994293,), (1391994298,), (1391994304,), (1391994311,), (1391994321,), (1391994324,), (1391994359,), (1391994386,), (1391994390,), (1391994393,), (1391994398,), (1391994418,), (1391994523,), (1391994572,), (1391994617,), (1391994628,), (1391994637,), (1391994639,), (1391994642,), (1391994673,), (1391994674,), (1391994675,), (1391994677,), (1391994680,), (1391994715,), (1391994740,), (1391994775,), (1391994815,), (1391994833,), (1391994839,), (1391994878,), (1391994882,), (1391994884,), (1391994940,), (1391994926,), (1391994930,), (1391994932,), (1391994934,), (1391994937,), (1391994971,), (1391994975,), (1391995013,), (1391995015,), (1391995018,), (1391995021,), (1391995024,), (1391995028,), (1391995051,), (1391995054,), (1391995056,), (1391995060,), (1391995064,), (1391995070,), (1391995081,), (1391995084,), (1391995087,), (1391995095,), (1391995098,), (1391995104,), (1391995110,), (1391995115,), (1391995118,), (1391995129,), (1391995135,), (1391995137,), (1391995172,), (1391995273,), (1391995276,), (1391995279,), (1391995281,), (1391995285,), (1391995314,), (1391995318,), (1391995320,), (1391995322,), (1391995327,), (1391995375,), (1391995380,), (1391995384,), (1391995389,), (1391995395,), (1391995420,), (1391995424,), (1391995426,), (1391995454,), (1391995456,), (1391995459,), (1391995463,), (1391995467,), (1391995502,), (1391995507,), (1391995513,), (1391995534,), (1391995546,), (1391995549,), (1391995636,), (1391995653,), (1391995667,), (1391995786,), (1391995790,), (1391995795,), (1391995803,), (1391995805,), (1391995814,), (1391995845,), (1391995855,), (1391995858,), (1391995888,), (1391995894,), (1391995898,), (1391995902,), (1391995953,), (1391995932,), (1391995933,), (1391995946,), (1391995949,), (1391996022,), (1391996036,), (1391996038,), (1391996043,), (1391996047,), (1391996050,), (1391996072,), (1391996075,), (1391996078,), (1391996139,), (1391996146,), (1391996149,), (1391996152,), (1391996158,), (1391996164,), (1391996185,), (1391996188,), (1391996191,), (1391996193,), (1391996198,), (1391996203,), (1391996223,), (1391996227,), (1391996231,), (1391996268,), (1391996270,), (1391996272,), (1391996276,), (1391996280,), (1391996284,), (1391996326,), (1391996336,), (1391996340,), (1391996343,), (1391996369,), (1391996371,), (1391996373,), (1391996376,), (1391996380,), (1391996384,), (1391996395,), (1391996398,), (1391996400,), (1391996410,), (1391996414,), (1391996420,), (1391996426,), (1391996433,), (1391996437,), (1391996460,), (1391996462,), (1391996464,), (1391996466,), (1391996504,), (1391996506,), (1391996508,), (1391996510,), (1391996513,), (1391996518,), (1391996554,), (1391996555,), (1391996556,), (1391996558,), (1391996563,), (1391996569,), (1391996591,), (1391996594,), (1391996597,), (1391996600,), (1391996633,), (1391996635,), (1391996638,), (1391996643,), (1391996648,), (1391996653,), (1391996667,), (1391996671,), (1391996673,), (1391996683,), (1391996717,), (1391996859,), (1391997062,), (1391996700,), (1391996707,), (1391996711,), (1391996714,), (1391996750,), (1391996752,), (1391996758,), (1391996769,), (1391996774,), (1391996780,), (1391996826,), (1391996841,), (1391996845,), (1391996919,), (1391996922,), (1391996924,), (1391996927,), (1391996931,), (1391996936,), (1391996956,), (1391996961,), (1391996963,), (1391996966,), (1391996968,), (1391996971,), (1391996990,), (1391996993,), (1391997033,), (1391997042,), (1391997045,), (1391997047,), (1391997071,), (1391997072,), (1391997085,), (1391997132,), (1391997136,), (1391997211,), (1391997212,), (1391997215,), (1391997235,), (1391997238,), (1391997244,), (1391997277,), (1391997280,), (1391997282,), (1391997322,), (1391997332,), (1391997348,), (1391997353,), (1391997356,), (1391997358,), (1391997382,), (1391997384,), (1391997385,), (1391997387,), (1391997419,), (1391997423,), (1391997431,), (1391997443,), (1391997451,), (1391997456,), (1391997482,), (1391997485,), (1391997488,), (1391997490,), (1391997554,), (1391997558,), (1391997561,), (1391997565,), (1391997643,), (1391997649,), (1391997654,), (1391997659,), (1391997664,), (1391997668,), (1391997681,), (1391997684,), (1391997687,), (1391997690,), (1391997693,), (1391997697,), (1391997723,), (1391997732,), (1391997734,), (1391997705,), (1391997710,), (1391997713,), (1391997717,), (1391997721,), (1391997743,), (1391997746,), (1391997750,), (1391997754,), (1391997758,), (1391997762,), (1391997779,), (1391997781,), (1391997783,), (1391997786,), (1391997792,), (1391997916,), (1391997953,), (1391997989,), (1391998027,), (1391998074,), (1391998121,), (1391998381,), (1391998384,), (1391998385,), (1391998590,), (1391998628,), (1391998664,), (1391998699,), (1391998753,), (1391998758,), (1391998888,), (1391998892,), (1391998896,), (1391998900,), (1391998994,), (1391999023,), (1391999060,), (1391999097,), (1391999159,), (1391999198,), (1391999627,), (1391999663,), (1391999699,), (1391999737,), (1391999776,), (1391999812,), (1391999918,), (1391999921,), (1391999924,), (1391999926,), (1391999928,), (1391999934,), (1391999936,), (1391999940,), (1391999942,), (1391999945,), (1392000190,), (1392000228,), (1392000270,), (1392000340,), (1392000416,), (1392000499,), (1392001101,), (1392001154,), (1392001168,), (1392001170,), (1392001435,), (1392001438,), (1392001454,), (1392001477,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03112025': {'nb_upload': 71, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28084189]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1392001477, 1392001454, 1392001438, 1392001435] map_info['map_portfolio_photo'] : {28084189: [1392001477, 1392001454, 1392001438, 1392001435, 1392001170, 1392001168, 1392001154, 1392001101, 1392000499, 1392000416, 1392000340, 1392000270, 1392000228, 1392000190, 1391999945, 1391999942, 1391999940, 1391999936, 1391999934, 1391999928, 1391999926, 1391999924, 1391999921, 1391999918, 1391999812, 1391999776, 1391999737, 1391999699, 1391999663, 1391999627, 1391999198, 1391999159, 1391999097, 1391999060, 1391999023, 1391998994, 1391998900, 1391998896, 1391998892, 1391998888, 1391998758, 1391998753, 1391998699, 1391998664, 1391998628, 1391998590, 1391998385, 1391998384, 1391998381, 1391998121, 1391998074, 1391998027, 1391997989, 1391997953, 1391997916, 1391997792, 1391997786, 1391997783, 1391997781, 1391997779, 1391997762, 1391997758, 1391997754, 1391997750, 1391997746, 1391997743, 1391997721, 1391997717, 1391997713, 1391997710, 1391997705]} final : True mtd_id 4302 list_pids : [1392001477, 1392001454, 1392001438, 1392001435] Looping around the photos to save general results len do output : 1 /28084189Didn'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, '3982061') ('4302', '28084189', '1392001477', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001454', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001438', None, None, None, None, None, '3982061') ('4302', None, None, None, None, None, None, None, '3982061') ('4302', '28084189', '1392001435', None, None, None, None, None, '3982061') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '28084189', 'None', None, None, None, None, '3982061'), ('4302', '28084189', '1392001477', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001454', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001438', None, None, None, None, None, '3982061'), ('4302', '28084189', '1392001435', None, None, None, None, None, '3982061')] time used for this insertion : 0.013018369674682617 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0515527725219727 time spend to save output : 0.013210535049438477 total time spend for step 5 : 1.0647633075714111 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 (3982061) 1.96user 2.54system 0:07.53elapsed 59%CPU (0avgtext+0avgdata 159236maxresident)k 696inputs+5208outputs (26major+63920minor)pagefaults 0swaps