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 : 4094063 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 (3419465) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3419465) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571522 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3419465'] with mtr_portfolio_ids : ['25571522'] and first list_photo_ids : [] new path : /proc/4094063/ Name: python3 Umask: 0002 State: R (running) Tgid: 4094063 Ngid: 0 Pid: 4094063 PPid: 4094062 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4094063 NSpid: 4094063 NSpgid: 4092970 NSsid: 4092970 VmPeak: 1106860 kB VmSize: 1106860 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100104 kB VmRSS: 100104 kB RssAnon: 59812 kB RssFile: 40292 kB RssShmem: 0 kB VmData: 865612 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 46 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4094063', 'Ngid': '0', 'Pid': '4094063', 'PPid': '4094062', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4094063', 'NSpid': '4094063', 'NSpgid': '4092970', 'NSsid': '4092970', 'VmPeak': '1106860 kB', 'VmSize': '1106860 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100104 kB', 'VmRSS': '100104 kB', 'RssAnon': '59812 kB', 'RssFile': '40292 kB', 'RssShmem': '0 kB', 'VmData': '865612 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '46', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '4094063', '1106860', '0', '1106860', '865612', '100104', b'', 'marlene', '3419465') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (25571522) 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 (3419465 ) ) 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 (25571522) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1374701407, 'portfolio_id': 25571522}, {'photo_id': 1374701372, 'portfolio_id': 25571522}, {'photo_id': 1374701369, 'portfolio_id': 25571522}, {'photo_id': 1374701366, 'portfolio_id': 25571522}, {'photo_id': 1374701343, 'portfolio_id': 25571522}, {'photo_id': 1374701340, 'portfolio_id': 25571522}, {'photo_id': 1374701338, 'portfolio_id': 25571522}, {'photo_id': 1374701336, 'portfolio_id': 25571522}, {'photo_id': 1374701334, 'portfolio_id': 25571522}, {'photo_id': 1374701329, 'portfolio_id': 25571522}, {'photo_id': 1374701327, 'portfolio_id': 25571522}, {'photo_id': 1374701324, 'portfolio_id': 25571522}, {'photo_id': 1374701322, 'portfolio_id': 25571522}, {'photo_id': 1374701320, 'portfolio_id': 25571522}, {'photo_id': 1374701295, 'portfolio_id': 25571522}, {'photo_id': 1374701294, 'portfolio_id': 25571522}, {'photo_id': 1374701289, 'portfolio_id': 25571522}, {'photo_id': 1374701286, 'portfolio_id': 25571522}, {'photo_id': 1374701284, 'portfolio_id': 25571522}, {'photo_id': 1374701281, 'portfolio_id': 25571522}, {'photo_id': 1374701279, 'portfolio_id': 25571522}, {'photo_id': 1374701277, 'portfolio_id': 25571522}, {'photo_id': 1374701254, 'portfolio_id': 25571522}, {'photo_id': 1374701253, 'portfolio_id': 25571522}, {'photo_id': 1374701251, 'portfolio_id': 25571522}, {'photo_id': 1374701250, 'portfolio_id': 25571522}, {'photo_id': 1374701247, 'portfolio_id': 25571522}, {'photo_id': 1374701246, 'portfolio_id': 25571522}, {'photo_id': 1374701244, 'portfolio_id': 25571522}, {'photo_id': 1374701243, 'portfolio_id': 25571522}, {'photo_id': 1374701208, 'portfolio_id': 25571522}, {'photo_id': 1374701206, 'portfolio_id': 25571522}, {'photo_id': 1374701203, 'portfolio_id': 25571522}, {'photo_id': 1374701202, 'portfolio_id': 25571522}, {'photo_id': 1374701200, 'portfolio_id': 25571522}, {'photo_id': 1374701174, 'portfolio_id': 25571522}, {'photo_id': 1374701172, 'portfolio_id': 25571522}, {'photo_id': 1374701170, 'portfolio_id': 25571522}, {'photo_id': 1374701168, 'portfolio_id': 25571522}, {'photo_id': 1374701163, 'portfolio_id': 25571522}, {'photo_id': 1374701161, 'portfolio_id': 25571522}, {'photo_id': 1374701159, 'portfolio_id': 25571522}, {'photo_id': 1374701156, 'portfolio_id': 25571522}, {'photo_id': 1374701153, 'portfolio_id': 25571522}, {'photo_id': 1374701125, 'portfolio_id': 25571522}, {'photo_id': 1374701123, 'portfolio_id': 25571522}, {'photo_id': 1374701120, 'portfolio_id': 25571522}, {'photo_id': 1374701114, 'portfolio_id': 25571522}, {'photo_id': 1374701098, 'portfolio_id': 25571522}, {'photo_id': 1374701081, 'portfolio_id': 25571522}, {'photo_id': 1374700818, 'portfolio_id': 25571522}, {'photo_id': 1374700815, 'portfolio_id': 25571522}, {'photo_id': 1374700811, 'portfolio_id': 25571522}, {'photo_id': 1374700794, 'portfolio_id': 25571522}, {'photo_id': 1374700790, 'portfolio_id': 25571522}, {'photo_id': 1374700786, 'portfolio_id': 25571522}, {'photo_id': 1374700783, 'portfolio_id': 25571522}, {'photo_id': 1374700782, 'portfolio_id': 25571522}, {'photo_id': 1374700666, 'portfolio_id': 25571522}, {'photo_id': 1374700640, 'portfolio_id': 25571522}, {'photo_id': 1374700611, 'portfolio_id': 25571522}, {'photo_id': 1374700587, 'portfolio_id': 25571522}, {'photo_id': 1374700564, 'portfolio_id': 25571522}, {'photo_id': 1374700440, 'portfolio_id': 25571522}, {'photo_id': 1374700415, 'portfolio_id': 25571522}, {'photo_id': 1374700390, 'portfolio_id': 25571522}, {'photo_id': 1374700367, 'portfolio_id': 25571522}, {'photo_id': 1374699922, 'portfolio_id': 25571522}, {'photo_id': 1374699881, 'portfolio_id': 25571522}, {'photo_id': 1374699856, 'portfolio_id': 25571522}] map_portfolio_id_photo_id: {25571522: [1374701407, 1374701372, 1374701369, 1374701366, 1374701343, 1374701340, 1374701338, 1374701336, 1374701334, 1374701329, 1374701327, 1374701324, 1374701322, 1374701320, 1374701295, 1374701294, 1374701289, 1374701286, 1374701284, 1374701281, 1374701279, 1374701277, 1374701254, 1374701253, 1374701251, 1374701250, 1374701247, 1374701246, 1374701244, 1374701243, 1374701208, 1374701206, 1374701203, 1374701202, 1374701200, 1374701174, 1374701172, 1374701170, 1374701168, 1374701163, 1374701161, 1374701159, 1374701156, 1374701153, 1374701125, 1374701123, 1374701120, 1374701114, 1374701098, 1374701081, 1374700818, 1374700815, 1374700811, 1374700794, 1374700790, 1374700786, 1374700783, 1374700782, 1374700666, 1374700640, 1374700611, 1374700587, 1374700564, 1374700440, 1374700415, 1374700390, 1374700367, 1374699922, 1374699881, 1374699856]} ##### 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.0183713436126709 #### 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 Fri Aug 1 02:18:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25571522) 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 : 25571522 get user id for portfolio 25571522 get sub ptf for main ptf 25571522, type 3726 and hashtags ['papier', 'kraft', 'Carton_gris', 'Teint_Dans_La_Masse', 'Carton_brun', 'environnement', 'metal', 'cartonnette', 'plastique', 'autre_refus', 'flou', 'mal_croppe'] 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`=25571522 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','metal','cartonnette','plastique','autre_refus','flou','mal_croppe')) 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`=25571522 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','metal','cartonnette','plastique','autre_refus','flou','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25571522, 'sub_port_id': 25571552, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242911, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'autre_refus': {'main_port_id': 25571522, 'sub_port_id': 25571553, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242912, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'mal_croppe': {'main_port_id': 25571522, 'sub_port_id': 25571554, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242913, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 25571522, 'sub_port_id': 25571555, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242914, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'Carton_brun': {'main_port_id': 25571522, 'sub_port_id': 25571556, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242915, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'Carton_gris': {'main_port_id': 25571522, 'sub_port_id': 25571557, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242916, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'kraft': {'main_port_id': 25571522, 'sub_port_id': 25571558, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242917, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'metal': {'main_port_id': 25571522, 'sub_port_id': 25571559, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242918, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'cartonnette': {'main_port_id': 25571522, 'sub_port_id': 25571560, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242919, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'flou': {'main_port_id': 25571522, 'sub_port_id': 25571561, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242920, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'plastique': {'main_port_id': 25571522, 'sub_port_id': 25571562, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242921, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}, 'environnement': {'main_port_id': 25571522, 'sub_port_id': 25571563, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242922, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25571552 , 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=25571522 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 (25571552) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571553 , 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=25571522 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 (25571553) result : ((1374701235,), (1374701360,), (1374701393,), (1374701394,), (1374701450,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571554 , 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=25571522 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 (25571554) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571555 , 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=25571522 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 (25571555) result : ((1374701134,), (1374701162,), (1374701230,), (1374701231,), (1374701232,), (1374701359,), (1374701385,), (1374701386,), (1374701388,), (1374701389,), (1374701390,), (1374701391,), (1374701446,), (1374701447,), (1374701448,), (1374701449,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571556 , 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=25571522 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 (25571556) result : ((1374701138,), (1374701362,), (1374701395,), (1374701397,), (1374701456,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571557 , 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=25571522 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 (25571557) result : ((1374701135,), (1374701274,), (1374701451,), (1374701453,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571558 , 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=25571522 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 (25571558) result : ((1374701363,), (1374701458,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571559 , 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=25571522 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 (25571559) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571560 , 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=25571522 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 (25571560) result : ((1374701137,), (1374701165,), (1374701166,), (1374701236,), (1374701237,), (1374701361,), (1374701455,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571561 , 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=25571522 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 (25571561) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571562 , 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=25571522 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 (25571562) result : ((1374701139,), (1374701275,), (1374701457,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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 25571563 , 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=25571522 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 (25571563) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25571522) result : ((1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) 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 (1374701200) 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`=25571522 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','metal','cartonnette','plastique','autre_refus','flou','mal_croppe')) 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`=25571522 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','kraft','Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','metal','cartonnette','plastique','autre_refus','flou','mal_croppe')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25571522, 'sub_port_id': 25571564, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242923, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'autre_refus': {'main_port_id': 25571522, 'sub_port_id': 25571565, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242924, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'mal_croppe': {'main_port_id': 25571522, 'sub_port_id': 25571566, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242925, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 25571522, 'sub_port_id': 25571567, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242926, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'Carton_brun': {'main_port_id': 25571522, 'sub_port_id': 25571568, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242927, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'Carton_gris': {'main_port_id': 25571522, 'sub_port_id': 25571569, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242928, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'kraft': {'main_port_id': 25571522, 'sub_port_id': 25571570, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242929, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'metal': {'main_port_id': 25571522, 'sub_port_id': 25571571, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242930, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'cartonnette': {'main_port_id': 25571522, 'sub_port_id': 25571572, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242931, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'flou': {'main_port_id': 25571522, 'sub_port_id': 25571573, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242932, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'plastique': {'main_port_id': 25571522, 'sub_port_id': 25571574, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242933, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}, 'environnement': {'main_port_id': 25571522, 'sub_port_id': 25571575, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17242934, 'last_updated_at': datetime.datetime(2025, 8, 1, 2, 16, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 1, 2, 16, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 1, 2, 3, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571564,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571552 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571565,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571553 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571566,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571554 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571567,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571555 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571568,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571556 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571569,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571557 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571570,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571558 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571571,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571559 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571572,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571560 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571573,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571561 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571574,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571562 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25571575,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25571563 lien utilise dans velours : https://www.fotonower.com/velours/25571564,25571565,25571566,25571567,25571568,25571569,25571570,25571571,25571572,25571573,25571574,25571575?tags=papier,autre_refus,mal_croppe,Teint_Dans_La_Masse,Carton_brun,Carton_gris,kraft,metal,cartonnette,flou,plastique,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25571522]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1374701407] map_info['map_portfolio_photo'] : {25571522: [1374701407, 1374701372, 1374701369, 1374701366, 1374701343, 1374701340, 1374701338, 1374701336, 1374701334, 1374701329, 1374701327, 1374701324, 1374701322, 1374701320, 1374701295, 1374701294, 1374701289, 1374701286, 1374701284, 1374701281, 1374701279, 1374701277, 1374701254, 1374701253, 1374701251, 1374701250, 1374701247, 1374701246, 1374701244, 1374701243, 1374701208, 1374701206, 1374701203, 1374701202, 1374701200, 1374701174, 1374701172, 1374701170, 1374701168, 1374701163, 1374701161, 1374701159, 1374701156, 1374701153, 1374701125, 1374701123, 1374701120, 1374701114, 1374701098, 1374701081, 1374700818, 1374700815, 1374700811, 1374700794, 1374700790, 1374700786, 1374700783, 1374700782, 1374700666, 1374700640, 1374700611, 1374700587, 1374700564, 1374700440, 1374700415, 1374700390, 1374700367, 1374699922, 1374699881, 1374699856]} final : False mtd_id 4302 list_pids : [1374701407] Looping around the photos to save general results len do output : 1 /25571522. 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, '3419465') ('4302', '25571522', '1374701407', None, None, None, None, None, '3419465') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25571522', "{'papier': 25571552, 'autre_refus': 25571553, 'mal_croppe': 25571554, 'Teint_Dans_La_Masse': 25571555, 'Carton_brun': 25571556, 'Carton_gris': 25571557, 'kraft': 25571558, 'metal': 25571559, 'cartonnette': 25571560, 'flou': 25571561, 'plastique': 25571562, 'environnement': 25571563}", None, None, None, None, '3419465'), ('4302', '25571522', '1374701407', None, None, None, None, None, '3419465')] time used for this insertion : 0.011900186538696289 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4781193733215332 time spend to save output : 0.01201629638671875 total time spend for step 1 : 0.49013566970825195 step2:final Fri Aug 1 02:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (25571522) 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 25571522 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1374699922,1374699881,1374699856,1374700440,1374700415,1374700390,1374700367,1374700666,1374700640,1374700611,1374700587,1374700564,1374700794,1374700790,1374700786,1374700783,1374700782,1374700818,1374700815,1374700811,1374701125,1374701123,1374701120,1374701114,1374701098,1374701081,1374701163,1374701161,1374701159,1374701156,1374701153,1374701174,1374701172,1374701170,1374701168,1374701208,1374701206,1374701203,1374701202,1374701200,1374701253,1374701254,1374701250,1374701251,1374701246,1374701247,1374701244,1374701243,1374701295,1374701294,1374701289,1374701286,1374701284,1374701281,1374701279,1374701277,1374701329,1374701327,1374701324,1374701322,1374701320,1374701343,1374701340,1374701338,1374701336,1374701334,1374701372,1374701369,1374701366,1374701407); 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([25571522]) Inside saveOutput : final : False verbose : True original output for save of step final : {1374701407: ('0.05200293561657966',)} new output for save of step final : {1374701407: ('0.05200293561657966',)} [1374701407] map_info['map_portfolio_photo'] : {25571522: [1374701407, 1374701372, 1374701369, 1374701366, 1374701343, 1374701340, 1374701338, 1374701336, 1374701334, 1374701329, 1374701327, 1374701324, 1374701322, 1374701320, 1374701295, 1374701294, 1374701289, 1374701286, 1374701284, 1374701281, 1374701279, 1374701277, 1374701254, 1374701253, 1374701251, 1374701250, 1374701247, 1374701246, 1374701244, 1374701243, 1374701208, 1374701206, 1374701203, 1374701202, 1374701200, 1374701174, 1374701172, 1374701170, 1374701168, 1374701163, 1374701161, 1374701159, 1374701156, 1374701153, 1374701125, 1374701123, 1374701120, 1374701114, 1374701098, 1374701081, 1374700818, 1374700815, 1374700811, 1374700794, 1374700790, 1374700786, 1374700783, 1374700782, 1374700666, 1374700640, 1374700611, 1374700587, 1374700564, 1374700440, 1374700415, 1374700390, 1374700367, 1374699922, 1374699881, 1374699856]} final : False mtd_id 4302 list_pids : [1374701407] Looping around the photos to save general results len do output : 1 /1374701407.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, '3419465') ('4302', '25571522', '1374701407', None, None, None, None, None, '3419465') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25571522', '1374701407', '0.05200293561657966', None, None, None, None, '3419465')] time used for this insertion : 0.014833450317382812 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06801414489746094 time spend to save output : 0.015011072158813477 total time spend for step 2 : 0.08302521705627441 step3:velours_tree Fri Aug 1 02:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25571522: [{'papier': 25571552, 'autre_refus': 25571553, 'mal_croppe': 25571554, 'Teint_Dans_La_Masse': 25571555, 'Carton_brun': 25571556, 'Carton_gris': 25571557, 'kraft': 25571558, 'metal': 25571559, 'cartonnette': 25571560, 'flou': 25571561, 'plastique': 25571562, 'environnement': 25571563}]} input_args_next_step : {25571522: ()} output_args : {25571522: [{'papier': 25571552, 'autre_refus': 25571553, 'mal_croppe': 25571554, 'Teint_Dans_La_Masse': 25571555, 'Carton_brun': 25571556, 'Carton_gris': 25571557, 'kraft': 25571558, 'metal': 25571559, 'cartonnette': 25571560, 'flou': 25571561, 'plastique': 25571562, 'environnement': 25571563}]} args : 25571522 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 25571552, 'autre_refus': 25571553, 'mal_croppe': 25571554, 'Teint_Dans_La_Masse': 25571555, 'Carton_brun': 25571556, 'Carton_gris': 25571557, 'kraft': 25571558, 'metal': 25571559, 'cartonnette': 25571560, 'flou': 25571561, 'plastique': 25571562, 'environnement': 25571563},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25571522) 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([25571522]) 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.29958224296569824 time spend to save output : 6.0558319091796875e-05 total time spend for step 3 : 0.29964280128479004 step4:send_mail_cod Fri Aug 1 02:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1374701407: ('0.05200293561657966',)} input_args_next_step : {1374701407: ()} output_args : {1374701407: ('0.05200293561657966',)} args : 1374701407 depend.output_id : 0 complete output_args for input 3 : {25571522: [{'papier': 25571552, 'autre_refus': 25571553, 'mal_croppe': 25571554, 'Teint_Dans_La_Masse': 25571555, 'Carton_brun': 25571556, 'Carton_gris': 25571557, 'kraft': 25571558, 'metal': 25571559, 'cartonnette': 25571560, 'flou': 25571561, 'plastique': 25571562, 'environnement': 25571563}]} input_args_next_step : {1374701407: ('0.05200293561657966',), 25571522: ()} output_args : {25571522: [{'papier': 25571552, 'autre_refus': 25571553, 'mal_croppe': 25571554, 'Teint_Dans_La_Masse': 25571555, 'Carton_brun': 25571556, 'Carton_gris': 25571557, 'kraft': 25571558, 'metal': 25571559, 'cartonnette': 25571560, 'flou': 25571561, 'plastique': 25571562, 'environnement': 25571563}]} args : 25571522 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :2, first value : ('0.05200293561657966',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25571522) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1374701407) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1374701407 download finish for photo 1374701407 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P25571522_01-08-2025_02_19_00.pdf 25571553 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571553 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374701235: '1754006965_3099827_1374699881_fe5e0f5f6685254009fcd10992af74bb_rle_crop_3900023782_0.png', 1374701360: '1754007267_3113117_1374701161_f0c23afd867ac07f161935bf97dcfce9_rle_crop_3900024425_0.png', 1374701393: '1754007325_3114324_1374701251_b2d9984b4fe7c2b0caefa2a4d8d9cf57_rle_crop_3900024630_0.png', 1374701394: '1754007325_3114324_1374701250_881c69aafd8dacc62ef8dc283128e988_rle_crop_3900024644_0.png', 1374701450: '1754007445_3119353_1374701081_9f628cb72db46940a8673ebdaad64725_rle_crop_3900024949_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/2d5f3c9b5c701781688ebc2523c05734_38839878.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/576eb981014abb24d6d70e788d3710c5_9342680.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/61b85606fbfd97b612ee061ec247b6aa_43694520.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/61b85606fbfd97b612ee061ec247b6aa_62787831.png change filename to text .imagette255715531754007540/ imagette255715531754007540/1754007445_3119353_1374701081_9f628cb72db46940a8673ebdaad64725_rle_crop_3900024949_0.png.png imagette255715531754007540/1754007267_3113117_1374701161_f0c23afd867ac07f161935bf97dcfce9_rle_crop_3900024425_0.png.png imagette255715531754007540/1754007325_3114324_1374701250_881c69aafd8dacc62ef8dc283128e988_rle_crop_3900024644_0.png.png imagette255715531754007540/1754006965_3099827_1374699881_fe5e0f5f6685254009fcd10992af74bb_rle_crop_3900023782_0.png.png imagette255715531754007540/1754007325_3114324_1374701251_b2d9984b4fe7c2b0caefa2a4d8d9cf57_rle_crop_3900024630_0.png.png imagette255715541754007540/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/a02496c97e87bc3304812948b6617d56_91461197.png imagette255715531754007540 25571554 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571554 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255715541754007540 25571558 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571558 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374701363: '1754007267_3113117_1374701161_f0c23afd867ac07f161935bf97dcfce9_rle_crop_3900024426_0.png', 1374701458: '1754007445_3119353_1374701163_d88da820afe2aa8afee4f784ce9b0714_rle_crop_3900024883_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/2811b6d81e43118a5731622b629e1a17_34760009.png change filename to text .imagette255715581754007541/ imagette255715581754007541/1754007267_3113117_1374701161_f0c23afd867ac07f161935bf97dcfce9_rle_crop_3900024426_0.png.png imagette255715581754007541/1754007445_3119353_1374701163_d88da820afe2aa8afee4f784ce9b0714_rle_crop_3900024883_0.png.png imagette255715591754007541/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/a8068311207e4f133942bbf57b2c5e5e_72965568.png imagette255715581754007541 25571559 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571559 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255715591754007541 25571560 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571560 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374701137: '1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023515_0.png', 1374701165: '1754006846_3095110_1374700415_28f7ad11f7e8111499b3b7553aee1cbc_rle_crop_3900023613_0.png', 1374701166: '1754006846_3095110_1374700390_d64906912aad5d68703bfda1685ac1be_rle_crop_3900023630_0.png', 1374701236: '1754006965_3099827_1374700440_acbaf22e4d1566d9745893fbda6058d2_rle_crop_3900023753_0.png', 1374701237: '1754006965_3099827_1374699881_fe5e0f5f6685254009fcd10992af74bb_rle_crop_3900023792_0.png', 1374701361: '1754007267_3113117_1374701159_017628cab0a09fc0b766c5834d2b38ca_rle_crop_3900024441_0.png', 1374701455: '1754007445_3119353_1374701114_623cfa9ac93bbab5d45bc09289ac34d3_rle_crop_3900024928_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/76a8392ed1ad46bfb9af1d0251ef4755_12309371.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/2ad8de2ca27479bfc095476a59ab33c0_21178793.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/a326eb66ec78e0a789b6a2854659da2e_68753788.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/52f8e21ba1b4b784bb20c009a07da77d_39161440.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/ad3f22ea4504fc0d19cc616d98e527ff_64713291.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/4da89e0a92de99262d09ab4994d82592_62723623.png change filename to text .imagette255715601754007541/ imagette255715601754007541/1754006846_3095110_1374700415_28f7ad11f7e8111499b3b7553aee1cbc_rle_crop_3900023613_0.png.png imagette255715601754007541/1754006846_3095110_1374700390_d64906912aad5d68703bfda1685ac1be_rle_crop_3900023630_0.png.png imagette255715601754007541/1754006965_3099827_1374699881_fe5e0f5f6685254009fcd10992af74bb_rle_crop_3900023792_0.png.png imagette255715601754007541/1754006965_3099827_1374700440_acbaf22e4d1566d9745893fbda6058d2_rle_crop_3900023753_0.png.png imagette255715601754007541/1754007267_3113117_1374701159_017628cab0a09fc0b766c5834d2b38ca_rle_crop_3900024441_0.png.png imagette255715601754007541/1754007445_3119353_1374701114_623cfa9ac93bbab5d45bc09289ac34d3_rle_crop_3900024928_0.png.png imagette255715601754007541/1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023515_0.png.png imagette255715611754007541/ wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/1150801a1aeb7f67a18342128d6b6228_34023681.png imagette255715601754007541 25571561 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571561 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255715611754007541 25571562 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571562 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374701139: '1754006787_3093682_1374700564_64550a428d3e2232c46b51db547eb726_rle_crop_3900023547_0.png', 1374701275: '1754007087_3105318_1374701168_a9bad04ea901aff1dd3ec5ca59bc3b4b_rle_crop_3900023946_0.png', 1374701457: '1754007445_3119353_1374701120_50794063d8ced25787d1a28df5a377d3_rle_crop_3900024914_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/231cbbc2a929d4490cd8878fd9495605_7650851.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/4d80a98bfda1d48d6cb2b9f586c1a35f_68342505.png change filename to text .imagette255715621754007541/ imagette255715621754007541/1754007087_3105318_1374701168_a9bad04ea901aff1dd3ec5ca59bc3b4b_rle_crop_3900023946_0.png.png imagette255715621754007541/1754006787_3093682_1374700564_64550a428d3e2232c46b51db547eb726_rle_crop_3900023547_0.png.png imagette255715621754007541/1754007445_3119353_1374701120_50794063d8ced25787d1a28df5a377d3_rle_crop_3900024914_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/fa03045b8f840d0852c144a26145412d_20645174.png imagette255715621754007541 25571555 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571555 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374701134: '1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023517_0.png', 1374701162: '1754006846_3095110_1374700415_28f7ad11f7e8111499b3b7553aee1cbc_rle_crop_3900023616_0.png', 1374701230: '1754006965_3099827_1374700440_acbaf22e4d1566d9745893fbda6058d2_rle_crop_3900023758_0.png', 1374701231: '1754006965_3099827_1374700440_acbaf22e4d1566d9745893fbda6058d2_rle_crop_3900023757_0.png', 1374701232: '1754006965_3099827_1374699922_e05ceff0dd0d262b31c33580d26b191d_rle_crop_3900023769_0.png', 1374701359: '1754007267_3113117_1374701156_9efbb15df0517e71ef1bc199dc2f76ef_rle_crop_3900024455_0.png', 1374701385: '1754007325_3114324_1374701251_b2d9984b4fe7c2b0caefa2a4d8d9cf57_rle_crop_3900024632_0.png', 1374701386: '1754007325_3114324_1374701250_881c69aafd8dacc62ef8dc283128e988_rle_crop_3900024646_0.png', 1374701388: '1754007325_3114324_1374701247_3bbb9fe170a6447e05b6b6ddaccb8cd5_rle_crop_3900024658_0.png', 1374701389: '1754007325_3114324_1374701246_f945ee895900060e5678c5406d074aa4_rle_crop_3900024687_0.png', 1374701390: '1754007325_3114324_1374701244_1630bf7ce0538ee4e1d79e68ce3d1e36_rle_crop_3900024701_0.png', 1374701391: '1754007325_3114324_1374701243_5d4c99f04d655a8ca261a36900f3e832_rle_crop_3900024714_0.png', 1374701446: '1754007445_3119353_1374701123_6509a3c38fb4222a4392ff00445e50b5_rle_crop_3900024894_0.png', 1374701447: '1754007445_3119353_1374701123_6509a3c38fb4222a4392ff00445e50b5_rle_crop_3900024893_0.png', 1374701448: '1754007445_3119353_1374701098_48e3cf23449f962dd95bee1186e78f21_rle_crop_3900024945_0.png', 1374701449: '1754007445_3119353_1374701081_9f628cb72db46940a8673ebdaad64725_rle_crop_3900024951_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/c491c56332414f693635564058e53f68_19782939.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/f0d1f5cc4f63ab24daa27a7edd0de6d6_21962625.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/c8e95a0a00daba2ec7cdc8b0ef9776d1_28296968.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/ff6b933c4dc5086b2434ff96d510a3c8_80103292.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/f9a50900a9c7c757aa8d8293aefde63b_85158867.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/1c5e08fad56743ec8d48baa1600aca01_86941333.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/3640dd5b0801d5f1a97898f201df9267_25870571.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/3640dd5b0801d5f1a97898f201df9267_59829518.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/6cdce6636e3a189a1a87fae136fbe79f_5811426.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/6cdce6636e3a189a1a87fae136fbe79f_4561281.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/4476f7dac44d21f06716eb8a472351e9_20428564.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/4476f7dac44d21f06716eb8a472351e9_16903813.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/7af6e4c072aa715dde5a74d85a365caa_87340612.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/1756a2c6c801b74ea58d217c3b1c9196_12084270.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/d437ca9d72e129b8b6498f17219d9da7_78927599.png change filename to text .imagette255715551754007541/ imagette255715551754007541/1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023517_0.png.png imagette255715551754007541/1754007325_3114324_1374701251_b2d9984b4fe7c2b0caefa2a4d8d9cf57_rle_crop_3900024632_0.png.png imagette255715551754007541/1754007267_3113117_1374701156_9efbb15df0517e71ef1bc199dc2f76ef_rle_crop_3900024455_0.png.png imagette255715551754007541/1754006965_3099827_1374700440_acbaf22e4d1566d9745893fbda6058d2_rle_crop_3900023758_0.png.png imagette255715551754007541/1754007325_3114324_1374701247_3bbb9fe170a6447e05b6b6ddaccb8cd5_rle_crop_3900024658_0.png.png imagette255715551754007541/1754007325_3114324_1374701246_f945ee895900060e5678c5406d074aa4_rle_crop_3900024687_0.png.png imagette255715551754007541/1754006846_3095110_1374700415_28f7ad11f7e8111499b3b7553aee1cbc_rle_crop_3900023616_0.png.png imagette255715551754007541/1754007445_3119353_1374701081_9f628cb72db46940a8673ebdaad64725_rle_crop_3900024951_0.png.png imagette255715551754007541/1754007445_3119353_1374701098_48e3cf23449f962dd95bee1186e78f21_rle_crop_3900024945_0.png.png imagette255715551754007541/1754007325_3114324_1374701243_5d4c99f04d655a8ca261a36900f3e832_rle_crop_3900024714_0.png.png imagette255715551754007541/1754006965_3099827_1374699922_e05ceff0dd0d262b31c33580d26b191d_rle_crop_3900023769_0.png.png imagette255715551754007541/1754007445_3119353_1374701123_6509a3c38fb4222a4392ff00445e50b5_rle_crop_3900024893_0.png.png imagette255715551754007541/1754006965_3099827_1374700440_acbaf22e4d1566d9745893fbda6058d2_rle_crop_3900023757_0.png.png imagette255715551754007541/1754007445_3119353_1374701123_6509a3c38fb4222a4392ff00445e50b5_rle_crop_3900024894_0.png.png imagette255715551754007541/1754007325_3114324_1374701250_881c69aafd8dacc62ef8dc283128e988_rle_crop_3900024646_0.png.png imagette255715551754007541/1754007325_3114324_1374701244_1630bf7ce0538ee4e1d79e68ce3d1e36_rle_crop_3900024701_0.png.png wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/f4b992a3ee6a9992e8ed0d2a5859f0d7_74150280.png imagette255715551754007541 25571556 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571556 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374701138: '1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023519_0.png', 1374701362: '1754007267_3113117_1374701161_f0c23afd867ac07f161935bf97dcfce9_rle_crop_3900024428_0.png', 1374701395: '1754007325_3114324_1374701251_b2d9984b4fe7c2b0caefa2a4d8d9cf57_rle_crop_3900024636_0.png', 1374701397: '1754007325_3114324_1374701250_881c69aafd8dacc62ef8dc283128e988_rle_crop_3900024650_0.png', 1374701456: '1754007445_3119353_1374701114_623cfa9ac93bbab5d45bc09289ac34d3_rle_crop_3900024932_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/5f73ac81365b736c00ef411b7942c16d_12182012.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/1daedf4738c0f6ed23e71f3e546b151e_730396.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/1b4124a9ddcc2e9b6d34cbce98bf9dd1_39073050.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/1b4124a9ddcc2e9b6d34cbce98bf9dd1_15106839.png change filename to text .imagette255715561754007542/ imagette255715561754007542/1754007325_3114324_1374701251_b2d9984b4fe7c2b0caefa2a4d8d9cf57_rle_crop_3900024636_0.png.png imagette255715561754007542/1754007445_3119353_1374701114_623cfa9ac93bbab5d45bc09289ac34d3_rle_crop_3900024932_0.png.png imagette255715561754007542/1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023519_0.png.png imagette255715561754007542/1754007325_3114324_1374701250_881c69aafd8dacc62ef8dc283128e988_rle_crop_3900024650_0.png.png imagette255715561754007542/1754007267_3113117_1374701161_f0c23afd867ac07f161935bf97dcfce9_rle_crop_3900024428_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/e56b81afbed189430f91f7879784b65f_14906241.png imagette255715561754007542 25571557 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571557 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374701135: '1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023514_0.png', 1374701274: '1754007087_3105318_1374701170_3c26f9154ca73753231b89aada9e88e5_rle_crop_3900023939_0.png', 1374701451: '1754007445_3119353_1374701123_6509a3c38fb4222a4392ff00445e50b5_rle_crop_3900024902_0.png', 1374701453: '1754007445_3119353_1374701114_623cfa9ac93bbab5d45bc09289ac34d3_rle_crop_3900024923_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/9daae15cfef6f03ea057a916c03e7672_51595478.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/d28b1fd8d65271f5d147bc7b3a6dadb0_78615586.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/2f8da1ceca8c4c9366d4cd72093e9fd7_91870988.png change filename to text .imagette255715571754007543/ imagette255715571754007543/1754007445_3119353_1374701114_623cfa9ac93bbab5d45bc09289ac34d3_rle_crop_3900024923_0.png.png imagette255715571754007543/1754007087_3105318_1374701170_3c26f9154ca73753231b89aada9e88e5_rle_crop_3900023939_0.png.png imagette255715571754007543/1754006787_3093682_1374700611_3ae9b43399ea2e797a6cf111c1fa7aac_rle_crop_3900023514_0.png.png imagette255715571754007543/1754007445_3119353_1374701123_6509a3c38fb4222a4392ff00445e50b5_rle_crop_3900024902_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/8448f5b8e21be41144b1fbe122386afe_40206543.png imagette255715571754007543 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25571522 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25571564,25571565,25571566,25571567,25571568,25571569,25571570,25571571,25571572,25571573,25571574,25571575?tags=papier,autre_refus,mal_croppe,Teint_Dans_La_Masse,Carton_brun,Carton_gris,kraft,metal,cartonnette,flou,plastique,environnement your option no_mail is active, we will not send the real mail to your client args[1374701407] : ('0.05200293561657966',) no score found for photo 1374701407 We are sending mail with results at report@fotonower.com refus_total : 0.05200293561657966 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571522 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_P25571522_01-08-2025_02_19_00.pdf results_Auto_P25571522_01-08-2025_02_19_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571522_01-08-2025_02_19_00.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','25571522','results_Auto_P25571522_01-08-2025_02_19_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571522_01-08-2025_02_19_00.pdf','pdf','','0.13','0.05200293561657966') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25571522]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1374701407] map_info['map_portfolio_photo'] : {25571522: [1374701407, 1374701372, 1374701369, 1374701366, 1374701343, 1374701340, 1374701338, 1374701336, 1374701334, 1374701329, 1374701327, 1374701324, 1374701322, 1374701320, 1374701295, 1374701294, 1374701289, 1374701286, 1374701284, 1374701281, 1374701279, 1374701277, 1374701254, 1374701253, 1374701251, 1374701250, 1374701247, 1374701246, 1374701244, 1374701243, 1374701208, 1374701206, 1374701203, 1374701202, 1374701200, 1374701174, 1374701172, 1374701170, 1374701168, 1374701163, 1374701161, 1374701159, 1374701156, 1374701153, 1374701125, 1374701123, 1374701120, 1374701114, 1374701098, 1374701081, 1374700818, 1374700815, 1374700811, 1374700794, 1374700790, 1374700786, 1374700783, 1374700782, 1374700666, 1374700640, 1374700611, 1374700587, 1374700564, 1374700440, 1374700415, 1374700390, 1374700367, 1374699922, 1374699881, 1374699856]} final : False mtd_id 4302 list_pids : [1374701407] 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, '3419465') ('4302', '25571522', '1374701407', None, None, None, None, None, '3419465') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25571522', '1374701407', None, None, None, None, None, '3419465')] time used for this insertion : 0.014880180358886719 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.5173168182373047 time spend to save output : 0.015042543411254883 total time spend for step 4 : 3.5323593616485596 step5:split_time_score Fri Aug 1 02:19: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 : ['25571522'] 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 : [('25571522',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25571522) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1374701407: {'path': 'temp/1754007540_4094063_1374701407_b0ba00402365dc13dfadf1cb647a45bb.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 = 25571522; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25571522 group by h (('02', 70),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25571522 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 (25571522) 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 (25571522) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 01082025 25571522 Nombre de photos uploadées : 70 / 23040 (0%) 01082025 25571522 Nombre de photos taguées (types de déchets): 0 / 70 (0%) 01082025 25571522 Nombre de photos taguées (volume) : 0 / 70 (0%) [{'photo_id': 1374699922, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/e05ceff0dd0d262b31c33580d26b191d.jpg', 'username': None, 'uploaded_at': 1754006467, 'text': 'image_01082025_02_00_14_010211m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1374699881, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/fe5e0f5f6685254009fcd10992af74bb.jpg', 'username': None, 'uploaded_at': 1754006467, 'text': 'image_01082025_02_00_25_010136m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1374699856, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/9e1b7f190f71f6ddb9e6ae5418b1b017.jpg', 'username': None, 'uploaded_at': 1754006467, 'text': 'image_01082025_02_00_35_010136m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1374700440, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/1/acbaf22e4d1566d9745893fbda6058d2.jpg', 'username': None, 'uploaded_at': 1754006532, 'text': 'image_01082025_02_00_55_010137m0.jpg 4e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 6.4373016357421875e-06 ?????????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.004117250442504883 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25571522, '2025-08-01' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-08-01' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2042351,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21541309356689453 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= 2042351 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2042351, 'dashboard_run_id': 2049877, 'mtr_portfolio_id': 25567995, 'dashboard_result_id': 13464000, '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_P25567995_01-08-2025_00_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25568034, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25568035, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25568036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25568037, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25568038, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25568039, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25568040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25568041, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25568042, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25568043, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25568044, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25568045, 'pht': 3726}}"}, {'dashboat_entry_day': 2042351, 'dashboard_run_id': 2049877, 'mtr_portfolio_id': 25568659, 'dashboard_result_id': 13464001, '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_P25568659_01-08-2025_00_35_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25568669, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25568670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25568671, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25568672, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25568673, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25568674, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25568675, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25568676, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25568677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25568678, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25568679, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25568680, 'pht': 3726}}"}, {'dashboat_entry_day': 2042351, 'dashboard_run_id': 2049877, 'mtr_portfolio_id': 25569147, 'dashboard_result_id': 13464002, '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_P25569147_01-08-2025_00_48_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25569174, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25569175, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25569176, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25569177, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25569178, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25569179, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25569180, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25569181, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25569182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25569183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25569184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25569185, 'pht': 3726}}"}, {'dashboat_entry_day': 2042351, 'dashboard_run_id': 2049877, 'mtr_portfolio_id': 25569639, 'dashboard_result_id': 13464003, '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_P25569639_01-08-2025_01_02_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25569685, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25569686, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25569687, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25569688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25569689, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25569690, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25569691, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25569692, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25569693, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25569694, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25569695, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25569696, 'pht': 3726}}"}, {'dashboat_entry_day': 2042351, 'dashboard_run_id': 2049877, 'mtr_portfolio_id': 25571011, 'dashboard_result_id': 13464004, '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_P25571011_01-08-2025_01_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571017, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571020, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25571021, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571022, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571024, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571025, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571026, 'pht': 3726}}"}, {'dashboat_entry_day': 2042351, 'dashboard_run_id': 2049877, 'mtr_portfolio_id': 25571213, 'dashboard_result_id': 13464005, '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_P25571213_01-08-2025_02_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571224, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571225, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571226, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571228, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571229, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571232, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571233, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25571235, 'pht': 3726}}"}, {'dashboat_entry_day': 2042351, 'dashboard_run_id': 2049877, 'mtr_portfolio_id': 25571522, 'dashboard_result_id': 13464006, '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_P25571522_01-08-2025_02_14_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25571552, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571553, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571554, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571555, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571556, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571557, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571558, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571559, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571560, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571561, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571562, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571563, '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 = 25567995 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': 3418591, 'mtr_portfolio_id': 25567995, 'created_at': datetime.datetime(2025, 8, 1, 0, 18, 58), 'result': '0.0259186337603348', 'result_long': None, 'result_double': None}] Qualite : 0.0259186337603348 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25567995 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25567995_01-08-2025_00_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25567995 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_P25567995_01-08-2025_00_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25568034, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25568035, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25568036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25568037, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25568038, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25568039, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25568040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25568041, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25568042, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25568043, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25568044, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25568045, 'pht': 3726}}" where mtr_portfolio_id = 25567995 and dashboard_run_id = 2049877 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`=25567995 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13464000, 0.0259186337603348, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25567995_01-08-2025_00_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25568034, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25568035, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25568036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25568037, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25568038, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25568039, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25568040, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25568041, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25568042, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25568043, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25568044, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25568045, '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 = 25568659 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': 3418661, 'mtr_portfolio_id': 25568659, 'created_at': datetime.datetime(2025, 8, 1, 0, 35), 'result': '0.08874996684385152', 'result_long': None, 'result_double': None}] Qualite : 0.08874996684385152 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25568659 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25568659_01-08-2025_00_35_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25568659 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_P25568659_01-08-2025_00_35_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25568669, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25568670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25568671, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25568672, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25568673, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25568674, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25568675, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25568676, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25568677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25568678, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25568679, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25568680, 'pht': 3726}}" where mtr_portfolio_id = 25568659 and dashboard_run_id = 2049877 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`=25568659 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13464001, 0.08874996684385152, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25568659_01-08-2025_00_35_01.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25568669, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25568670, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25568671, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25568672, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25568673, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25568674, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25568675, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25568676, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25568677, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25568678, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25568679, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25568680, '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 = 25569147 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': 3418752, 'mtr_portfolio_id': 25569147, 'created_at': datetime.datetime(2025, 8, 1, 0, 48, 59), 'result': '0.030635034689344375', 'result_long': None, 'result_double': None}] Qualite : 0.030635034689344375 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25569147 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25569147_01-08-2025_00_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25569147 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_P25569147_01-08-2025_00_48_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25569174, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25569175, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25569176, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25569177, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25569178, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25569179, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25569180, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25569181, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25569182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25569183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25569184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25569185, 'pht': 3726}}" where mtr_portfolio_id = 25569147 and dashboard_run_id = 2049877 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`=25569147 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13464002, 0.030635034689344375, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25569147_01-08-2025_00_48_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25569174, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25569175, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25569176, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25569177, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25569178, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25569179, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25569180, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25569181, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25569182, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25569183, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25569184, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25569185, '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 = 25569639 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': 3418847, 'mtr_portfolio_id': 25569639, 'created_at': datetime.datetime(2025, 8, 1, 1, 2, 28), 'result': '0.041123568891179144', 'result_long': None, 'result_double': None}] Qualite : 0.041123568891179144 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25569639 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25569639_01-08-2025_01_02_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25569639 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_P25569639_01-08-2025_01_02_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25569685, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25569686, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25569687, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25569688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25569689, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25569690, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25569691, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25569692, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25569693, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25569694, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25569695, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25569696, 'pht': 3726}}" where mtr_portfolio_id = 25569639 and dashboard_run_id = 2049877 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`=25569639 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13464003, 0.041123568891179144, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25569639_01-08-2025_01_02_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25569685, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25569686, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25569687, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25569688, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25569689, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25569690, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25569691, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25569692, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25569693, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25569694, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25569695, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25569696, '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 = 25571011 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': 3419303, 'mtr_portfolio_id': 25571011, 'created_at': datetime.datetime(2025, 8, 1, 1, 46, 57), 'result': '0.046969635044739486', 'result_long': None, 'result_double': None}] Qualite : 0.046969635044739486 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25571011 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571011_01-08-2025_01_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25571011 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_P25571011_01-08-2025_01_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571017, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571020, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25571021, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571022, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571024, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571025, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571026, 'pht': 3726}}" where mtr_portfolio_id = 25571011 and dashboard_run_id = 2049873 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`=25571011 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13464004, 0.046969635044739486, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571011_01-08-2025_01_46_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571016, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571017, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571018, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571020, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25571021, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571022, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571023, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571024, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571025, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571026, '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 = 25571213 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': 3419344, 'mtr_portfolio_id': 25571213, 'created_at': datetime.datetime(2025, 8, 1, 2, 3), 'result': '0.027668118385493042', 'result_long': None, 'result_double': None}] Qualite : 0.027668118385493042 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25571213 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571213_01-08-2025_02_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25571213 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_P25571213_01-08-2025_02_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571224, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571225, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571226, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571228, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571229, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571232, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571233, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25571235, 'pht': 3726}}" where mtr_portfolio_id = 25571213 and dashboard_run_id = 2049873 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`=25571213 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13464005, 0.027668118385493042, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571213_01-08-2025_02_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571224, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571225, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571226, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571228, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571229, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571231, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571232, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571233, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571234, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25571235, '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 = 25571522 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': 3419465, 'mtr_portfolio_id': 25571522, 'created_at': datetime.datetime(2025, 8, 1, 2, 19), 'result': '0.05200293561657966', 'result_long': None, 'result_double': None}] Qualite : 0.05200293561657966 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25571522 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571522_01-08-2025_02_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25571522 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_P25571522_01-08-2025_02_19_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25571552, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571553, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571554, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571555, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571556, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571557, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571558, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571559, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571560, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571561, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571562, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571563, 'pht': 3726}}" where mtr_portfolio_id = 25571522 and dashboard_run_id = 2049873 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`=25571522 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13464006, 0.05200293561657966, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25571522_01-08-2025_02_19_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25571552, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25571553, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25571554, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25571555, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25571556, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25571557, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25571558, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25571559, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25571560, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25571561, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25571562, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25571563, '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 (25567995,25568659,25569147,25569639,25571011,25571213,25571522) result : ((1374683642,), (1374683684,), (1374683871,), (1374683873,), (1374684117,), (1374684120,), (1374684141,), (1374684171,), (1374684172,), (1374684220,), (1374684302,), (1374684926,), (1374684980,), (1374685070,), (1374685112,), (1374685156,), (1374685168,), (1374685311,), (1374685312,), (1374685313,), (1374685315,), (1374685318,), (1374685478,), (1374685566,), (1374685655,), (1374685749,), (1374685767,), (1374685955,), (1374685957,), (1374685959,), (1374685960,), (1374685973,), (1374685975,), (1374685977,), (1374685978,), (1374685982,), (1374685983,), (1374685991,), (1374685994,), (1374685995,), (1374685996,), (1374685998,), (1374685999,), (1374686012,), (1374686013,), (1374686014,), (1374686015,), (1374686016,), (1374686017,), (1374686098,), (1374686213,), (1374686361,), (1374686454,), (1374686492,), (1374686494,), (1374686963,), (1374686964,), (1374686990,), (1374686992,), (1374687328,), (1374687353,), (1374687358,), (1374687361,), (1374687688,), (1374687617,), (1374687640,), (1374687665,), (1374687746,), (1374687747,), (1374687749,), (1374687767,), (1374687769,), (1374687771,), (1374687775,), (1374687858,), (1374687950,), (1374688660,), (1374688721,), (1374688832,), (1374688869,), (1374688896,), (1374688919,), (1374689313,), (1374689339,), (1374689362,), (1374689384,), (1374689415,), (1374689416,), (1374689440,), (1374689442,), (1374689465,), (1374689466,), (1374689492,), (1374689493,), (1374689518,), (1374689520,), (1374689544,), (1374689548,), (1374689712,), (1374689713,), (1374689716,), (1374689718,), (1374689722,), (1374689747,), (1374689822,), (1374689827,), (1374689851,), (1374689856,), (1374689859,), (1374689861,), (1374689875,), (1374689878,), (1374689880,), (1374689884,), (1374689888,), (1374689891,), (1374689896,), (1374689901,), (1374689902,), (1374689904,), (1374689908,), (1374689911,), (1374689918,), (1374689921,), (1374689923,), (1374689924,), (1374689945,), (1374689948,), (1374689950,), (1374689961,), (1374689962,), (1374690524,), (1374690602,), (1374690789,), (1374690790,), (1374690837,), (1374690838,), (1374690912,), (1374690915,), (1374690939,), (1374691643,), (1374691671,), (1374691688,), (1374690909,), (1374690911,), (1374691250,), (1374691278,), (1374691302,), (1374691325,), (1374691348,), (1374691372,), (1374691471,), (1374691499,), (1374691525,), (1374691551,), (1374691618,), (1374692023,), (1374692097,), (1374692175,), (1374692724,), (1374692730,), (1374692733,), (1374692739,), (1374692761,), (1374692901,), (1374692902,), (1374692905,), (1374692906,), (1374692909,), (1374692910,), (1374692912,), (1374692913,), (1374692960,), (1374692961,), (1374692963,), (1374692964,), (1374692967,), (1374692968,), (1374692989,), (1374692990,), (1374692993,), (1374692994,), (1374692995,), (1374692996,), (1374692997,), (1374692998,), (1374692999,), (1374693000,), (1374693019,), (1374693021,), (1374693023,), (1374693057,), (1374693059,), (1374693061,), (1374693063,), (1374693065,), (1374693110,), (1374693111,), (1374693113,), (1374693115,), (1374693116,), (1374693118,), (1374693137,), (1374693138,), (1374693139,), (1374693140,), (1374693141,), (1374693142,), (1374693146,), (1374693149,), (1374693152,), (1374693153,), (1374693156,), (1374693158,), (1374693161,), (1374693162,), (1374693168,), (1374693170,), (1374693172,), (1374693173,), (1374693178,), (1374693180,), (1374693182,), (1374693184,), (1374693206,), (1374693209,), (1374693211,), (1374693214,), (1374693215,), (1374693217,), (1374693243,), (1374693234,), (1374693236,), (1374693238,), (1374693240,), (1374693241,), (1374693247,), (1374693252,), (1374693255,), (1374693259,), (1374693261,), (1374693280,), (1374693284,), (1374693288,), (1374693291,), (1374693294,), (1374693295,), (1374693313,), (1374693316,), (1374693319,), (1374693320,), (1374693338,), (1374693343,), (1374693365,), (1374693366,), (1374693379,), (1374693380,), (1374693381,), (1374693386,), (1374693388,), (1374693389,), (1374693395,), (1374693398,), (1374693455,), (1374693457,), (1374693459,), (1374693461,), (1374693463,), (1374693465,), (1374693469,), (1374693473,), (1374693479,), (1374693482,), (1374693484,), (1374693486,), (1374693500,), (1374693501,), (1374693503,), (1374693506,), (1374693508,), (1374693542,), (1374693545,), (1374693598,), (1374693623,), (1374693649,), (1374693673,), (1374693698,), (1374693726,), (1374693986,), (1374693992,), (1374693995,), (1374694051,), (1374694057,), (1374694060,), (1374694062,), (1374694065,), (1374694069,), (1374694339,), (1374697551,), (1374697552,), (1374697553,), (1374697555,), (1374697558,), (1374697560,), (1374697579,), (1374697582,), (1374697600,), (1374697603,), (1374697605,), (1374697607,), (1374697629,), (1374697632,), (1374697635,), (1374697637,), (1374697664,), (1374697666,), (1374697669,), (1374697682,), (1374697684,), (1374697686,), (1374697688,), (1374697690,), (1374697719,), (1374697724,), (1374697727,), (1374697730,), (1374697745,), (1374697748,), (1374697750,), (1374697754,), (1374697813,), (1374697815,), (1374697816,), (1374697820,), (1374697824,), (1374697826,), (1374697829,), (1374697845,), (1374697849,), (1374697852,), (1374697854,), (1374697856,), (1374697857,), (1374697860,), (1374697863,), (1374697865,), (1374697868,), (1374697870,), (1374697873,), (1374697878,), (1374697904,), (1374697905,), (1374697908,), (1374697909,), (1374697912,), (1374697913,), (1374697914,), (1374697916,), (1374697917,), (1374697918,), (1374697937,), (1374697939,), (1374697940,), (1374697941,), (1374697942,), (1374697943,), (1374697958,), (1374697946,), (1374697955,), (1374698193,), (1374698220,), (1374698245,), (1374698270,), (1374698298,), (1374698414,), (1374698416,), (1374698418,), (1374698420,), (1374698422,), (1374698441,), (1374698442,), (1374698446,), (1374698447,), (1374698451,), (1374698452,), (1374698453,), (1374698455,), (1374698478,), (1374698480,), (1374698483,), (1374698555,), (1374698556,), (1374698557,), (1374698562,), (1374698565,), (1374698568,), (1374698570,), (1374698572,), (1374698583,), (1374698584,), (1374698586,), (1374698587,), (1374698589,), (1374698590,), (1374698591,), (1374698592,), (1374698593,), (1374698594,), (1374698595,), (1374698596,), (1374698601,), (1374698604,), (1374698607,), (1374698608,), (1374698612,), (1374698614,), (1374698621,), (1374698622,), (1374698639,), (1374698641,), (1374698642,), (1374698644,), (1374698646,), (1374698650,), (1374698652,), (1374698654,), (1374698656,), (1374698659,), (1374698662,), (1374698679,), (1374698683,), (1374698686,), (1374698747,), (1374699497,), (1374699965,), (1374699993,), (1374699856,), (1374699881,), (1374699922,), (1374700367,), (1374700390,), (1374700415,), (1374700440,), (1374700564,), (1374700587,), (1374700611,), (1374700640,), (1374700666,), (1374700782,), (1374700783,), (1374700786,), (1374700790,), (1374700794,), (1374700811,), (1374700815,), (1374700818,), (1374701081,), (1374701098,), (1374701114,), (1374701120,), (1374701123,), (1374701125,), (1374701153,), (1374701156,), (1374701159,), (1374701161,), (1374701163,), (1374701168,), (1374701170,), (1374701172,), (1374701174,), (1374701200,), (1374701202,), (1374701203,), (1374701206,), (1374701208,), (1374701243,), (1374701244,), (1374701246,), (1374701247,), (1374701250,), (1374701251,), (1374701253,), (1374701254,), (1374701277,), (1374701279,), (1374701281,), (1374701284,), (1374701286,), (1374701289,), (1374701294,), (1374701295,), (1374701320,), (1374701322,), (1374701324,), (1374701327,), (1374701329,), (1374701334,), (1374701336,), (1374701338,), (1374701340,), (1374701343,), (1374701366,), (1374701369,), (1374701372,), (1374701407,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01082025': {'nb_upload': 70, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25571522]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1374701407] map_info['map_portfolio_photo'] : {25571522: [1374701407, 1374701372, 1374701369, 1374701366, 1374701343, 1374701340, 1374701338, 1374701336, 1374701334, 1374701329, 1374701327, 1374701324, 1374701322, 1374701320, 1374701295, 1374701294, 1374701289, 1374701286, 1374701284, 1374701281, 1374701279, 1374701277, 1374701254, 1374701253, 1374701251, 1374701250, 1374701247, 1374701246, 1374701244, 1374701243, 1374701208, 1374701206, 1374701203, 1374701202, 1374701200, 1374701174, 1374701172, 1374701170, 1374701168, 1374701163, 1374701161, 1374701159, 1374701156, 1374701153, 1374701125, 1374701123, 1374701120, 1374701114, 1374701098, 1374701081, 1374700818, 1374700815, 1374700811, 1374700794, 1374700790, 1374700786, 1374700783, 1374700782, 1374700666, 1374700640, 1374700611, 1374700587, 1374700564, 1374700440, 1374700415, 1374700390, 1374700367, 1374699922, 1374699881, 1374699856]} final : True mtd_id 4302 list_pids : [1374701407] Looping around the photos to save general results len do output : 1 /25571522Didn'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, '3419465') ('4302', '25571522', '1374701407', None, None, None, None, None, '3419465') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25571522', 'None', None, None, None, None, '3419465'), ('4302', '25571522', '1374701407', None, None, None, None, None, '3419465')] time used for this insertion : 0.01179051399230957 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6890325546264648 time spend to save output : 0.011945009231567383 total time spend for step 5 : 0.7009775638580322 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 (3419465) 1.82user 2.37system 0:09.36elapsed 44%CPU (0avgtext+0avgdata 157552maxresident)k 32inputs+5912outputs (0major+61778minor)pagefaults 0swaps