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 : 757090 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 (4182805) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4182805) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167848 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4182805'] with mtr_portfolio_ids : ['29167848'] and first list_photo_ids : [] new path : /proc/757090/ Name: python3 Umask: 0002 State: R (running) Tgid: 757090 Ngid: 0 Pid: 757090 PPid: 757089 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 757090 NSpid: 757090 NSpgid: 756162 NSsid: 756162 VmPeak: 1113364 kB VmSize: 1113364 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 104524 kB VmRSS: 104524 kB RssAnon: 66304 kB RssFile: 38220 kB RssShmem: 0 kB VmData: 872092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 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: 44 nonvoluntary_ctxt_switches: 93 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '757090', 'Ngid': '0', 'Pid': '757090', 'PPid': '757089', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '757090', 'NSpid': '757090', 'NSpgid': '756162', 'NSsid': '756162', 'VmPeak': '1113364 kB', 'VmSize': '1113364 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '104524 kB', 'VmRSS': '104524 kB', 'RssAnon': '66304 kB', 'RssFile': '38220 kB', 'RssShmem': '0 kB', 'VmData': '872092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 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': '44', 'nonvoluntary_ctxt_switches': '93'} ('datou_batch_current', '757090', '1113364', '0', '1113364', '872092', '104524', b'', 'marlene', '4182805') 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 (29167848) 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 (4182805 ) ) 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 (29167848) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1397775633, 'portfolio_id': 29167848}, {'photo_id': 1397775631, 'portfolio_id': 29167848}, {'photo_id': 1397775629, 'portfolio_id': 29167848}, {'photo_id': 1397775627, 'portfolio_id': 29167848}, {'photo_id': 1397775625, 'portfolio_id': 29167848}, {'photo_id': 1397775622, 'portfolio_id': 29167848}, {'photo_id': 1397775621, 'portfolio_id': 29167848}, {'photo_id': 1397775619, 'portfolio_id': 29167848}, {'photo_id': 1397775617, 'portfolio_id': 29167848}, {'photo_id': 1397775614, 'portfolio_id': 29167848}, {'photo_id': 1397775609, 'portfolio_id': 29167848}, {'photo_id': 1397775600, 'portfolio_id': 29167848}, {'photo_id': 1397775598, 'portfolio_id': 29167848}, {'photo_id': 1397775596, 'portfolio_id': 29167848}, {'photo_id': 1397775594, 'portfolio_id': 29167848}, {'photo_id': 1397775593, 'portfolio_id': 29167848}, {'photo_id': 1397775588, 'portfolio_id': 29167848}, {'photo_id': 1397775553, 'portfolio_id': 29167848}, {'photo_id': 1397775551, 'portfolio_id': 29167848}, {'photo_id': 1397775549, 'portfolio_id': 29167848}, {'photo_id': 1397775547, 'portfolio_id': 29167848}, {'photo_id': 1397775546, 'portfolio_id': 29167848}, {'photo_id': 1397775544, 'portfolio_id': 29167848}, {'photo_id': 1397775488, 'portfolio_id': 29167848}, {'photo_id': 1397775486, 'portfolio_id': 29167848}, {'photo_id': 1397775484, 'portfolio_id': 29167848}, {'photo_id': 1397775483, 'portfolio_id': 29167848}, {'photo_id': 1397775479, 'portfolio_id': 29167848}, {'photo_id': 1397775478, 'portfolio_id': 29167848}, {'photo_id': 1397775464, 'portfolio_id': 29167848}, {'photo_id': 1397775463, 'portfolio_id': 29167848}, {'photo_id': 1397775452, 'portfolio_id': 29167848}, {'photo_id': 1397775450, 'portfolio_id': 29167848}, {'photo_id': 1397775449, 'portfolio_id': 29167848}, {'photo_id': 1397775448, 'portfolio_id': 29167848}, {'photo_id': 1397775447, 'portfolio_id': 29167848}, {'photo_id': 1397775441, 'portfolio_id': 29167848}, {'photo_id': 1397775439, 'portfolio_id': 29167848}, {'photo_id': 1397775438, 'portfolio_id': 29167848}, {'photo_id': 1397775437, 'portfolio_id': 29167848}, {'photo_id': 1397775436, 'portfolio_id': 29167848}, {'photo_id': 1397775424, 'portfolio_id': 29167848}, {'photo_id': 1397775423, 'portfolio_id': 29167848}, {'photo_id': 1397775422, 'portfolio_id': 29167848}, {'photo_id': 1397775415, 'portfolio_id': 29167848}, {'photo_id': 1397775362, 'portfolio_id': 29167848}, {'photo_id': 1397775357, 'portfolio_id': 29167848}, {'photo_id': 1397775355, 'portfolio_id': 29167848}, {'photo_id': 1397775353, 'portfolio_id': 29167848}, {'photo_id': 1397775339, 'portfolio_id': 29167848}, {'photo_id': 1397775337, 'portfolio_id': 29167848}, {'photo_id': 1397775335, 'portfolio_id': 29167848}, {'photo_id': 1397775333, 'portfolio_id': 29167848}, {'photo_id': 1397775332, 'portfolio_id': 29167848}, {'photo_id': 1397775331, 'portfolio_id': 29167848}, {'photo_id': 1397775330, 'portfolio_id': 29167848}, {'photo_id': 1397775329, 'portfolio_id': 29167848}, {'photo_id': 1397775328, 'portfolio_id': 29167848}, {'photo_id': 1397775325, 'portfolio_id': 29167848}, {'photo_id': 1397775323, 'portfolio_id': 29167848}, {'photo_id': 1397775316, 'portfolio_id': 29167848}, {'photo_id': 1397775314, 'portfolio_id': 29167848}, {'photo_id': 1397775312, 'portfolio_id': 29167848}, {'photo_id': 1397775311, 'portfolio_id': 29167848}, {'photo_id': 1397775307, 'portfolio_id': 29167848}, {'photo_id': 1397775305, 'portfolio_id': 29167848}, {'photo_id': 1397775303, 'portfolio_id': 29167848}, {'photo_id': 1397775301, 'portfolio_id': 29167848}, {'photo_id': 1397775300, 'portfolio_id': 29167848}, {'photo_id': 1397775299, 'portfolio_id': 29167848}, {'photo_id': 1397775246, 'portfolio_id': 29167848}, {'photo_id': 1397775211, 'portfolio_id': 29167848}, {'photo_id': 1397775209, 'portfolio_id': 29167848}, {'photo_id': 1397775207, 'portfolio_id': 29167848}, {'photo_id': 1397775020, 'portfolio_id': 29167848}, {'photo_id': 1397775019, 'portfolio_id': 29167848}, {'photo_id': 1397775018, 'portfolio_id': 29167848}] map_portfolio_id_photo_id: {29167848: [1397775633, 1397775631, 1397775629, 1397775627, 1397775625, 1397775622, 1397775621, 1397775619, 1397775617, 1397775614, 1397775609, 1397775600, 1397775598, 1397775596, 1397775594, 1397775593, 1397775588, 1397775553, 1397775551, 1397775549, 1397775547, 1397775546, 1397775544, 1397775488, 1397775486, 1397775484, 1397775483, 1397775479, 1397775478, 1397775464, 1397775463, 1397775452, 1397775450, 1397775449, 1397775448, 1397775447, 1397775441, 1397775439, 1397775438, 1397775437, 1397775436, 1397775424, 1397775423, 1397775422, 1397775415, 1397775362, 1397775357, 1397775355, 1397775353, 1397775339, 1397775337, 1397775335, 1397775333, 1397775332, 1397775331, 1397775330, 1397775329, 1397775328, 1397775325, 1397775323, 1397775316, 1397775314, 1397775312, 1397775311, 1397775307, 1397775305, 1397775303, 1397775301, 1397775300, 1397775299, 1397775246, 1397775211, 1397775209, 1397775207, 1397775020, 1397775019, 1397775018]} ##### 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.020365238189697266 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Thu Dec 4 02:32:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29167848) 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 : 29167848 get user id for portfolio 29167848 get sub ptf for main ptf 29167848, type 3726 and hashtags ['papier', 'mal_croppe', 'plastique', 'kraft', 'autre_refus', 'environnement', 'Carton_gris', 'Teint_Dans_La_Masse', 'cartonnette', 'flou', 'metal', 'Carton_brun'] 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`=29167848 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','plastique','kraft','autre_refus','environnement','Carton_gris','Teint_Dans_La_Masse','cartonnette','flou','metal','Carton_brun')) 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`=29167848 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','plastique','kraft','autre_refus','environnement','Carton_gris','Teint_Dans_La_Masse','cartonnette','flou','metal','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 29167848, 'sub_port_id': 29167849, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827081, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'papier': {'main_port_id': 29167848, 'sub_port_id': 29167850, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827082, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'Carton_gris': {'main_port_id': 29167848, 'sub_port_id': 29167851, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827083, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'flou': {'main_port_id': 29167848, 'sub_port_id': 29167852, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827084, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'Carton_brun': {'main_port_id': 29167848, 'sub_port_id': 29167853, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827085, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'plastique': {'main_port_id': 29167848, 'sub_port_id': 29167854, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827086, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'autre_refus': {'main_port_id': 29167848, 'sub_port_id': 29167855, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827087, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'mal_croppe': {'main_port_id': 29167848, 'sub_port_id': 29167856, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827088, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'kraft': {'main_port_id': 29167848, 'sub_port_id': 29167857, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827089, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'cartonnette': {'main_port_id': 29167848, 'sub_port_id': 29167858, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827090, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 29167848, 'sub_port_id': 29167859, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827091, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}, 'environnement': {'main_port_id': 29167848, 'sub_port_id': 29167860, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827092, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29167849 , 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=29167848 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 (29167849) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167850 , 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=29167848 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 (29167850) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167851 , 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=29167848 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 (29167851) result : ((1397775350,), (1397775560,), (1397775612,), (1397775613,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167852 , 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=29167848 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 (29167852) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167853 , 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=29167848 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 (29167853) result : ((1397775461,), (1397775462,), (1397775545,), (1397775575,), (1397775646,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167854 , 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=29167848 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 (29167854) result : ((1397775351,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167855 , 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=29167848 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 (29167855) result : ((1397775346,), (1397775347,), (1397775348,), (1397775349,), (1397775456,), (1397775541,), (1397775542,), (1397775543,), (1397775610,), (1397775643,), (1397775644,), (1397775645,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167856 , 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=29167848 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 (29167856) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167857 , 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=29167848 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 (29167857) result : ((1397775352,), (1397775372,), (1397775373,), (1397775527,), (1397775528,), (1397775529,), (1397775530,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167858 , 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=29167848 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 (29167858) result : ((1397775524,), (1397775525,), (1397775567,), (1397775603,), (1397775615,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167859 , 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=29167848 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 (29167859) result : ((1397775343,), (1397775344,), (1397775345,), (1397775370,), (1397775371,), (1397775455,), (1397775460,), (1397775501,), (1397775505,), (1397775537,), (1397775538,), (1397775539,), (1397775540,), (1397775556,), (1397775557,), (1397775558,), (1397775559,), (1397775601,), (1397775602,), (1397775639,), (1397775640,), (1397775641,), (1397775642,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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 29167860 , 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=29167848 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 (29167860) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29167848) result : ((1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) 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 (1397775600,1397775300) 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`=29167848 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','plastique','kraft','autre_refus','environnement','Carton_gris','Teint_Dans_La_Masse','cartonnette','flou','metal','Carton_brun')) 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`=29167848 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','plastique','kraft','autre_refus','environnement','Carton_gris','Teint_Dans_La_Masse','cartonnette','flou','metal','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 29167848, 'sub_port_id': 29167861, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827093, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'papier': {'main_port_id': 29167848, 'sub_port_id': 29167862, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827094, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'Carton_gris': {'main_port_id': 29167848, 'sub_port_id': 29167863, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827095, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'flou': {'main_port_id': 29167848, 'sub_port_id': 29167864, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827096, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'Carton_brun': {'main_port_id': 29167848, 'sub_port_id': 29167865, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827097, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'plastique': {'main_port_id': 29167848, 'sub_port_id': 29167866, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827098, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'autre_refus': {'main_port_id': 29167848, 'sub_port_id': 29167867, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827099, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'mal_croppe': {'main_port_id': 29167848, 'sub_port_id': 29167868, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827100, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'kraft': {'main_port_id': 29167848, 'sub_port_id': 29167869, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827101, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'cartonnette': {'main_port_id': 29167848, 'sub_port_id': 29167870, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827102, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'Teint_Dans_La_Masse': {'main_port_id': 29167848, 'sub_port_id': 29167871, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827103, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 17, 34), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}, 'environnement': {'main_port_id': 29167848, 'sub_port_id': 29167872, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19827104, 'last_updated_at': datetime.datetime(2025, 12, 4, 2, 30, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 4, 2, 30, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 4, 2, 17, 34)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167861,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167849 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167862,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167850 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167863,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167851 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167864,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167852 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167865,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167853 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167866,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167854 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167867,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167855 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167868,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167856 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167869,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167857 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167870,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167858 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167871,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167859 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29167872,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29167860 lien utilise dans velours : https://marlene.fotonower.com/velours/29167861,29167862,29167863,29167864,29167865,29167866,29167867,29167868,29167869,29167870,29167871,29167872?tags=metal,papier,Carton_gris,flou,Carton_brun,plastique,autre_refus,mal_croppe,kraft,cartonnette,Teint_Dans_La_Masse,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29167848]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] map_info['map_portfolio_photo'] : {29167848: [1397775633, 1397775631, 1397775629, 1397775627, 1397775625, 1397775622, 1397775621, 1397775619, 1397775617, 1397775614, 1397775609, 1397775600, 1397775598, 1397775596, 1397775594, 1397775593, 1397775588, 1397775553, 1397775551, 1397775549, 1397775547, 1397775546, 1397775544, 1397775488, 1397775486, 1397775484, 1397775483, 1397775479, 1397775478, 1397775464, 1397775463, 1397775452, 1397775450, 1397775449, 1397775448, 1397775447, 1397775441, 1397775439, 1397775438, 1397775437, 1397775436, 1397775424, 1397775423, 1397775422, 1397775415, 1397775362, 1397775357, 1397775355, 1397775353, 1397775339, 1397775337, 1397775335, 1397775333, 1397775332, 1397775331, 1397775330, 1397775329, 1397775328, 1397775325, 1397775323, 1397775316, 1397775314, 1397775312, 1397775311, 1397775307, 1397775305, 1397775303, 1397775301, 1397775300, 1397775299, 1397775246, 1397775211, 1397775209, 1397775207, 1397775020, 1397775019, 1397775018]} final : False mtd_id 4302 list_pids : [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] Looping around the photos to save general results len do output : 1 /29167848. 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, '4182805') ('4302', '29167848', '1397775633', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775631', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775629', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775627', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775625', None, None, None, None, None, '4182805') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29167848', "{'metal': 29167849, 'papier': 29167850, 'Carton_gris': 29167851, 'flou': 29167852, 'Carton_brun': 29167853, 'plastique': 29167854, 'autre_refus': 29167855, 'mal_croppe': 29167856, 'kraft': 29167857, 'cartonnette': 29167858, 'Teint_Dans_La_Masse': 29167859, 'environnement': 29167860}", None, None, None, None, '4182805'), ('4302', '29167848', '1397775633', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775631', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775629', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775627', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775625', None, None, None, None, None, '4182805')] time used for this insertion : 0.016794919967651367 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.554093599319458 time spend to save output : 0.017045259475708008 total time spend for step 1 : 0.571138858795166 step2:final Thu Dec 4 02:32: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 (29167848) 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 29167848 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1397775020,1397775019,1397775018,1397775246,1397775339,1397775211,1397775333,1397775209,1397775332,1397775331,1397775207,1397775330,1397775307,1397775329,1397775305,1397775328,1397775303,1397775325,1397775301,1397775323,1397775300,1397775316,1397775299,1397775314,1397775312,1397775311,1397775337,1397775335,1397775362,1397775357,1397775355,1397775353,1397775415,1397775424,1397775423,1397775422,1397775441,1397775439,1397775438,1397775437,1397775436,1397775452,1397775450,1397775449,1397775448,1397775447,1397775464,1397775463,1397775631,1397775488,1397775629,1397775486,1397775484,1397775622,1397775483,1397775553,1397775621,1397775619,1397775551,1397775479,1397775549,1397775617,1397775478,1397775614,1397775547,1397775609,1397775546,1397775600,1397775544,1397775598,1397775596,1397775594,1397775593,1397775588,1397775627,1397775625,1397775633); 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([29167848]) Inside saveOutput : final : False verbose : True original output for save of step final : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} new output for save of step final : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] map_info['map_portfolio_photo'] : {29167848: [1397775633, 1397775631, 1397775629, 1397775627, 1397775625, 1397775622, 1397775621, 1397775619, 1397775617, 1397775614, 1397775609, 1397775600, 1397775598, 1397775596, 1397775594, 1397775593, 1397775588, 1397775553, 1397775551, 1397775549, 1397775547, 1397775546, 1397775544, 1397775488, 1397775486, 1397775484, 1397775483, 1397775479, 1397775478, 1397775464, 1397775463, 1397775452, 1397775450, 1397775449, 1397775448, 1397775447, 1397775441, 1397775439, 1397775438, 1397775437, 1397775436, 1397775424, 1397775423, 1397775422, 1397775415, 1397775362, 1397775357, 1397775355, 1397775353, 1397775339, 1397775337, 1397775335, 1397775333, 1397775332, 1397775331, 1397775330, 1397775329, 1397775328, 1397775325, 1397775323, 1397775316, 1397775314, 1397775312, 1397775311, 1397775307, 1397775305, 1397775303, 1397775301, 1397775300, 1397775299, 1397775246, 1397775211, 1397775209, 1397775207, 1397775020, 1397775019, 1397775018]} final : False mtd_id 4302 list_pids : [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] Looping around the photos to save general results len do output : 5 /1397775633.Didn't retrieve data . /1397775631.Didn't retrieve data . /1397775629.Didn't retrieve data . /1397775627.Didn't retrieve data . /1397775625.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, '4182805') ('4302', '29167848', '1397775633', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775631', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775629', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775627', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775625', None, None, None, None, None, '4182805') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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', '29167848', '1397775633', '0.04914837235529033', None, None, None, None, '4182805'), ('4302', '29167848', '1397775631', '0.04914837235529033', None, None, None, None, '4182805'), ('4302', '29167848', '1397775629', '0.04914837235529033', None, None, None, None, '4182805'), ('4302', '29167848', '1397775627', '0.04914837235529033', None, None, None, None, '4182805'), ('4302', '29167848', '1397775625', '0.04914837235529033', None, None, None, None, '4182805')] time used for this insertion : 0.017693281173706055 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.08396625518798828 time spend to save output : 0.01802229881286621 total time spend for step 2 : 0.10198855400085449 step3:velours_tree Thu Dec 4 02:32: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 : {29167848: [{'metal': 29167849, 'papier': 29167850, 'Carton_gris': 29167851, 'flou': 29167852, 'Carton_brun': 29167853, 'plastique': 29167854, 'autre_refus': 29167855, 'mal_croppe': 29167856, 'kraft': 29167857, 'cartonnette': 29167858, 'Teint_Dans_La_Masse': 29167859, 'environnement': 29167860}]} input_args_next_step : {29167848: ()} output_args : {29167848: [{'metal': 29167849, 'papier': 29167850, 'Carton_gris': 29167851, 'flou': 29167852, 'Carton_brun': 29167853, 'plastique': 29167854, 'autre_refus': 29167855, 'mal_croppe': 29167856, 'kraft': 29167857, 'cartonnette': 29167858, 'Teint_Dans_La_Masse': 29167859, 'environnement': 29167860}]} args : 29167848 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'metal': 29167849, 'papier': 29167850, 'Carton_gris': 29167851, 'flou': 29167852, 'Carton_brun': 29167853, 'plastique': 29167854, 'autre_refus': 29167855, 'mal_croppe': 29167856, 'kraft': 29167857, 'cartonnette': 29167858, 'Teint_Dans_La_Masse': 29167859, 'environnement': 29167860},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29167848) 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([29167848]) 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.24989581108093262 time spend to save output : 5.817413330078125e-05 total time spend for step 3 : 0.2499539852142334 step4:send_mail_cod Thu Dec 4 02:32:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} input_args_next_step : {1397775633: ()} output_args : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} args : 1397775633 depend.output_id : 0 input_args_next_step : {1397775633: ('0.04914837235529033',), 1397775631: ()} output_args : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} args : 1397775631 depend.output_id : 0 input_args_next_step : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ()} output_args : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} args : 1397775629 depend.output_id : 0 input_args_next_step : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ()} output_args : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} args : 1397775627 depend.output_id : 0 input_args_next_step : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ()} output_args : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',)} args : 1397775625 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 : {29167848: [{'metal': 29167849, 'papier': 29167850, 'Carton_gris': 29167851, 'flou': 29167852, 'Carton_brun': 29167853, 'plastique': 29167854, 'autre_refus': 29167855, 'mal_croppe': 29167856, 'kraft': 29167857, 'cartonnette': 29167858, 'Teint_Dans_La_Masse': 29167859, 'environnement': 29167860}]} input_args_next_step : {1397775633: ('0.04914837235529033',), 1397775631: ('0.04914837235529033',), 1397775629: ('0.04914837235529033',), 1397775627: ('0.04914837235529033',), 1397775625: ('0.04914837235529033',), 29167848: ()} output_args : {29167848: [{'metal': 29167849, 'papier': 29167850, 'Carton_gris': 29167851, 'flou': 29167852, 'Carton_brun': 29167853, 'plastique': 29167854, 'autre_refus': 29167855, 'mal_croppe': 29167856, 'kraft': 29167857, 'cartonnette': 29167858, 'Teint_Dans_La_Masse': 29167859, 'environnement': 29167860}]} args : 29167848 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 :6, first value : ('0.04914837235529033',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29167848) 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 (1397775633,1397775631,1397775629,1397775627,1397775625) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1397775625 begin to download photo : 1397775629 begin to download photo : 1397775633 download finish for photo 1397775633 download finish for photo 1397775625 begin to download photo : 1397775627 download finish for photo 1397775629 begin to download photo : 1397775631 download finish for photo 1397775627 download finish for photo 1397775631 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette291678491764811979/ imagette291678521764811979/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P29167848_04-12-2025_02_32_59.pdf 29167849 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=29167849 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291678491764811979 29167852 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=29167852 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291678521764811979 29167854 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=29167854 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397775351: '1764811226_3817424_1397775018_0564429429bfa037e497e40daefdac89_rle_crop_4058120777_0.png'} change filename to text .imagette291678541764811979/ imagette291678541764811979/1764811226_3817424_1397775018_0564429429bfa037e497e40daefdac89_rle_crop_4058120777_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/f3cd271f40c8b73882c4bd451827a2d5_21740307.png imagette291678541764811979 29167855 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=29167855 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397775346: '1764811226_3817424_1397775246_89560393fa46a608dd34f6c12c54b6d6_rle_crop_4058120752_0.png', 1397775347: '1764811226_3817424_1397775019_73082255b8ba3bf01de7f9dade6308e4_rle_crop_4058120764_0.png', 1397775348: '1764811226_3817424_1397775019_73082255b8ba3bf01de7f9dade6308e4_rle_crop_4058120762_0.png', 1397775349: '1764811226_3817424_1397775018_0564429429bfa037e497e40daefdac89_rle_crop_4058120776_0.png', 1397775456: '1764811507_3832307_1397775415_004a218b08d5b307a701dc11365f5d5c_rle_crop_4058121554_0.png', 1397775541: '1764811646_3838597_1397775323_4174bad1a5971439236585224f3279c5_rle_crop_4058122407_0.png', 1397775542: '1764811646_3838597_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122425_0.png', 1397775543: '1764811646_3838597_1397775300_90dcf10e822ec49fbaaa89309c02ea88_rle_crop_4058122474_0.png', 1397775610: '1764811767_3846704_1397775441_7832830d7de45aa899074c27d191dc35_rle_crop_4058122994_0.png', 1397775643: '1764811866_3853177_1397775323_4174bad1a5971439236585224f3279c5_rle_crop_4058122407_0.png', 1397775644: '1764811866_3853177_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122425_0.png', 1397775645: '1764811866_3853177_1397775300_90dcf10e822ec49fbaaa89309c02ea88_rle_crop_4058122474_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/0fc025087990154cf671dfe969f53d73_49878265.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/4ef87bedc83773a66c650e8fa74b4564_30943006.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/e1e36ef72a0b77064a992529a05d9ea5_32421802.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/5abe41dc6020de9c7b6a8a56b1be81ac_70446213.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/322477a4dddaed519509ab92b2754173_89245207.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/791657d01cb4926c19c0c9a02dc8b08c_53383471.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/149ac9dd8ac9c9189b5ac78a4316fc0f_65131366.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/791657d01cb4926c19c0c9a02dc8b08c_37728378.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/3c15f8cdd43c9b40864f7988c8263cc7_61064680.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/791657d01cb4926c19c0c9a02dc8b08c_61984632.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/149ac9dd8ac9c9189b5ac78a4316fc0f_33068383.png change filename to text .imagette291678551764811979/ imagette291678551764811979/1764811226_3817424_1397775246_89560393fa46a608dd34f6c12c54b6d6_rle_crop_4058120752_0.png.png imagette291678551764811979/1764811866_3853177_1397775300_90dcf10e822ec49fbaaa89309c02ea88_rle_crop_4058122474_0.png.png imagette291678551764811979/1764811646_3838597_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122425_0.png.png imagette291678551764811979/1764811767_3846704_1397775441_7832830d7de45aa899074c27d191dc35_rle_crop_4058122994_0.png.png imagette291678551764811979/1764811866_3853177_1397775323_4174bad1a5971439236585224f3279c5_rle_crop_4058122407_0.png.png imagette291678551764811979/1764811646_3838597_1397775300_90dcf10e822ec49fbaaa89309c02ea88_rle_crop_4058122474_0.png.png imagette291678551764811979/1764811866_3853177_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122425_0.png.png imagette291678551764811979/1764811507_3832307_1397775415_004a218b08d5b307a701dc11365f5d5c_rle_crop_4058121554_0.png.png imagette291678551764811979/1764811226_3817424_1397775019_73082255b8ba3bf01de7f9dade6308e4_rle_crop_4058120764_0.png.png imagette291678551764811979/1764811646_3838597_1397775323_4174bad1a5971439236585224f3279c5_rle_crop_4058122407_0.png.png imagette291678551764811979/1764811226_3817424_1397775019_73082255b8ba3bf01de7f9dade6308e4_rle_crop_4058120762_0.png.png imagette291678551764811979/1764811226_3817424_1397775018_0564429429bfa037e497e40daefdac89_rle_crop_4058120776_0.png.png imagette291678561764811980/ wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/791657d01cb4926c19c0c9a02dc8b08c_77432145.png imagette291678551764811979 29167856 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=29167856 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette291678561764811980 29167857 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=29167857 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397775352: '1764811226_3817424_1397775246_89560393fa46a608dd34f6c12c54b6d6_rle_crop_4058120746_0.png', 1397775372: '1764811266_3818178_1397775211_136626826b3247c14d7c5144f7a06cdf_rle_crop_4058120939_0.png', 1397775373: '1764811266_3818178_1397775209_6a0e16a13fab3579aba1a2946ff584fd_rle_crop_4058120946_0.png', 1397775527: '1764811626_3838242_1397775333_cc83a800f19b5849fb76aa46b6908af2_rle_crop_4058122109_0.png', 1397775528: '1764811626_3838242_1397775332_5592be705332cad5e32eeb32fcf08def_rle_crop_4058122116_0.png', 1397775529: '1764811626_3838242_1397775330_97ea8232a6ab27ab9fcf615fbef10cca_rle_crop_4058122147_0.png', 1397775530: '1764811626_3838242_1397775307_c75ba11ffb2e71efc704a88c1da62577_rle_crop_4058122162_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/ebbf065ac594d3e3468f1d3614095c90_31590430.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/7690be22520870afaea03e3d1c166705_43925007.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/2ade11eb9202a3b4b93967d21829d105_29019695.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/7690be22520870afaea03e3d1c166705_23977461.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/2ade11eb9202a3b4b93967d21829d105_5579563.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/2ca42fbc6a569eff23116bb9252f3ab8_23548561.png change filename to text .imagette291678571764811980/ imagette291678571764811980/1764811626_3838242_1397775332_5592be705332cad5e32eeb32fcf08def_rle_crop_4058122116_0.png.png imagette291678571764811980/1764811626_3838242_1397775330_97ea8232a6ab27ab9fcf615fbef10cca_rle_crop_4058122147_0.png.png imagette291678571764811980/1764811626_3838242_1397775333_cc83a800f19b5849fb76aa46b6908af2_rle_crop_4058122109_0.png.png imagette291678571764811980/1764811266_3818178_1397775209_6a0e16a13fab3579aba1a2946ff584fd_rle_crop_4058120946_0.png.png imagette291678571764811980/1764811266_3818178_1397775211_136626826b3247c14d7c5144f7a06cdf_rle_crop_4058120939_0.png.png imagette291678571764811980/1764811226_3817424_1397775246_89560393fa46a608dd34f6c12c54b6d6_rle_crop_4058120746_0.png.png imagette291678571764811980/1764811626_3838242_1397775307_c75ba11ffb2e71efc704a88c1da62577_rle_crop_4058122162_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/2ca42fbc6a569eff23116bb9252f3ab8_84909016.png imagette291678571764811980 29167858 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=29167858 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397775524: '1764811626_3838242_1397775330_97ea8232a6ab27ab9fcf615fbef10cca_rle_crop_4058122140_0.png', 1397775525: '1764811626_3838242_1397775307_c75ba11ffb2e71efc704a88c1da62577_rle_crop_4058122155_0.png', 1397775567: '1764811706_3843681_1397775437_f949631822c476b0b3aafb7f29401d44_rle_crop_4058122759_0.png', 1397775603: '1764811747_3845657_1397775449_9930982c488d3c61856d5de43d883562_rle_crop_4058122879_0.png', 1397775615: '1764811767_3846704_1397775422_7c53f3bd4bec2cb399ae68a24438016b_rle_crop_4058123021_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/d6afad7b778ddd4fe962f2202b6e7dae_46287927.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/d6afad7b778ddd4fe962f2202b6e7dae_2287821.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/a644b788d7de313b33c3c7c84060f04a_44094118.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/7b610cd97eb66a3c248d621c04dbda16_42608847.png change filename to text .imagette291678581764811980/ imagette291678581764811980/1764811767_3846704_1397775422_7c53f3bd4bec2cb399ae68a24438016b_rle_crop_4058123021_0.png.png imagette291678581764811980/1764811626_3838242_1397775330_97ea8232a6ab27ab9fcf615fbef10cca_rle_crop_4058122140_0.png.png imagette291678581764811980/1764811747_3845657_1397775449_9930982c488d3c61856d5de43d883562_rle_crop_4058122879_0.png.png imagette291678581764811980/1764811706_3843681_1397775437_f949631822c476b0b3aafb7f29401d44_rle_crop_4058122759_0.png.png imagette291678581764811980/1764811626_3838242_1397775307_c75ba11ffb2e71efc704a88c1da62577_rle_crop_4058122155_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/6e6b64bcef4505d1ed5ba45791fba3a0_67857024.png imagette291678581764811980 29167851 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=29167851 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397775350: '1764811226_3817424_1397775018_0564429429bfa037e497e40daefdac89_rle_crop_4058120774_0.png', 1397775560: '1764811706_3843681_1397775439_e09938e44204dc9f64f130d9d24c448d_rle_crop_4058122735_0.png', 1397775612: '1764811767_3846704_1397775441_7832830d7de45aa899074c27d191dc35_rle_crop_4058122993_0.png', 1397775613: '1764811767_3846704_1397775441_7832830d7de45aa899074c27d191dc35_rle_crop_4058122998_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/ac739f68ec7325948a68a2281ee60903_55545079.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/87a2aa612343e0f2e2b6a6b9993661fd_18666953.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/4bf82dea993c01219fa52e64efb49b7b_5135811.png change filename to text .imagette291678511764811981/ imagette291678511764811981/1764811767_3846704_1397775441_7832830d7de45aa899074c27d191dc35_rle_crop_4058122998_0.png.png imagette291678511764811981/1764811226_3817424_1397775018_0564429429bfa037e497e40daefdac89_rle_crop_4058120774_0.png.png imagette291678511764811981/1764811767_3846704_1397775441_7832830d7de45aa899074c27d191dc35_rle_crop_4058122993_0.png.png imagette291678511764811981/1764811706_3843681_1397775439_e09938e44204dc9f64f130d9d24c448d_rle_crop_4058122735_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/a4d383a6fd4b5db73afda94258d0d6fb_75727958.png imagette291678511764811981 29167853 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=29167853 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397775461: '1764811525_3834177_1397775312_094a466e2f60f0f0c10bb55a3a86f334_rle_crop_4058121650_0.png', 1397775462: '1764811525_3834177_1397775311_d70a9aada17bba6afd26061e519601b5_rle_crop_4058121662_0.png', 1397775545: '1764811646_3838597_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122428_0.png', 1397775575: '1764811706_3843681_1397775439_e09938e44204dc9f64f130d9d24c448d_rle_crop_4058122737_0.png', 1397775646: '1764811866_3853177_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122428_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/5b94d512ec58bddd422953013509983b_63034844.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/8b6cd5ebb8c1dbe6f12adbaf2f95d4cd_32109255.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/c0edd2a392f7c4c55c26ddaa90550c4c_77772368.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/6602b50ea750e9f8f220d873a6a03f54_92016605.png change filename to text .imagette291678531764811981/ imagette291678531764811981/1764811866_3853177_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122428_0.png.png imagette291678531764811981/1764811525_3834177_1397775312_094a466e2f60f0f0c10bb55a3a86f334_rle_crop_4058121650_0.png.png imagette291678531764811981/1764811706_3843681_1397775439_e09938e44204dc9f64f130d9d24c448d_rle_crop_4058122737_0.png.png imagette291678531764811981/1764811525_3834177_1397775311_d70a9aada17bba6afd26061e519601b5_rle_crop_4058121662_0.png.png imagette291678531764811981/1764811646_3838597_1397775314_27dd8971b1740ccc754c02bcae0b8a80_rle_crop_4058122428_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/c0edd2a392f7c4c55c26ddaa90550c4c_51858862.png imagette291678531764811981 29167859 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=29167859 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1397775539: '1764811646_3838597_1397775305_22354fbb643e19120d77f02de41a164b_rle_crop_4058122434_0.png', 1397775642: '1764811866_3853177_1397775303_511687af7e7aeb597c7183168507e22f_rle_crop_4058122446_0.png', 1397775641: '1764811866_3853177_1397775305_22354fbb643e19120d77f02de41a164b_rle_crop_4058122434_0.png', 1397775640: '1764811866_3853177_1397775328_4943a65618b8ca66115ca5d83a3f5f1d_rle_crop_4058122389_0.png', 1397775639: '1764811866_3853177_1397775329_b610837c91eda8bb7535b1db44d46627_rle_crop_4058122377_0.png', 1397775602: '1764811747_3845657_1397775447_5f433b0acd0b596245dd205ca0d0f7cc_rle_crop_4058122908_0.png', 1397775601: '1764811747_3845657_1397775449_9930982c488d3c61856d5de43d883562_rle_crop_4058122882_0.png', 1397775559: '1764811706_3843681_1397775436_4c5d9c197b8d5f9f4f5a3697b110370e_rle_crop_4058122773_0.png', 1397775558: '1764811706_3843681_1397775436_4c5d9c197b8d5f9f4f5a3697b110370e_rle_crop_4058122775_0.png', 1397775557: '1764811706_3843681_1397775437_f949631822c476b0b3aafb7f29401d44_rle_crop_4058122761_0.png', 1397775556: '1764811706_3843681_1397775452_9ca4ca2ddad6fbfb54b3bc60b56cce31_rle_crop_4058122722_0.png', 1397775540: '1764811646_3838597_1397775303_511687af7e7aeb597c7183168507e22f_rle_crop_4058122446_0.png', 1397775343: '1764811226_3817424_1397775246_89560393fa46a608dd34f6c12c54b6d6_rle_crop_4058120747_0.png', 1397775538: '1764811646_3838597_1397775328_4943a65618b8ca66115ca5d83a3f5f1d_rle_crop_4058122389_0.png', 1397775537: '1764811646_3838597_1397775329_b610837c91eda8bb7535b1db44d46627_rle_crop_4058122377_0.png', 1397775505: '1764811626_3838242_1397775331_40a1f420c61b74ed7414339127f73b24_rle_crop_4058122126_0.png', 1397775501: '1764811626_3838242_1397775331_40a1f420c61b74ed7414339127f73b24_rle_crop_4058122125_0.png', 1397775460: '1764811525_3834177_1397775311_d70a9aada17bba6afd26061e519601b5_rle_crop_4058121667_0.png', 1397775455: '1764811507_3832307_1397775353_05d8d33df3f193b053b4fc3d61644bf4_rle_crop_4058121581_0.png', 1397775371: '1764811266_3818178_1397775207_5098e9b856b60d0eb8124cb1bf4d14ca_rle_crop_4058120956_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/faa7590b433764c517117e6a734a58de_88116831.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/5e0d10db96573fdefe9f43af0e8f6bdd_35265616.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/faa7590b433764c517117e6a734a58de_38065649.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/5e0d10db96573fdefe9f43af0e8f6bdd_44404021.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/faa7590b433764c517117e6a734a58de_32231868.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/069cacd49a1a08b5bb9c67b98bfe604f_44632452.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/486ac0fa054ef6a594ad01536517d9bf_76023572.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/490fd121840d3cd1719ed6c73aae34b1_26732261.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/33d1341c46fd95c81dc06fa8a9192923_32129982.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/24e6b3e478f6b4f4bbfee660191b14fd_13585410.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/f79d98236aa9b11123d9db0d93412078_52272353.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/5e0d10db96573fdefe9f43af0e8f6bdd_33688263.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/7db88d2142d14bad80d66d2c39309049_99706898.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/5e0d10db96573fdefe9f43af0e8f6bdd_58439730.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/faa7590b433764c517117e6a734a58de_9080860.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/d5174fc9271575ac876586ad996406cc_93016969.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/9d9f0f58c35b016e34b6b0bb2b297523_92176177.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/a4a9ccf7196cf7a308e2623c907b9e27_78176891.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/9ee09ee3680f514f42d5d79df071265e_27385255.png change filename to text .imagette291678591764811981/ imagette291678591764811981/1764811646_3838597_1397775329_b610837c91eda8bb7535b1db44d46627_rle_crop_4058122377_0.png.png imagette291678591764811981/1764811646_3838597_1397775303_511687af7e7aeb597c7183168507e22f_rle_crop_4058122446_0.png.png imagette291678591764811981/1764811706_3843681_1397775437_f949631822c476b0b3aafb7f29401d44_rle_crop_4058122761_0.png.png imagette291678591764811981/1764811706_3843681_1397775452_9ca4ca2ddad6fbfb54b3bc60b56cce31_rle_crop_4058122722_0.png.png imagette291678591764811981/1764811646_3838597_1397775328_4943a65618b8ca66115ca5d83a3f5f1d_rle_crop_4058122389_0.png.png imagette291678591764811981/1764811626_3838242_1397775331_40a1f420c61b74ed7414339127f73b24_rle_crop_4058122126_0.png.png imagette291678591764811981/1764811866_3853177_1397775329_b610837c91eda8bb7535b1db44d46627_rle_crop_4058122377_0.png.png imagette291678591764811981/1764811646_3838597_1397775305_22354fbb643e19120d77f02de41a164b_rle_crop_4058122434_0.png.png imagette291678591764811981/1764811226_3817424_1397775246_89560393fa46a608dd34f6c12c54b6d6_rle_crop_4058120747_0.png.png imagette291678591764811981/1764811747_3845657_1397775447_5f433b0acd0b596245dd205ca0d0f7cc_rle_crop_4058122908_0.png.png imagette291678591764811981/1764811866_3853177_1397775328_4943a65618b8ca66115ca5d83a3f5f1d_rle_crop_4058122389_0.png.png imagette291678591764811981/1764811266_3818178_1397775207_5098e9b856b60d0eb8124cb1bf4d14ca_rle_crop_4058120956_0.png.png imagette291678591764811981/1764811747_3845657_1397775449_9930982c488d3c61856d5de43d883562_rle_crop_4058122882_0.png.png imagette291678591764811981/1764811866_3853177_1397775305_22354fbb643e19120d77f02de41a164b_rle_crop_4058122434_0.png.png imagette291678591764811981/1764811626_3838242_1397775331_40a1f420c61b74ed7414339127f73b24_rle_crop_4058122125_0.png.png imagette291678591764811981/1764811866_3853177_1397775303_511687af7e7aeb597c7183168507e22f_rle_crop_4058122446_0.png.png imagette291678591764811981/1764811525_3834177_1397775311_d70a9aada17bba6afd26061e519601b5_rle_crop_4058121667_0.png.png imagette291678591764811981/1764811507_3832307_1397775353_05d8d33df3f193b053b4fc3d61644bf4_rle_crop_4058121581_0.png.png imagette291678591764811981/1764811706_3843681_1397775436_4c5d9c197b8d5f9f4f5a3697b110370e_rle_crop_4058122775_0.png.png imagette291678591764811981/1764811706_3843681_1397775436_4c5d9c197b8d5f9f4f5a3697b110370e_rle_crop_4058122773_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/d5174fc9271575ac876586ad996406cc_74523691.png imagette291678591764811981 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29167848 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29167861,29167862,29167863,29167864,29167865,29167866,29167867,29167868,29167869,29167870,29167871,29167872?tags=metal,papier,Carton_gris,flou,Carton_brun,plastique,autre_refus,mal_croppe,kraft,cartonnette,Teint_Dans_La_Masse,environnement your option no_mail is active, we will not send the real mail to your client args[1397775633] : ('0.04914837235529033',) no score found for photo 1397775633 We are sending mail with results at report@fotonower.com args[1397775631] : ('0.04914837235529033',) no score found for photo 1397775631 We are sending mail with results at report@fotonower.com args[1397775629] : ('0.04914837235529033',) no score found for photo 1397775629 We are sending mail with results at report@fotonower.com args[1397775627] : ('0.04914837235529033',) no score found for photo 1397775627 We are sending mail with results at report@fotonower.com args[1397775625] : ('0.04914837235529033',) no score found for photo 1397775625 We are sending mail with results at report@fotonower.com refus_total : 0.04914837235529033 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=29167848 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_P29167848_04-12-2025_02_32_59.pdf results_Auto_P29167848_04-12-2025_02_32_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29167848_04-12-2025_02_32_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','29167848','results_Auto_P29167848_04-12-2025_02_32_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29167848_04-12-2025_02_32_59.pdf','pdf','','0.18','0.04914837235529033') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29167848]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] map_info['map_portfolio_photo'] : {29167848: [1397775633, 1397775631, 1397775629, 1397775627, 1397775625, 1397775622, 1397775621, 1397775619, 1397775617, 1397775614, 1397775609, 1397775600, 1397775598, 1397775596, 1397775594, 1397775593, 1397775588, 1397775553, 1397775551, 1397775549, 1397775547, 1397775546, 1397775544, 1397775488, 1397775486, 1397775484, 1397775483, 1397775479, 1397775478, 1397775464, 1397775463, 1397775452, 1397775450, 1397775449, 1397775448, 1397775447, 1397775441, 1397775439, 1397775438, 1397775437, 1397775436, 1397775424, 1397775423, 1397775422, 1397775415, 1397775362, 1397775357, 1397775355, 1397775353, 1397775339, 1397775337, 1397775335, 1397775333, 1397775332, 1397775331, 1397775330, 1397775329, 1397775328, 1397775325, 1397775323, 1397775316, 1397775314, 1397775312, 1397775311, 1397775307, 1397775305, 1397775303, 1397775301, 1397775300, 1397775299, 1397775246, 1397775211, 1397775209, 1397775207, 1397775020, 1397775019, 1397775018]} final : False mtd_id 4302 list_pids : [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] 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, '4182805') ('4302', '29167848', '1397775633', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775631', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775629', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775627', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775625', None, None, None, None, None, '4182805') 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', '29167848', '1397775633', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775631', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775629', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775627', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775625', None, None, None, None, None, '4182805')] time used for this insertion : 0.01987147331237793 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.644096612930298 time spend to save output : 0.02004384994506836 total time spend for step 4 : 5.664140462875366 step5:split_time_score Thu Dec 4 02:33:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['29167848'] 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 : [('29167848',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29167848) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1397775633: {'path': 'temp/1764811978_757090_1397775633_89412876a1bdb9494c76711d7838771d.jpg', 'extension': 'jpg'}, 1397775625: {'path': 'temp/1764811978_757090_1397775625_fcc5615abe8c8f7243f79cabcc919e2c.jpg', 'extension': 'jpg'}, 1397775627: {'path': 'temp/1764811978_757090_1397775627_2f59e7aa4e13df7b2a57f4aeeb843eb3.jpg', 'extension': 'jpg'}, 1397775629: {'path': 'temp/1764811978_757090_1397775629_86cea082a44ba35586444b414bffaf65.jpg', 'extension': 'jpg'}, 1397775631: {'path': 'temp/1764811978_757090_1397775631_bfd3a7959908a8dd5f8e7c2377770247.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 = 29167848; (('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 = 29167848 group by h (('02', 77),) 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=29167848 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 (29167848) 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 (29167848) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04122025 29167848 Nombre de photos uploadées : 77 / 23040 (0%) 04122025 29167848 Nombre de photos taguées (types de déchets): 0 / 77 (0%) 04122025 29167848 Nombre de photos taguées (volume) : 0 / 77 (0%) [{'photo_id': 1397775020, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/28d7862fd9a6e8377acf1918ec848ff5.jpg', 'username': None, 'uploaded_at': 1764810968, 'text': 'image_04122025_02_15_24_010139m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1397775019, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/73082255b8ba3bf01de7f9dade6308e4.jpg', 'username': None, 'uploaded_at': 1764810968, 'text': 'image_04122025_02_15_34_010131m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1397775018, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/0564429429bfa037e497e40daefdac89.jpg', 'username': None, 'uploaded_at': 1764810968, 'text': 'image_04122025_02_15_44_009124m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1397775246, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/4/89560393fa46a608dd34f6c12c54b6d6.jpg', 'username': None, 'uploaded_at': 1764811027, 'text': 'image_04122025_02_15_54_010136m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ????????????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0033233165740966797 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29167848, '2025-12-04' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-04' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2690577,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.27504730224609375 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= 2690577 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29164250, 'dashboard_result_id': 18043368, '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_P29164250_04-12-2025_00_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29164258, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29164259, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29164260, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29164261, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29164262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29164263, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29164264, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29164265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29164266, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29164267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29164268, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29164269, 'pht': 3726}}"}, {'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29164732, 'dashboard_result_id': 18043369, '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_P29164732_04-12-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29164748, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29164749, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29164750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29164751, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29164752, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29164753, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29164754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29164755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29164756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29164757, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29164758, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29164759, 'pht': 3726}}"}, {'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29165106, 'dashboard_result_id': 18043370, '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_P29165106_04-12-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29165134, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29165135, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29165136, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29165137, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29165138, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29165139, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29165140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29165141, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29165142, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29165143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29165144, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29165145, 'pht': 3726}}"}, {'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29165583, 'dashboard_result_id': 18043371, '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_P29165583_04-12-2025_01_22_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29165590, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29165591, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29165592, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29165593, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29165594, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29165595, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29165596, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29165597, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29165598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29165599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29165600, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29165601, 'pht': 3726}}"}, {'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29166634, 'dashboard_result_id': 18043372, '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_P29166634_04-12-2025_01_49_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29166636, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29166637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29166638, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29166639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29166640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29166641, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29166642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29166643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29166644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29166645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29166646, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29166647, 'pht': 3726}}"}, {'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29166944, 'dashboard_result_id': 18043373, '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_P29166944_04-12-2025_02_03_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29166950, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29166951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29166952, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29166953, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29166954, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29166955, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29166956, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29166957, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29166958, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29166959, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29166960, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29166961, 'pht': 3726}}"}, {'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29167317, 'dashboard_result_id': 18043374, '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_P29167317_04-12-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29167346, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29167347, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29167348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29167349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29167350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29167351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29167352, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29167353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29167354, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29167355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29167356, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29167357, 'pht': 3726}}"}, {'dashboat_entry_day': 2690577, 'dashboard_run_id': 2697871, 'mtr_portfolio_id': 29167848, 'dashboard_result_id': 18043375, '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_P29167848_04-12-2025_02_28_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29167849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29167850, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29167851, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29167852, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29167853, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29167854, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29167855, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29167856, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29167857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29167858, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29167859, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29167860, '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 = 29164250 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': 4182371, 'mtr_portfolio_id': 29164250, 'created_at': datetime.datetime(2025, 12, 4, 0, 17), 'result': '0.034021803020429134', 'result_long': None, 'result_double': None}] Qualite : 0.034021803020429134 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29164250 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29164250_04-12-2025_00_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29164250 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_P29164250_04-12-2025_00_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29164258, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29164259, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29164260, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29164261, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29164262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29164263, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29164264, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29164265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29164266, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29164267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29164268, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29164269, 'pht': 3726}}" where mtr_portfolio_id = 29164250 and dashboard_run_id = 2697871 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`=29164250 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043368, 0.034021803020429134, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29164250_04-12-2025_00_17_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29164258, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29164259, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29164260, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29164261, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29164262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29164263, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29164264, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29164265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29164266, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29164267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29164268, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29164269, '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 = 29164732 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': 4182410, 'mtr_portfolio_id': 29164732, 'created_at': datetime.datetime(2025, 12, 4, 0, 32, 58), 'result': '0.04591742300757987', 'result_long': None, 'result_double': None}] Qualite : 0.04591742300757987 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29164732 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29164732_04-12-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29164732 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_P29164732_04-12-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29164748, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29164749, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29164750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29164751, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29164752, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29164753, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29164754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29164755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29164756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29164757, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29164758, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29164759, 'pht': 3726}}" where mtr_portfolio_id = 29164732 and dashboard_run_id = 2697871 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`=29164732 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043369, 0.04591742300757987, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29164732_04-12-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29164748, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29164749, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29164750, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29164751, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29164752, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29164753, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29164754, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29164755, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29164756, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29164757, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29164758, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29164759, '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 = 29165106 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': 4182450, 'mtr_portfolio_id': 29165106, 'created_at': datetime.datetime(2025, 12, 4, 0, 48, 58), 'result': '0.034384986604274456', 'result_long': None, 'result_double': None}] Qualite : 0.034384986604274456 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29165106 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29165106_04-12-2025_00_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29165106 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_P29165106_04-12-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29165134, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29165135, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29165136, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29165137, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29165138, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29165139, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29165140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29165141, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29165142, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29165143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29165144, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29165145, 'pht': 3726}}" where mtr_portfolio_id = 29165106 and dashboard_run_id = 2697871 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`=29165106 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043370, 0.034384986604274456, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29165106_04-12-2025_00_48_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29165134, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29165135, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29165136, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29165137, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29165138, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29165139, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29165140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29165141, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29165142, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29165143, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29165144, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29165145, '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 = 29165583 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': 4182501, 'mtr_portfolio_id': 29165583, 'created_at': datetime.datetime(2025, 12, 4, 1, 22, 58), 'result': '0.03901994029322212', 'result_long': None, 'result_double': None}] Qualite : 0.03901994029322212 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29165583 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29165583_04-12-2025_01_22_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29165583 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_P29165583_04-12-2025_01_22_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29165590, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29165591, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29165592, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29165593, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29165594, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29165595, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29165596, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29165597, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29165598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29165599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29165600, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29165601, 'pht': 3726}}" where mtr_portfolio_id = 29165583 and dashboard_run_id = 2697871 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`=29165583 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043371, 0.03901994029322212, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29165583_04-12-2025_01_22_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29165590, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29165591, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29165592, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29165593, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29165594, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29165595, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29165596, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29165597, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29165598, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29165599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29165600, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29165601, '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 = 29166634 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': 4182628, 'mtr_portfolio_id': 29166634, 'created_at': datetime.datetime(2025, 12, 4, 1, 48, 59), 'result': '0.021116250073323146', 'result_long': None, 'result_double': None}] Qualite : 0.021116250073323146 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29166634 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29166634_04-12-2025_01_49_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29166634 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_P29166634_04-12-2025_01_49_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29166636, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29166637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29166638, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29166639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29166640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29166641, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29166642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29166643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29166644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29166645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29166646, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29166647, 'pht': 3726}}" where mtr_portfolio_id = 29166634 and dashboard_run_id = 2697871 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`=29166634 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043372, 0.021116250073323146, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29166634_04-12-2025_01_49_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29166636, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29166637, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29166638, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29166639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29166640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29166641, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29166642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29166643, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29166644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29166645, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29166646, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29166647, '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 = 29166944 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': 4182666, 'mtr_portfolio_id': 29166944, 'created_at': datetime.datetime(2025, 12, 4, 2, 3, 30), 'result': '0.052044071454954384', 'result_long': None, 'result_double': None}] Qualite : 0.052044071454954384 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29166944 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29166944_04-12-2025_02_03_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29166944 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_P29166944_04-12-2025_02_03_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29166950, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29166951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29166952, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29166953, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29166954, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29166955, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29166956, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29166957, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29166958, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29166959, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29166960, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29166961, 'pht': 3726}}" where mtr_portfolio_id = 29166944 and dashboard_run_id = 2697873 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`=29166944 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043373, 0.052044071454954384, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29166944_04-12-2025_02_03_31.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29166950, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29166951, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29166952, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29166953, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29166954, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29166955, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29166956, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29166957, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29166958, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29166959, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29166960, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29166961, '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 = 29167317 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': 4182736, 'mtr_portfolio_id': 29167317, 'created_at': datetime.datetime(2025, 12, 4, 2, 16, 57), 'result': '0.04557013962396331', 'result_long': None, 'result_double': None}] Qualite : 0.04557013962396331 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29167317 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29167317_04-12-2025_02_16_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29167317 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_P29167317_04-12-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29167346, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29167347, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29167348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29167349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29167350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29167351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29167352, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29167353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29167354, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29167355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29167356, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29167357, 'pht': 3726}}" where mtr_portfolio_id = 29167317 and dashboard_run_id = 2697873 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`=29167317 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043374, 0.04557013962396331, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29167317_04-12-2025_02_16_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29167346, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29167347, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29167348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29167349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29167350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29167351, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29167352, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29167353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29167354, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29167355, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29167356, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29167357, '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 = 29167848 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': 4182805, 'mtr_portfolio_id': 29167848, 'created_at': datetime.datetime(2025, 12, 4, 2, 32, 58), 'result': '0.04914837235529033', 'result_long': None, 'result_double': None}] Qualite : 0.04914837235529033 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29167848 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29167848_04-12-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29167848 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_P29167848_04-12-2025_02_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29167849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29167850, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29167851, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29167852, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29167853, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29167854, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29167855, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29167856, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29167857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29167858, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29167859, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29167860, 'pht': 3726}}" where mtr_portfolio_id = 29167848 and dashboard_run_id = 2697873 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`=29167848 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18043375, 0.04914837235529033, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29167848_04-12-2025_02_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29167849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29167850, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29167851, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29167852, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29167853, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29167854, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29167855, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29167856, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29167857, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29167858, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29167859, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29167860, '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 (29164250,29164732,29165106,29165583,29166634,29166944,29167317,29167848) result : ((1397754704,), (1397754746,), (1397754775,), (1397754811,), (1397755183,), (1397755250,), (1397755317,), (1397755363,), (1397755398,), (1397755783,), (1397755857,), (1397755927,), (1397755994,), (1397757030,), (1397757127,), (1397757226,), (1397757284,), (1397757320,), (1397757805,), (1397757841,), (1397757873,), (1397757921,), (1397757943,), (1397758207,), (1397758258,), (1397758323,), (1397758383,), (1397758780,), (1397758800,), (1397758802,), (1397758803,), (1397758805,), (1397758807,), (1397758825,), (1397758826,), (1397759084,), (1397759085,), (1397759086,), (1397759241,), (1397759256,), (1397759259,), (1397759260,), (1397759276,), (1397759277,), (1397759278,), (1397759279,), (1397759281,), (1397759282,), (1397759291,), (1397759294,), (1397759296,), (1397759299,), (1397759302,), (1397759324,), (1397759322,), (1397759323,), (1397759331,), (1397759332,), (1397759336,), (1397759337,), (1397759339,), (1397759341,), (1397759388,), (1397759395,), (1397759406,), (1397759412,), (1397759437,), (1397759612,), (1397759618,), (1397759625,), (1397759626,), (1397759652,), (1397759653,), (1397759654,), (1397759655,), (1397759657,), (1397759671,), (1397759672,), (1397759673,), (1397759674,), (1397759705,), (1397759987,), (1397759988,), (1397759989,), (1397759990,), (1397759992,), (1397760018,), (1397760020,), (1397760021,), (1397760028,), (1397760030,), (1397760032,), (1397760035,), (1397760038,), (1397760052,), (1397760053,), (1397760054,), (1397760055,), (1397760056,), (1397760058,), (1397760069,), (1397760070,), (1397760071,), (1397760073,), (1397760075,), (1397760077,), (1397760103,), (1397760106,), (1397760107,), (1397760135,), (1397760136,), (1397760137,), (1397760140,), (1397760143,), (1397760162,), (1397760165,), (1397760166,), (1397760167,), (1397760168,), (1397760169,), (1397760152,), (1397760153,), (1397760155,), (1397760157,), (1397760160,), (1397760170,), (1397760172,), (1397760180,), (1397760190,), (1397760192,), (1397760195,), (1397760197,), (1397760199,), (1397760213,), (1397760220,), (1397760224,), (1397760225,), (1397760227,), (1397760229,), (1397760308,), (1397760342,), (1397760374,), (1397760405,), (1397760832,), (1397760866,), (1397760900,), (1397760935,), (1397760948,), (1397760950,), (1397760954,), (1397760955,), (1397760985,), (1397761023,), (1397761058,), (1397761091,), (1397761219,), (1397761258,), (1397761268,), (1397761276,), (1397761304,), (1397761306,), (1397761388,), (1397761389,), (1397761391,), (1397761415,), (1397761448,), (1397761449,), (1397761458,), (1397761459,), (1397761460,), (1397761461,), (1397761464,), (1397761465,), (1397761468,), (1397761469,), (1397761472,), (1397761473,), (1397761477,), (1397761478,), (1397761479,), (1397761481,), (1397761483,), (1397761484,), (1397761489,), (1397761490,), (1397761491,), (1397761492,), (1397761493,), (1397761517,), (1397761518,), (1397761519,), (1397761522,), (1397761529,), (1397761535,), (1397761536,), (1397761537,), (1397761538,), (1397761558,), (1397761559,), (1397761560,), (1397761582,), (1397761583,), (1397761593,), (1397761602,), (1397761607,), (1397761610,), (1397761633,), (1397761626,), (1397761627,), (1397761628,), (1397761629,), (1397761631,), (1397761638,), (1397761639,), (1397761640,), (1397761641,), (1397761658,), (1397761659,), (1397761660,), (1397761661,), (1397761668,), (1397761669,), (1397761670,), (1397761671,), (1397761673,), (1397761675,), (1397761697,), (1397761698,), (1397761699,), (1397761700,), (1397761702,), (1397761708,), (1397761709,), (1397761710,), (1397761711,), (1397761724,), (1397761725,), (1397761726,), (1397761727,), (1397761729,), (1397761731,), (1397761748,), (1397761768,), (1397761773,), (1397761774,), (1397761776,), (1397761793,), (1397761794,), (1397761795,), (1397761802,), (1397761804,), (1397761806,), (1397761809,), (1397761812,), (1397761815,), (1397761827,), (1397761828,), (1397761829,), (1397761830,), (1397761869,), (1397761870,), (1397761871,), (1397761872,), (1397761885,), (1397761886,), (1397761894,), (1397761904,), (1397761906,), (1397768205,), (1397768742,), (1397768743,), (1397768744,), (1397768746,), (1397768748,), (1397768753,), (1397768773,), (1397768780,), (1397768781,), (1397768782,), (1397768783,), (1397768794,), (1397768795,), (1397768796,), (1397768797,), (1397768814,), (1397768815,), (1397768816,), (1397768818,), (1397768820,), (1397768831,), (1397768842,), (1397768857,), (1397768872,), (1397768873,), (1397768877,), (1397768894,), (1397768896,), (1397768899,), (1397768903,), (1397768906,), (1397768954,), (1397768967,), (1397768978,), (1397768979,), (1397768982,), (1397768985,), (1397768997,), (1397768998,), (1397768999,), (1397769000,), (1397769002,), (1397769024,), (1397769025,), (1397769026,), (1397769027,), (1397769049,), (1397769050,), (1397769051,), (1397769052,), (1397769054,), (1397769061,), (1397769062,), (1397769064,), (1397769065,), (1397769096,), (1397769089,), (1397769090,), (1397769091,), (1397769092,), (1397769094,), (1397769101,), (1397769102,), (1397769103,), (1397769104,), (1397769106,), (1397769145,), (1397769147,), (1397769148,), (1397769162,), (1397769186,), (1397769217,), (1397769255,), (1397769292,), (1397769328,), (1397769562,), (1397769677,), (1397769709,), (1397769747,), (1397769790,), (1397769823,), (1397769830,), (1397769853,), (1397769885,), (1397770066,), (1397770096,), (1397770097,), (1397770098,), (1397770120,), (1397770161,), (1397770164,), (1397770166,), (1397770180,), (1397770184,), (1397770245,), (1397770250,), (1397770251,), (1397770297,), (1397770299,), (1397770301,), (1397770303,), (1397770305,), (1397770307,), (1397770324,), (1397770325,), (1397770331,), (1397770332,), (1397770365,), (1397770366,), (1397770381,), (1397770411,), (1397770419,), (1397770421,), (1397770426,), (1397770876,), (1397770867,), (1397770869,), (1397770871,), (1397770873,), (1397771055,), (1397771061,), (1397771063,), (1397771087,), (1397771088,), (1397771089,), (1397771090,), (1397771104,), (1397771105,), (1397771106,), (1397771107,), (1397771137,), (1397771147,), (1397771148,), (1397771149,), (1397771151,), (1397771161,), (1397771162,), (1397771163,), (1397771171,), (1397771172,), (1397771173,), (1397771174,), (1397771193,), (1397771194,), (1397771195,), (1397771196,), (1397771199,), (1397771203,), (1397771404,), (1397771440,), (1397771474,), (1397771511,), (1397771547,), (1397771586,), (1397771738,), (1397771780,), (1397771823,), (1397771858,), (1397771890,), (1397771928,), (1397772042,), (1397772043,), (1397772076,), (1397772077,), (1397772215,), (1397772216,), (1397772217,), (1397772407,), (1397772438,), (1397772499,), (1397773283,), (1397773323,), (1397773358,), (1397773400,), (1397773463,), (1397773797,), (1397773798,), (1397773824,), (1397773854,), (1397774486,), (1397774536,), (1397774598,), (1397774632,), (1397774669,), (1397775021,), (1397775018,), (1397775019,), (1397775020,), (1397775207,), (1397775209,), (1397775211,), (1397775246,), (1397775299,), (1397775300,), (1397775301,), (1397775303,), (1397775305,), (1397775307,), (1397775311,), (1397775312,), (1397775314,), (1397775316,), (1397775323,), (1397775325,), (1397775328,), (1397775329,), (1397775330,), (1397775331,), (1397775332,), (1397775333,), (1397775335,), (1397775337,), (1397775339,), (1397775353,), (1397775355,), (1397775357,), (1397775362,), (1397775415,), (1397775422,), (1397775423,), (1397775424,), (1397775436,), (1397775437,), (1397775438,), (1397775439,), (1397775441,), (1397775447,), (1397775448,), (1397775449,), (1397775450,), (1397775452,), (1397775463,), (1397775464,), (1397775478,), (1397775479,), (1397775483,), (1397775484,), (1397775486,), (1397775488,), (1397775544,), (1397775546,), (1397775547,), (1397775549,), (1397775551,), (1397775553,), (1397775588,), (1397775593,), (1397775594,), (1397775596,), (1397775598,), (1397775600,), (1397775609,), (1397775614,), (1397775617,), (1397775619,), (1397775621,), (1397775622,), (1397775625,), (1397775627,), (1397775629,), (1397775631,), (1397775633,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04122025': {'nb_upload': 77, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29167848]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] map_info['map_portfolio_photo'] : {29167848: [1397775633, 1397775631, 1397775629, 1397775627, 1397775625, 1397775622, 1397775621, 1397775619, 1397775617, 1397775614, 1397775609, 1397775600, 1397775598, 1397775596, 1397775594, 1397775593, 1397775588, 1397775553, 1397775551, 1397775549, 1397775547, 1397775546, 1397775544, 1397775488, 1397775486, 1397775484, 1397775483, 1397775479, 1397775478, 1397775464, 1397775463, 1397775452, 1397775450, 1397775449, 1397775448, 1397775447, 1397775441, 1397775439, 1397775438, 1397775437, 1397775436, 1397775424, 1397775423, 1397775422, 1397775415, 1397775362, 1397775357, 1397775355, 1397775353, 1397775339, 1397775337, 1397775335, 1397775333, 1397775332, 1397775331, 1397775330, 1397775329, 1397775328, 1397775325, 1397775323, 1397775316, 1397775314, 1397775312, 1397775311, 1397775307, 1397775305, 1397775303, 1397775301, 1397775300, 1397775299, 1397775246, 1397775211, 1397775209, 1397775207, 1397775020, 1397775019, 1397775018]} final : True mtd_id 4302 list_pids : [1397775633, 1397775631, 1397775629, 1397775627, 1397775625] Looping around the photos to save general results len do output : 1 /29167848Didn'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, '4182805') ('4302', '29167848', '1397775633', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775631', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775629', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775627', None, None, None, None, None, '4182805') ('4302', None, None, None, None, None, None, None, '4182805') ('4302', '29167848', '1397775625', None, None, None, None, None, '4182805') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29167848', 'None', None, None, None, None, '4182805'), ('4302', '29167848', '1397775633', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775631', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775629', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775627', None, None, None, None, None, '4182805'), ('4302', '29167848', '1397775625', None, None, None, None, None, '4182805')] time used for this insertion : 0.020711898803710938 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.9171280860900879 time spend to save output : 0.02089691162109375 total time spend for step 5 : 0.9380249977111816 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 (4182805) 1.95user 2.55system 0:11.19elapsed 40%CPU (0avgtext+0avgdata 163564maxresident)k 512inputs+11856outputs (1major+66940minor)pagefaults 0swaps