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 : 1293870 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 (4266155) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4266155) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670856 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4266155'] with mtr_portfolio_ids : ['29670856'] and first list_photo_ids : [] new path : /proc/1293870/ Name: python3 Umask: 0002 State: R (running) Tgid: 1293870 Ngid: 0 Pid: 1293870 PPid: 1293869 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1293870 NSpid: 1293870 NSpgid: 1293328 NSsid: 1293328 VmPeak: 1113364 kB VmSize: 1113364 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 103932 kB VmRSS: 103932 kB RssAnon: 66288 kB RssFile: 37644 kB RssShmem: 0 kB VmData: 872092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 47 nonvoluntary_ctxt_switches: 86 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1293870', 'Ngid': '0', 'Pid': '1293870', 'PPid': '1293869', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1293870', 'NSpid': '1293870', 'NSpgid': '1293328', 'NSsid': '1293328', 'VmPeak': '1113364 kB', 'VmSize': '1113364 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '103932 kB', 'VmRSS': '103932 kB', 'RssAnon': '66288 kB', 'RssFile': '37644 kB', 'RssShmem': '0 kB', 'VmData': '872092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '47', 'nonvoluntary_ctxt_switches': '86'} ('datou_batch_current', '1293870', '1113364', '0', '1113364', '872092', '103932', b'', 'marlene', '4266155') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29670856) 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 (4266155 ) ) 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 (29670856) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1400766756, 'portfolio_id': 29670856}, {'photo_id': 1400766752, 'portfolio_id': 29670856}, {'photo_id': 1400766748, 'portfolio_id': 29670856}, {'photo_id': 1400766744, 'portfolio_id': 29670856}, {'photo_id': 1400766741, 'portfolio_id': 29670856}, {'photo_id': 1400766738, 'portfolio_id': 29670856}, {'photo_id': 1400766702, 'portfolio_id': 29670856}, {'photo_id': 1400766698, 'portfolio_id': 29670856}, {'photo_id': 1400766695, 'portfolio_id': 29670856}, {'photo_id': 1400766692, 'portfolio_id': 29670856}, {'photo_id': 1400766684, 'portfolio_id': 29670856}, {'photo_id': 1400766681, 'portfolio_id': 29670856}, {'photo_id': 1400766678, 'portfolio_id': 29670856}, {'photo_id': 1400766676, 'portfolio_id': 29670856}, {'photo_id': 1400766673, 'portfolio_id': 29670856}, {'photo_id': 1400766670, 'portfolio_id': 29670856}, {'photo_id': 1400766654, 'portfolio_id': 29670856}, {'photo_id': 1400766651, 'portfolio_id': 29670856}, {'photo_id': 1400766648, 'portfolio_id': 29670856}, {'photo_id': 1400766644, 'portfolio_id': 29670856}, {'photo_id': 1400766640, 'portfolio_id': 29670856}, {'photo_id': 1400766636, 'portfolio_id': 29670856}, {'photo_id': 1400766632, 'portfolio_id': 29670856}, {'photo_id': 1400766610, 'portfolio_id': 29670856}, {'photo_id': 1400766607, 'portfolio_id': 29670856}, {'photo_id': 1400766604, 'portfolio_id': 29670856}, {'photo_id': 1400766601, 'portfolio_id': 29670856}, {'photo_id': 1400766574, 'portfolio_id': 29670856}, {'photo_id': 1400766571, 'portfolio_id': 29670856}, {'photo_id': 1400766569, 'portfolio_id': 29670856}, {'photo_id': 1400766567, 'portfolio_id': 29670856}, {'photo_id': 1400766551, 'portfolio_id': 29670856}, {'photo_id': 1400766548, 'portfolio_id': 29670856}, {'photo_id': 1400766544, 'portfolio_id': 29670856}, {'photo_id': 1400766521, 'portfolio_id': 29670856}, {'photo_id': 1400766519, 'portfolio_id': 29670856}, {'photo_id': 1400766515, 'portfolio_id': 29670856}, {'photo_id': 1400766509, 'portfolio_id': 29670856}, {'photo_id': 1400766504, 'portfolio_id': 29670856}, {'photo_id': 1400766500, 'portfolio_id': 29670856}, {'photo_id': 1400766481, 'portfolio_id': 29670856}, {'photo_id': 1400766479, 'portfolio_id': 29670856}, {'photo_id': 1400766477, 'portfolio_id': 29670856}, {'photo_id': 1400766453, 'portfolio_id': 29670856}, {'photo_id': 1400766449, 'portfolio_id': 29670856}, {'photo_id': 1400766445, 'portfolio_id': 29670856}, {'photo_id': 1400766441, 'portfolio_id': 29670856}, {'photo_id': 1400766415, 'portfolio_id': 29670856}, {'photo_id': 1400766412, 'portfolio_id': 29670856}, {'photo_id': 1400766402, 'portfolio_id': 29670856}, {'photo_id': 1400766381, 'portfolio_id': 29670856}, {'photo_id': 1400766377, 'portfolio_id': 29670856}, {'photo_id': 1400766375, 'portfolio_id': 29670856}, {'photo_id': 1400766373, 'portfolio_id': 29670856}, {'photo_id': 1400766355, 'portfolio_id': 29670856}, {'photo_id': 1400766347, 'portfolio_id': 29670856}, {'photo_id': 1400766340, 'portfolio_id': 29670856}] map_portfolio_id_photo_id: {29670856: [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738, 1400766702, 1400766698, 1400766695, 1400766692, 1400766684, 1400766681, 1400766678, 1400766676, 1400766673, 1400766670, 1400766654, 1400766651, 1400766648, 1400766644, 1400766640, 1400766636, 1400766632, 1400766610, 1400766607, 1400766604, 1400766601, 1400766574, 1400766571, 1400766569, 1400766567, 1400766551, 1400766548, 1400766544, 1400766521, 1400766519, 1400766515, 1400766509, 1400766504, 1400766500, 1400766481, 1400766479, 1400766477, 1400766453, 1400766449, 1400766445, 1400766441, 1400766415, 1400766412, 1400766402, 1400766381, 1400766377, 1400766375, 1400766373, 1400766355, 1400766347, 1400766340]} ##### 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.05743718147277832 #### 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 Wed Dec 24 01:59:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29670856) 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 : 29670856 get user id for portfolio 29670856 get sub ptf for main ptf 29670856, type 3726 and hashtags ['mal_croppe', 'papier', 'Carton_brun', 'autre_refus', 'flou', 'Teint_Dans_La_Masse', 'Carton_gris', 'plastique', 'environnement', 'cartonnette', 'metal', 'kraft'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29670856 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_brun','autre_refus','flou','Teint_Dans_La_Masse','Carton_gris','plastique','environnement','cartonnette','metal','kraft')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29670856 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_brun','autre_refus','flou','Teint_Dans_La_Masse','Carton_gris','plastique','environnement','cartonnette','metal','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 29670856, 'sub_port_id': 29670861, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264903, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'Carton_gris': {'main_port_id': 29670856, 'sub_port_id': 29670862, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264904, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'environnement': {'main_port_id': 29670856, 'sub_port_id': 29670863, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264905, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'cartonnette': {'main_port_id': 29670856, 'sub_port_id': 29670864, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264906, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'metal': {'main_port_id': 29670856, 'sub_port_id': 29670865, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264907, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'flou': {'main_port_id': 29670856, 'sub_port_id': 29670866, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264908, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'papier': {'main_port_id': 29670856, 'sub_port_id': 29670867, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264909, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'mal_croppe': {'main_port_id': 29670856, 'sub_port_id': 29670868, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264910, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'Carton_brun': {'main_port_id': 29670856, 'sub_port_id': 29670869, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264911, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'autre_refus': {'main_port_id': 29670856, 'sub_port_id': 29670870, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264912, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'kraft': {'main_port_id': 29670856, 'sub_port_id': 29670871, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264913, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}, 'plastique': {'main_port_id': 29670856, 'sub_port_id': 29670872, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264914, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 31)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29670861 , 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=29670856 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 (29670861) result : ((1400766583,), (1400766595,), (1400766656,), (1400766713,), (1400766714,), (1400766715,), (1400766716,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670862 , 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=29670856 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 (29670862) result : ((1400766536,), (1400766537,), (1400766585,), (1400766586,), (1400766659,), (1400766660,), (1400766717,), (1400766718,), (1400766773,), (1400766775,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670863 , 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=29670856 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 (29670863) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670864 , 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=29670856 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 (29670864) result : ((1400766540,), (1400766589,), (1400766649,), (1400766661,), (1400766720,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670865 , 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=29670856 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 (29670865) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670866 , 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=29670856 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 (29670866) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670867 , 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=29670856 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 (29670867) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670868 , 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=29670856 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 (29670868) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670869 , 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=29670856 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 (29670869) result : ((1400766541,), (1400766542,), (1400766590,), (1400766591,), (1400766596,), (1400766597,), (1400766598,), (1400766662,), (1400766665,), (1400766721,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670870 , 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=29670856 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 (29670870) result : ((1400766533,), (1400766534,), (1400766584,), (1400766657,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670871 , 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=29670856 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 (29670871) result : ((1400766722,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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 29670872 , 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=29670856 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 (29670872) result : ((1400766650,), (1400766781,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29670856) result : ((1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) 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 (1400766500) 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`=29670856 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_brun','autre_refus','flou','Teint_Dans_La_Masse','Carton_gris','plastique','environnement','cartonnette','metal','kraft')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29670856 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('mal_croppe','papier','Carton_brun','autre_refus','flou','Teint_Dans_La_Masse','Carton_gris','plastique','environnement','cartonnette','metal','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 29670856, 'sub_port_id': 29670877, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264915, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'Carton_gris': {'main_port_id': 29670856, 'sub_port_id': 29670878, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264916, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'environnement': {'main_port_id': 29670856, 'sub_port_id': 29670880, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264917, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'cartonnette': {'main_port_id': 29670856, 'sub_port_id': 29670881, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264918, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'metal': {'main_port_id': 29670856, 'sub_port_id': 29670883, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264919, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'flou': {'main_port_id': 29670856, 'sub_port_id': 29670885, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264920, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'papier': {'main_port_id': 29670856, 'sub_port_id': 29670886, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264921, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'mal_croppe': {'main_port_id': 29670856, 'sub_port_id': 29670888, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264922, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'Carton_brun': {'main_port_id': 29670856, 'sub_port_id': 29670889, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264923, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'autre_refus': {'main_port_id': 29670856, 'sub_port_id': 29670891, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264924, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'kraft': {'main_port_id': 29670856, 'sub_port_id': 29670892, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264925, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 47, 36), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}, 'plastique': {'main_port_id': 29670856, 'sub_port_id': 29670894, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20264926, 'last_updated_at': datetime.datetime(2025, 12, 24, 1, 58, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 24, 1, 58, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 24, 1, 47, 36)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670877,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670861 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670878,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670862 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670880,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670863 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670881,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670864 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670883,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670865 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670885,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670866 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670886,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670867 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670888,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670868 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670889,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670869 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670891,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670870 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670892,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670871 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29670894,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29670872 lien utilise dans velours : https://marlene.fotonower.com/velours/29670877,29670878,29670880,29670881,29670883,29670885,29670886,29670888,29670889,29670891,29670892,29670894?tags=Teint_Dans_La_Masse,Carton_gris,environnement,cartonnette,metal,flou,papier,mal_croppe,Carton_brun,autre_refus,kraft,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29670856]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] map_info['map_portfolio_photo'] : {29670856: [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738, 1400766702, 1400766698, 1400766695, 1400766692, 1400766684, 1400766681, 1400766678, 1400766676, 1400766673, 1400766670, 1400766654, 1400766651, 1400766648, 1400766644, 1400766640, 1400766636, 1400766632, 1400766610, 1400766607, 1400766604, 1400766601, 1400766574, 1400766571, 1400766569, 1400766567, 1400766551, 1400766548, 1400766544, 1400766521, 1400766519, 1400766515, 1400766509, 1400766504, 1400766500, 1400766481, 1400766479, 1400766477, 1400766453, 1400766449, 1400766445, 1400766441, 1400766415, 1400766412, 1400766402, 1400766381, 1400766377, 1400766375, 1400766373, 1400766355, 1400766347, 1400766340]} final : False mtd_id 4302 list_pids : [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] Looping around the photos to save general results len do output : 1 /29670856. 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, '4266155') ('4302', '29670856', '1400766756', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766752', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766748', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766744', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766741', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766738', None, None, None, None, None, '4266155') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29670856', "{'Teint_Dans_La_Masse': 29670861, 'Carton_gris': 29670862, 'environnement': 29670863, 'cartonnette': 29670864, 'metal': 29670865, 'flou': 29670866, 'papier': 29670867, 'mal_croppe': 29670868, 'Carton_brun': 29670869, 'autre_refus': 29670870, 'kraft': 29670871, 'plastique': 29670872}", None, None, None, None, '4266155'), ('4302', '29670856', '1400766756', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766752', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766748', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766744', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766741', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766738', None, None, None, None, None, '4266155')] time used for this insertion : 0.032216548919677734 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.551506519317627 time spend to save output : 0.03249001502990723 total time spend for step 1 : 1.5839965343475342 step2:final Wed Dec 24 01:59:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29670856) 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 29670856 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1400766355,1400766347,1400766340,1400766381,1400766377,1400766375,1400766373,1400766415,1400766412,1400766402,1400766453,1400766449,1400766445,1400766441,1400766481,1400766479,1400766477,1400766521,1400766519,1400766515,1400766509,1400766504,1400766500,1400766551,1400766548,1400766544,1400766574,1400766571,1400766569,1400766567,1400766610,1400766654,1400766607,1400766651,1400766604,1400766648,1400766644,1400766601,1400766640,1400766636,1400766632,1400766684,1400766681,1400766678,1400766676,1400766673,1400766670,1400766702,1400766698,1400766695,1400766692,1400766756,1400766752,1400766748,1400766744,1400766741,1400766738); 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([29670856]) Inside saveOutput : final : False verbose : True original output for save of step final : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} new output for save of step final : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] map_info['map_portfolio_photo'] : {29670856: [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738, 1400766702, 1400766698, 1400766695, 1400766692, 1400766684, 1400766681, 1400766678, 1400766676, 1400766673, 1400766670, 1400766654, 1400766651, 1400766648, 1400766644, 1400766640, 1400766636, 1400766632, 1400766610, 1400766607, 1400766604, 1400766601, 1400766574, 1400766571, 1400766569, 1400766567, 1400766551, 1400766548, 1400766544, 1400766521, 1400766519, 1400766515, 1400766509, 1400766504, 1400766500, 1400766481, 1400766479, 1400766477, 1400766453, 1400766449, 1400766445, 1400766441, 1400766415, 1400766412, 1400766402, 1400766381, 1400766377, 1400766375, 1400766373, 1400766355, 1400766347, 1400766340]} final : False mtd_id 4302 list_pids : [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] Looping around the photos to save general results len do output : 6 /1400766756.Didn't retrieve data . /1400766752.Didn't retrieve data . /1400766748.Didn't retrieve data . /1400766744.Didn't retrieve data . /1400766741.Didn't retrieve data . /1400766738.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, '4266155') ('4302', '29670856', '1400766756', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766752', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766748', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766744', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766741', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766738', None, None, None, None, None, '4266155') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29670856', '1400766756', '0.07877731531714857', None, None, None, None, '4266155'), ('4302', '29670856', '1400766752', '0.07877731531714857', None, None, None, None, '4266155'), ('4302', '29670856', '1400766748', '0.07877731531714857', None, None, None, None, '4266155'), ('4302', '29670856', '1400766744', '0.07877731531714857', None, None, None, None, '4266155'), ('4302', '29670856', '1400766741', '0.07877731531714857', None, None, None, None, '4266155'), ('4302', '29670856', '1400766738', '0.07877731531714857', None, None, None, None, '4266155')] time used for this insertion : 0.03194546699523926 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.18449163436889648 time spend to save output : 0.032283782958984375 total time spend for step 2 : 0.21677541732788086 step3:velours_tree Wed Dec 24 01:59:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {29670856: [{'Teint_Dans_La_Masse': 29670861, 'Carton_gris': 29670862, 'environnement': 29670863, 'cartonnette': 29670864, 'metal': 29670865, 'flou': 29670866, 'papier': 29670867, 'mal_croppe': 29670868, 'Carton_brun': 29670869, 'autre_refus': 29670870, 'kraft': 29670871, 'plastique': 29670872}]} input_args_next_step : {29670856: ()} output_args : {29670856: [{'Teint_Dans_La_Masse': 29670861, 'Carton_gris': 29670862, 'environnement': 29670863, 'cartonnette': 29670864, 'metal': 29670865, 'flou': 29670866, 'papier': 29670867, 'mal_croppe': 29670868, 'Carton_brun': 29670869, 'autre_refus': 29670870, 'kraft': 29670871, 'plastique': 29670872}]} args : 29670856 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 : ({'Teint_Dans_La_Masse': 29670861, 'Carton_gris': 29670862, 'environnement': 29670863, 'cartonnette': 29670864, 'metal': 29670865, 'flou': 29670866, 'papier': 29670867, 'mal_croppe': 29670868, 'Carton_brun': 29670869, 'autre_refus': 29670870, 'kraft': 29670871, 'plastique': 29670872},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29670856) 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([29670856]) 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.24668335914611816 time spend to save output : 4.863739013671875e-05 total time spend for step 3 : 0.24673199653625488 step4:send_mail_cod Wed Dec 24 01:59:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} input_args_next_step : {1400766756: ()} output_args : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} args : 1400766756 depend.output_id : 0 input_args_next_step : {1400766756: ('0.07877731531714857',), 1400766752: ()} output_args : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} args : 1400766752 depend.output_id : 0 input_args_next_step : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ()} output_args : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} args : 1400766748 depend.output_id : 0 input_args_next_step : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ()} output_args : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} args : 1400766744 depend.output_id : 0 input_args_next_step : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ()} output_args : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} args : 1400766741 depend.output_id : 0 input_args_next_step : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ()} output_args : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',)} args : 1400766738 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {29670856: [{'Teint_Dans_La_Masse': 29670861, 'Carton_gris': 29670862, 'environnement': 29670863, 'cartonnette': 29670864, 'metal': 29670865, 'flou': 29670866, 'papier': 29670867, 'mal_croppe': 29670868, 'Carton_brun': 29670869, 'autre_refus': 29670870, 'kraft': 29670871, 'plastique': 29670872}]} input_args_next_step : {1400766756: ('0.07877731531714857',), 1400766752: ('0.07877731531714857',), 1400766748: ('0.07877731531714857',), 1400766744: ('0.07877731531714857',), 1400766741: ('0.07877731531714857',), 1400766738: ('0.07877731531714857',), 29670856: ()} output_args : {29670856: [{'Teint_Dans_La_Masse': 29670861, 'Carton_gris': 29670862, 'environnement': 29670863, 'cartonnette': 29670864, 'metal': 29670865, 'flou': 29670866, 'papier': 29670867, 'mal_croppe': 29670868, 'Carton_brun': 29670869, 'autre_refus': 29670870, 'kraft': 29670871, 'plastique': 29670872}]} args : 29670856 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :7, first value : ('0.07877731531714857',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29670856) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1400766756,1400766752,1400766748,1400766744,1400766741,1400766738) Found this number of photos: 6 ##### Call download_photos : nb_thread : 5 begin to download photo : 1400766738 begin to download photo : 1400766744 begin to download photo : 1400766752 download finish for photo 1400766752 begin to download photo : 1400766756 download finish for photo 1400766738 begin to download photo : 1400766741 download finish for photo 1400766744 begin to download photo : 1400766748 download finish for photo 1400766756 download finish for photo 1400766741 download finish for photo 1400766748 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 6 ; length of list_pids : 6 ; length of list_args : 6 results_Auto_P29670856_24-12-2025_01_59_59.pdf 29670864 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670864 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400766540: '1766537487_3487974_1400766373_5f4b9fbe23408a32f4f901965779db2b_rle_crop_4079630395_0.png', 1400766589: '1766537585_3493194_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630477_0.png', 1400766649: '1766537707_3498669_1400766544_51ad942ec2c9191d271908460882bc9d_rle_crop_4079630605_0.png', 1400766661: '1766537727_3499086_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630477_0.png', 1400766720: '1766537828_3504145_1400766569_406be4d5a34f54db564d3d714281783f_rle_crop_4079630882_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/304d730af75e84f47fc2470bafc5f076_62572950.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/46bf104d025eed22f35616f4a3b67483_57419424.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/073291791277680c51da66a4ea12fbc8_78790.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/46bf104d025eed22f35616f4a3b67483_70312842.png change filename to text .imagette296708641766537999/ imagette296708641766537999/1766537585_3493194_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630477_0.png.png imagette296708641766537999/1766537487_3487974_1400766373_5f4b9fbe23408a32f4f901965779db2b_rle_crop_4079630395_0.png.png imagette296708641766537999/1766537727_3499086_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630477_0.png.png imagette296708641766537999/1766537828_3504145_1400766569_406be4d5a34f54db564d3d714281783f_rle_crop_4079630882_0.png.png imagette296708641766537999/1766537707_3498669_1400766544_51ad942ec2c9191d271908460882bc9d_rle_crop_4079630605_0.png.png imagette296708651766538000/ imagette296708661766538000/ imagette296708681766538000/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/f211b0e244fce4856e1fa22d607803d2_73761441.png imagette296708641766537999 29670865 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670865 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette296708651766538000 29670866 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670866 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette296708661766538000 29670868 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670868 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette296708681766538000 29670870 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670870 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400766533: '1766537487_3487974_1400766377_920ed6bfcf1c0622c068491e3825b17d_rle_crop_4079630357_0.png', 1400766534: '1766537487_3487974_1400766375_39f0e01936ad4e54a32c5e84523ae1fd_rle_crop_4079630372_0.png', 1400766584: '1766537585_3493194_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630473_0.png', 1400766657: '1766537727_3499086_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630473_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/df0b565c04c5010cfe2827084de87a5c_21560794.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/5ad450495001cc9cc0f80e807dec580a_79500687.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/1585c9fadd554629291451f4d6eb2e1a_72791548.png change filename to text .imagette296708701766538000/ imagette296708701766538000/1766537727_3499086_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630473_0.png.png imagette296708701766538000/1766537487_3487974_1400766377_920ed6bfcf1c0622c068491e3825b17d_rle_crop_4079630357_0.png.png imagette296708701766538000/1766537585_3493194_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630473_0.png.png imagette296708701766538000/1766537487_3487974_1400766375_39f0e01936ad4e54a32c5e84523ae1fd_rle_crop_4079630372_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/1585c9fadd554629291451f4d6eb2e1a_13613307.png imagette296708701766538000 29670871 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670871 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400766722: '1766537828_3504145_1400766569_406be4d5a34f54db564d3d714281783f_rle_crop_4079630883_0.png'} change filename to text .imagette296708711766538000/ imagette296708711766538000/1766537828_3504145_1400766569_406be4d5a34f54db564d3d714281783f_rle_crop_4079630883_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/9947da59138361543ac7d1430a92cf1b_53543936.png imagette296708711766538000 29670872 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670872 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400766650: '1766537707_3498669_1400766544_51ad942ec2c9191d271908460882bc9d_rle_crop_4079630607_0.png', 1400766781: '1766537948_3507834_1400766636_9cc72e7a49a924dd7bbfef4831e10392_rle_crop_4079639072_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/8eada7b1f1990930b3c15dd6062f3631_81507546.png change filename to text .imagette296708721766538000/ imagette296708721766538000/1766537707_3498669_1400766544_51ad942ec2c9191d271908460882bc9d_rle_crop_4079630607_0.png.png imagette296708721766538000/1766537948_3507834_1400766636_9cc72e7a49a924dd7bbfef4831e10392_rle_crop_4079639072_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/1f4932f6f2360f1c4aad92554ee65246_45402551.png imagette296708721766538000 29670861 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670861 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400766583: '1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630495_0.png', 1400766595: '1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630561_0.png', 1400766656: '1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630495_0.png', 1400766713: '1766537828_3504145_1400766571_d961ab11664803e0fbebc9f7df1ae8af_rle_crop_4079630873_0.png', 1400766714: '1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630900_0.png', 1400766715: '1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630895_0.png', 1400766716: '1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630896_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/6d30152024e79820548a779180f98e9a_58767414.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/960ec5414b59ba4314ec0f200f2f9cee_79179445.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/6d30152024e79820548a779180f98e9a_80287193.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/2134979b95cbbae096154288c40273c3_79782983.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/73182e02b25a126d5405d8c713741d6d_98336479.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/d64e111d9201c2cc4169d239156e1f0c_64281813.png change filename to text .imagette296708611766538000/ imagette296708611766538000/1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630896_0.png.png imagette296708611766538000/1766537828_3504145_1400766571_d961ab11664803e0fbebc9f7df1ae8af_rle_crop_4079630873_0.png.png imagette296708611766538000/1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630495_0.png.png imagette296708611766538000/1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630900_0.png.png imagette296708611766538000/1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630895_0.png.png imagette296708611766538000/1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630561_0.png.png imagette296708611766538000/1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630495_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/76fc39cfc3ff18ea19da3dc5c095f800_90696228.png imagette296708611766538000 29670862 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670862 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400766536: '1766537487_3487974_1400766373_5f4b9fbe23408a32f4f901965779db2b_rle_crop_4079630398_0.png', 1400766537: '1766537487_3487974_1400766373_5f4b9fbe23408a32f4f901965779db2b_rle_crop_4079630386_0.png', 1400766585: '1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630491_0.png', 1400766586: '1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630498_0.png', 1400766659: '1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630491_0.png', 1400766660: '1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630498_0.png', 1400766717: '1766537828_3504145_1400766569_406be4d5a34f54db564d3d714281783f_rle_crop_4079630880_0.png', 1400766718: '1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630892_0.png', 1400766773: '1766537948_3507834_1400766636_9cc72e7a49a924dd7bbfef4831e10392_rle_crop_4079639074_0.png', 1400766775: '1766537948_3507834_1400766632_b708c05652b83e42e29c2072dbf9b489_rle_crop_4079639087_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/bab1e12914cafc993f05f90295277b36_654515.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/f6e27119279820cc53940e527b467db8_86605623.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/e83c7890a85f6f26eecc46caf05f3c9c_31860956.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/911a7a7744ffb24116f7aca0af5fc10f_69310735.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/e83c7890a85f6f26eecc46caf05f3c9c_93353966.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/911a7a7744ffb24116f7aca0af5fc10f_82204098.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/36d7bf67b52f315484b7a988fd25f9bf_5249286.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/ae579d8b03c5fbb272ef33d48f5990bd_1594511.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/2056557cf62bea3278255dc05aa5c84a_33644401.png change filename to text .imagette296708621766538001/ imagette296708621766538001/1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630498_0.png.png imagette296708621766538001/1766537948_3507834_1400766636_9cc72e7a49a924dd7bbfef4831e10392_rle_crop_4079639074_0.png.png imagette296708621766538001/1766537828_3504145_1400766569_406be4d5a34f54db564d3d714281783f_rle_crop_4079630880_0.png.png imagette296708621766538001/1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630498_0.png.png imagette296708621766538001/1766537487_3487974_1400766373_5f4b9fbe23408a32f4f901965779db2b_rle_crop_4079630398_0.png.png imagette296708621766538001/1766537828_3504145_1400766567_2bc7a532163e8283ea34c54666acb169_rle_crop_4079630892_0.png.png imagette296708621766538001/1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630491_0.png.png imagette296708621766538001/1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630491_0.png.png imagette296708621766538001/1766537487_3487974_1400766373_5f4b9fbe23408a32f4f901965779db2b_rle_crop_4079630386_0.png.png imagette296708621766538001/1766537948_3507834_1400766632_b708c05652b83e42e29c2072dbf9b489_rle_crop_4079639087_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/e263913b051e45c2b5b67dee0d8533e9_68797622.png imagette296708621766538001 29670869 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670869 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1400766541: '1766537487_3487974_1400766375_39f0e01936ad4e54a32c5e84523ae1fd_rle_crop_4079630376_0.png', 1400766542: '1766537487_3487974_1400766375_39f0e01936ad4e54a32c5e84523ae1fd_rle_crop_4079630373_0.png', 1400766590: '1766537585_3493194_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630475_0.png', 1400766591: '1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630497_0.png', 1400766596: '1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630556_0.png', 1400766597: '1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630557_0.png', 1400766598: '1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630560_0.png', 1400766662: '1766537727_3499086_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630475_0.png', 1400766665: '1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630497_0.png', 1400766721: '1766537828_3504145_1400766571_d961ab11664803e0fbebc9f7df1ae8af_rle_crop_4079630871_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/2051858aa0c4486b931cd7b20626d448_46631713.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/e32166620746e53c8a7859a1777e0679_34839467.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/f4b86c8143bccd83b5de5ce53d751801_32446818.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/a51847ca042103fb0fdcb446f8a8bd00_37355820.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/c30554374ddef9829c2c65c572e1da8e_69396678.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/f0533ebb5a7979d9aafb17d133f65a0d_67375696.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/a2e967899963855cdaab56384037fca0_35038699.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/f4b86c8143bccd83b5de5ce53d751801_83114891.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/a51847ca042103fb0fdcb446f8a8bd00_4235890.png change filename to text .imagette296708691766538002/ imagette296708691766538002/1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630560_0.png.png imagette296708691766538002/1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630557_0.png.png imagette296708691766538002/1766537585_3493194_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630497_0.png.png imagette296708691766538002/1766537487_3487974_1400766375_39f0e01936ad4e54a32c5e84523ae1fd_rle_crop_4079630373_0.png.png imagette296708691766538002/1766537585_3493194_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630475_0.png.png imagette296708691766538002/1766537487_3487974_1400766375_39f0e01936ad4e54a32c5e84523ae1fd_rle_crop_4079630376_0.png.png imagette296708691766538002/1766537828_3504145_1400766571_d961ab11664803e0fbebc9f7df1ae8af_rle_crop_4079630871_0.png.png imagette296708691766538002/1766537727_3499086_1400766477_1d17665a816f23e6755e889493e84e9c_rle_crop_4079630497_0.png.png imagette296708691766538002/1766537606_3493591_1400766453_bc3a0fa4fad010317bd574ea6ce34809_rle_crop_4079630556_0.png.png imagette296708691766538002/1766537727_3499086_1400766479_234e12563a1fe4c29df776349d76876f_rle_crop_4079630475_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/8a1ef9bb65f34a6219f1a52e2ec18ea5_67067309.png imagette296708691766538002 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29670856 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29670877,29670878,29670880,29670881,29670883,29670885,29670886,29670888,29670889,29670891,29670892,29670894?tags=Teint_Dans_La_Masse,Carton_gris,environnement,cartonnette,metal,flou,papier,mal_croppe,Carton_brun,autre_refus,kraft,plastique your option no_mail is active, we will not send the real mail to your client args[1400766756] : ('0.07877731531714857',) no score found for photo 1400766756 We are sending mail with results at report@fotonower.com args[1400766752] : ('0.07877731531714857',) no score found for photo 1400766752 We are sending mail with results at report@fotonower.com args[1400766748] : ('0.07877731531714857',) no score found for photo 1400766748 We are sending mail with results at report@fotonower.com args[1400766744] : ('0.07877731531714857',) no score found for photo 1400766744 We are sending mail with results at report@fotonower.com args[1400766741] : ('0.07877731531714857',) no score found for photo 1400766741 We are sending mail with results at report@fotonower.com args[1400766738] : ('0.07877731531714857',) no score found for photo 1400766738 We are sending mail with results at report@fotonower.com refus_total : 0.07877731531714857 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670856 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_P29670856_24-12-2025_01_59_59.pdf results_Auto_P29670856_24-12-2025_01_59_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670856_24-12-2025_01_59_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','29670856','results_Auto_P29670856_24-12-2025_01_59_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670856_24-12-2025_01_59_59.pdf','pdf','','0.16','0.07877731531714857') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29670856]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] map_info['map_portfolio_photo'] : {29670856: [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738, 1400766702, 1400766698, 1400766695, 1400766692, 1400766684, 1400766681, 1400766678, 1400766676, 1400766673, 1400766670, 1400766654, 1400766651, 1400766648, 1400766644, 1400766640, 1400766636, 1400766632, 1400766610, 1400766607, 1400766604, 1400766601, 1400766574, 1400766571, 1400766569, 1400766567, 1400766551, 1400766548, 1400766544, 1400766521, 1400766519, 1400766515, 1400766509, 1400766504, 1400766500, 1400766481, 1400766479, 1400766477, 1400766453, 1400766449, 1400766445, 1400766441, 1400766415, 1400766412, 1400766402, 1400766381, 1400766377, 1400766375, 1400766373, 1400766355, 1400766347, 1400766340]} final : False mtd_id 4302 list_pids : [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] 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, '4266155') ('4302', '29670856', '1400766756', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766752', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766748', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766744', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766741', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766738', None, None, None, None, None, '4266155') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29670856', '1400766756', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766752', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766748', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766744', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766741', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766738', None, None, None, None, None, '4266155')] time used for this insertion : 0.0485689640045166 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.537059545516968 time spend to save output : 0.04889059066772461 total time spend for step 4 : 4.585950136184692 step5:split_time_score Wed Dec 24 02:00:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['29670856'] 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 : [('29670856',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29670856) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1400766752: {'path': 'temp/1766537999_1293870_1400766752_157a46aabcfa0d53a1b3f5cebefd3caf.jpg', 'extension': 'jpg'}, 1400766756: {'path': 'temp/1766537999_1293870_1400766756_fdd67a1a8d3c20b4e98b7e783003398f.jpg', 'extension': 'jpg'}, 1400766738: {'path': 'temp/1766537999_1293870_1400766738_ef534af2a0cf5295e17e703eb9ac79a0.jpg', 'extension': 'jpg'}, 1400766741: {'path': 'temp/1766537999_1293870_1400766741_f15172f6f34f0269fdaac3787b91c800.jpg', 'extension': 'jpg'}, 1400766744: {'path': 'temp/1766537999_1293870_1400766744_8a0be5e4598b9489bdf3da81d3d881f0.jpg', 'extension': 'jpg'}, 1400766748: {'path': 'temp/1766537999_1293870_1400766748_8f0a3a84761c44347f9fd964b0c7705e.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 = 29670856; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm_bis',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29670856 group by h (('01', 57),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29670856 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 (29670856) 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 (29670856) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 24122025 29670856 Nombre de photos uploadées : 57 / 23040 (0%) 24122025 29670856 Nombre de photos taguées (types de déchets): 0 / 57 (0%) 24122025 29670856 Nombre de photos taguées (volume) : 0 / 57 (0%) [{'photo_id': 1400766355, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/05cfb65aa4d3a8d9cbd683a003369c39.jpg', 'username': None, 'uploaded_at': 1766537168, 'text': 'image_24122025_01_45_14_9127.jpg'}, {'photo_id': 1400766347, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/e7016063f887b1b6a212aa12b89088df.jpg', 'username': None, 'uploaded_at': 1766537168, 'text': 'image_24122025_01_45_34_10152.jpg'}, {'photo_id': 1400766340, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/fae3a38853a11ab784de87a801603a4a.jpg', 'username': None, 'uploaded_at': 1766537168, 'text': 'image_24122025_01_45_44_10140.jpg'}, {'photo_id': 1400766381, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/24/f0ab4a4269b41f116e0fec70f384b77d.jpg', 'username': None, 'uploaded_at': 1766537228, 'text': 'image_24122025_01_45_54_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 1.0013580322265625e-05 ????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0027780532836914062 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29670856, '2025-12-24' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-24' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2781885,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.46187829971313477 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= 2781885 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29668057, 'dashboard_result_id': 18677672, '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_P29668057_24-12-2025_00_19_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668063, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668067, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668068, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668069, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668070, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668074, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29668522, 'dashboard_result_id': 18677673, '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_P29668522_24-12-2025_00_33_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668526, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668527, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668529, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668530, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668534, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668535, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668536, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29668997, 'dashboard_result_id': 18677674, '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_P29668997_24-12-2025_00_49_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669010, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669013, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669015, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29669483, 'dashboard_result_id': 18677675, '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_P29669483_24-12-2025_01_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669490, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669494, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669496, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669500, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669502, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29670517, 'dashboard_result_id': 18677676, '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_P29670517_24-12-2025_01_33_05.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670519, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670520, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670521, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670523, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670524, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670525, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670526, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670529, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670530, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29670440, 'dashboard_result_id': 18677677, '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_P29670440_24-12-2025_01_27_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29670442, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670444, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670445, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670446, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670448, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670449, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670450, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670451, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670452, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670453, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29670567, 'dashboard_result_id': 18677678, '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_P29670567_24-12-2025_01_47_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670570, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670573, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670575, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670577, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670580, 'pht': 3726}}"}, {'dashboat_entry_day': 2781885, 'dashboard_run_id': 2788786, 'mtr_portfolio_id': 29670856, 'dashboard_result_id': 18677679, '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_P29670856_24-12-2025_01_59_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670861, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670863, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670864, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670868, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670869, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670870, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670871, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670872, '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 = 29668057 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': 4265770, 'mtr_portfolio_id': 29668057, 'created_at': datetime.datetime(2025, 12, 24, 0, 19, 31), 'result': '0.06135353829280031', 'result_long': None, 'result_double': None}] Qualite : 0.06135353829280031 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29668057 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668057_24-12-2025_00_19_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29668057 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_P29668057_24-12-2025_00_19_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668063, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668067, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668068, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668069, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668070, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668074, 'pht': 3726}}" where mtr_portfolio_id = 29668057 and dashboard_run_id = 2788790 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`=29668057 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18677672, 0.06135353829280031, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668057_24-12-2025_00_19_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668063, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668064, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668065, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668066, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668067, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668068, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668069, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668070, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668071, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668072, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668073, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668074, '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 = 29668522 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': 4265831, 'mtr_portfolio_id': 29668522, 'created_at': datetime.datetime(2025, 12, 24, 0, 33, 3), 'result': '0.05424920509000451', 'result_long': None, 'result_double': None}] Qualite : 0.05424920509000451 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29668522 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668522_24-12-2025_00_33_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29668522 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_P29668522_24-12-2025_00_33_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668526, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668527, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668529, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668530, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668534, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668535, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668536, 'pht': 3726}}" where mtr_portfolio_id = 29668522 and dashboard_run_id = 2788790 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`=29668522 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18677673, 0.05424920509000451, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668522_24-12-2025_00_33_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29668525, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29668526, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29668527, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29668528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29668529, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29668530, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29668531, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29668532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29668533, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29668534, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29668535, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29668536, '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 = 29668997 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': 4265902, 'mtr_portfolio_id': 29668997, 'created_at': datetime.datetime(2025, 12, 24, 0, 49, 2), 'result': '0.028189047341204393', 'result_long': None, 'result_double': None}] Qualite : 0.028189047341204393 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29668997 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668997_24-12-2025_00_49_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29668997 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_P29668997_24-12-2025_00_49_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669010, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669013, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669015, 'pht': 3726}}" where mtr_portfolio_id = 29668997 and dashboard_run_id = 2788790 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`=29668997 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18677674, 0.028189047341204393, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29668997_24-12-2025_00_49_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669005, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669006, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669007, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669008, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669009, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669010, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669012, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669013, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669014, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669015, '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 = 29669483 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': 4265972, 'mtr_portfolio_id': 29669483, 'created_at': datetime.datetime(2025, 12, 24, 1, 3, 2), 'result': '0.039287696512471944', 'result_long': None, 'result_double': None}] Qualite : 0.039287696512471944 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29669483 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29669483_24-12-2025_01_03_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29669483 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_P29669483_24-12-2025_01_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669490, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669494, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669496, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669500, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669502, 'pht': 3726}}" where mtr_portfolio_id = 29669483 and dashboard_run_id = 2788790 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`=29669483 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18677675, 0.039287696512471944, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29669483_24-12-2025_01_03_03.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29669490, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29669491, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29669492, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29669493, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29669494, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29669495, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29669496, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29669497, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29669498, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29669500, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29669501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29669502, '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 = 29670517 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29670517 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29670517 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29670517 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29670517 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29670517 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670517_24-12-2025_01_33_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29670517 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_P29670517_24-12-2025_01_33_05.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670519, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670520, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670521, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670523, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670524, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670525, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670526, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670527, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670528, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670529, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670530, 'pht': 3726}}" where mtr_portfolio_id = 29670517 and dashboard_run_id = 2788785 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 = 29670440 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29670440 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29670440 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29670440 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29670440 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29670440 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670440_24-12-2025_01_27_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29670440 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_P29670440_24-12-2025_01_27_04.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 29670442, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670444, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670445, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670446, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670447, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670448, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670449, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670450, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670451, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670452, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670453, 'pht': 3726}}" where mtr_portfolio_id = 29670440 and dashboard_run_id = 2788785 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 = 29670567 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': 4266119, 'mtr_portfolio_id': 29670567, 'created_at': datetime.datetime(2025, 12, 24, 1, 47, 3), 'result': '0.037633975953310125', 'result_long': None, 'result_double': None}] Qualite : 0.037633975953310125 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29670567 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670567_24-12-2025_01_47_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29670567 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_P29670567_24-12-2025_01_47_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670570, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670573, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670575, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670577, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670580, 'pht': 3726}}" where mtr_portfolio_id = 29670567 and dashboard_run_id = 2788790 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`=29670567 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18677678, 0.037633975953310125, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670567_24-12-2025_01_47_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670570, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670573, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670574, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670575, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670576, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670577, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670578, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670579, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670580, '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 = 29670856 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': 4266155, 'mtr_portfolio_id': 29670856, 'created_at': datetime.datetime(2025, 12, 24, 1, 59, 59), 'result': '0.07877731531714857', 'result_long': None, 'result_double': None}] Qualite : 0.07877731531714857 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29670856 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670856_24-12-2025_01_59_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29670856 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_P29670856_24-12-2025_01_59_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670861, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670863, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670864, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670868, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670869, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670870, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670871, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670872, 'pht': 3726}}" where mtr_portfolio_id = 29670856 and dashboard_run_id = 2788790 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`=29670856 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18677679, 0.07877731531714857, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29670856_24-12-2025_01_59_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29670861, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29670862, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29670863, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29670864, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29670865, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29670866, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29670867, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29670868, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29670869, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29670870, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29670871, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29670872, '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 (29668057,29668522,29668997,29669483,29670517,29670440,29670567,29670856) result : ((1400757182,), (1400757200,), (1400757201,), (1400757219,), (1400757222,), (1400757225,), (1400757229,), (1400757233,), (1400757235,), (1400757291,), (1400757316,), (1400757349,), (1400757377,), (1400757746,), (1400757819,), (1400757890,), (1400757967,), (1400758048,), (1400758117,), (1400758458,), (1400758524,), (1400758596,), (1400758705,), (1400758733,), (1400758760,), (1400758785,), (1400759140,), (1400759145,), (1400759284,), (1400759286,), (1400759288,), (1400759291,), (1400759295,), (1400759299,), (1400759375,), (1400759403,), (1400759434,), (1400759459,), (1400759715,), (1400759753,), (1400759789,), (1400759925,), (1400759927,), (1400759938,), (1400759965,), (1400760110,), (1400760118,), (1400760120,), (1400760144,), (1400760148,), (1400760152,), (1400760155,), (1400760368,), (1400760397,), (1400760424,), (1400760451,), (1400760481,), (1400760511,), (1400760514,), (1400760517,), (1400760521,), (1400760525,), (1400760530,), (1400760537,), (1400760539,), (1400760555,), (1400760546,), (1400760549,), (1400760552,), (1400760570,), (1400760573,), (1400760578,), (1400760581,), (1400760587,), (1400760590,), (1400760617,), (1400760620,), (1400760622,), (1400760668,), (1400760698,), (1400760726,), (1400760758,), (1400760868,), (1400760871,), (1400760873,), (1400760876,), (1400760902,), (1400761049,), (1400761051,), (1400761053,), (1400761055,), (1400761057,), (1400761059,), (1400761079,), (1400761085,), (1400761088,), (1400761091,), (1400761101,), (1400761103,), (1400761105,), (1400761107,), (1400761110,), (1400761116,), (1400761119,), (1400761121,), (1400761136,), (1400761138,), (1400761141,), (1400761143,), (1400761147,), (1400761150,), (1400761161,), (1400761164,), (1400761168,), (1400761172,), (1400761178,), (1400761181,), (1400761197,), (1400761201,), (1400761204,), (1400761213,), (1400761218,), (1400761228,), (1400761254,), (1400761281,), (1400761316,), (1400761624,), (1400761628,), (1400761633,), (1400761676,), (1400761703,), (1400761715,), (1400761917,), (1400761949,), (1400761978,), (1400761984,), (1400761987,), (1400762060,), (1400762070,), (1400762540,), (1400762554,), (1400762557,), (1400762466,), (1400762498,), (1400762529,), (1400762534,), (1400762538,), (1400762570,), (1400762581,), (1400762583,), (1400762585,), (1400762587,), (1400762597,), (1400762598,), (1400762601,), (1400762605,), (1400762621,), (1400762623,), (1400762625,), (1400762654,), (1400762675,), (1400762703,), (1400762731,), (1400762761,), (1400762788,), (1400762795,), (1400762797,), (1400762799,), (1400762812,), (1400762815,), (1400762818,), (1400762820,), (1400762822,), (1400762824,), (1400762835,), (1400762838,), (1400762840,), (1400762842,), (1400762864,), (1400762866,), (1400762869,), (1400762876,), (1400762881,), (1400762957,), (1400762961,), (1400762965,), (1400762969,), (1400762973,), (1400762975,), (1400762988,), (1400762997,), (1400763003,), (1400763005,), (1400763021,), (1400763023,), (1400763025,), (1400763027,), (1400763030,), (1400763033,), (1400763051,), (1400763054,), (1400763057,), (1400763059,), (1400763062,), (1400763085,), (1400763088,), (1400763090,), (1400763092,), (1400763095,), (1400763098,), (1400763113,), (1400763120,), (1400763125,), (1400763147,), (1400763152,), (1400763156,), (1400763160,), (1400763163,), (1400763165,), (1400763198,), (1400763201,), (1400763204,), (1400763222,), (1400763239,), (1400763246,), (1400763248,), (1400763250,), (1400763253,), (1400763281,), (1400763190,), (1400763192,), (1400763195,), (1400763263,), (1400763266,), (1400763268,), (1400763276,), (1400763292,), (1400763341,), (1400763403,), (1400763450,), (1400763453,), (1400763474,), (1400763522,), (1400763528,), (1400763617,), (1400763620,), (1400763622,), (1400763626,), (1400763628,), (1400763631,), (1400763649,), (1400763653,), (1400763657,), (1400763663,), (1400763668,), (1400763670,), (1400763687,), (1400763692,), (1400763697,), (1400763728,), (1400763755,), (1400763758,), (1400763784,), (1400763790,), (1400763794,), (1400763798,), (1400763802,), (1400763804,), (1400763807,), (1400763822,), (1400763845,), (1400763848,), (1400763851,), (1400763870,), (1400763880,), (1400763890,), (1400763918,), (1400763922,), (1400763925,), (1400763930,), (1400763934,), (1400763949,), (1400765524,), (1400765721,), (1400764389,), (1400765921,), (1400765913,), (1400765916,), (1400765918,), (1400765937,), (1400765940,), (1400765944,), (1400765948,), (1400765972,), (1400765976,), (1400765995,), (1400765999,), (1400766004,), (1400766009,), (1400766026,), (1400766030,), (1400766034,), (1400766038,), (1400766054,), (1400766058,), (1400766061,), (1400766087,), (1400766089,), (1400766091,), (1400766094,), (1400766098,), (1400766102,), (1400766112,), (1400766115,), (1400766118,), (1400766121,), (1400766150,), (1400766154,), (1400766155,), (1400766158,), (1400766160,), (1400766175,), (1400766177,), (1400766178,), (1400766201,), (1400766210,), (1400766213,), (1400766216,), (1400766218,), (1400766220,), (1400766238,), (1400766241,), (1400766244,), (1400766248,), (1400766252,), (1400766256,), (1400766272,), (1400766274,), (1400766276,), (1400766295,), (1400766298,), (1400766301,), (1400766357,), (1400766340,), (1400766347,), (1400766355,), (1400766373,), (1400766375,), (1400766377,), (1400766381,), (1400766402,), (1400766412,), (1400766415,), (1400766441,), (1400766445,), (1400766449,), (1400766453,), (1400766477,), (1400766479,), (1400766481,), (1400766500,), (1400766504,), (1400766509,), (1400766515,), (1400766519,), (1400766521,), (1400766544,), (1400766548,), (1400766551,), (1400766567,), (1400766569,), (1400766571,), (1400766574,), (1400766601,), (1400766604,), (1400766607,), (1400766610,), (1400766632,), (1400766636,), (1400766640,), (1400766644,), (1400766648,), (1400766651,), (1400766654,), (1400766670,), (1400766673,), (1400766676,), (1400766678,), (1400766681,), (1400766684,), (1400766692,), (1400766695,), (1400766698,), (1400766702,), (1400766738,), (1400766741,), (1400766744,), (1400766748,), (1400766752,), (1400766756,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'24122025': {'nb_upload': 57, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29670856]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] map_info['map_portfolio_photo'] : {29670856: [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738, 1400766702, 1400766698, 1400766695, 1400766692, 1400766684, 1400766681, 1400766678, 1400766676, 1400766673, 1400766670, 1400766654, 1400766651, 1400766648, 1400766644, 1400766640, 1400766636, 1400766632, 1400766610, 1400766607, 1400766604, 1400766601, 1400766574, 1400766571, 1400766569, 1400766567, 1400766551, 1400766548, 1400766544, 1400766521, 1400766519, 1400766515, 1400766509, 1400766504, 1400766500, 1400766481, 1400766479, 1400766477, 1400766453, 1400766449, 1400766445, 1400766441, 1400766415, 1400766412, 1400766402, 1400766381, 1400766377, 1400766375, 1400766373, 1400766355, 1400766347, 1400766340]} final : True mtd_id 4302 list_pids : [1400766756, 1400766752, 1400766748, 1400766744, 1400766741, 1400766738] Looping around the photos to save general results len do output : 1 /29670856Didn'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, '4266155') ('4302', '29670856', '1400766756', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766752', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766748', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766744', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766741', None, None, None, None, None, '4266155') ('4302', None, None, None, None, None, None, None, '4266155') ('4302', '29670856', '1400766738', None, None, None, None, None, '4266155') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29670856', 'None', None, None, None, None, '4266155'), ('4302', '29670856', '1400766756', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766752', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766748', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766744', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766741', None, None, None, None, None, '4266155'), ('4302', '29670856', '1400766738', None, None, None, None, None, '4266155')] time used for this insertion : 0.03204703330993652 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8880701065063477 time spend to save output : 0.032282352447509766 total time spend for step 5 : 1.9203524589538574 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 (4266155) 2.04user 2.38system 0:10.89elapsed 40%CPU (0avgtext+0avgdata 163820maxresident)k 336inputs+9392outputs (0major+67097minor)pagefaults 0swaps