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 : 1645311 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 (3443240) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3443240) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664547 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3443240'] with mtr_portfolio_ids : ['25664547'] and first list_photo_ids : [] new path : /proc/1645311/ Name: python3 Umask: 0002 State: R (running) Tgid: 1645311 Ngid: 0 Pid: 1645311 PPid: 1645310 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1645311 NSpid: 1645311 NSpgid: 1644126 NSsid: 1644126 VmPeak: 1106968 kB VmSize: 1106968 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98364 kB VmRSS: 98364 kB RssAnon: 59820 kB RssFile: 38544 kB RssShmem: 0 kB VmData: 865720 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 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: 55 nonvoluntary_ctxt_switches: 118 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1645311', 'Ngid': '0', 'Pid': '1645311', 'PPid': '1645310', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1645311', 'NSpid': '1645311', 'NSpgid': '1644126', 'NSsid': '1644126', 'VmPeak': '1106968 kB', 'VmSize': '1106968 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98364 kB', 'VmRSS': '98364 kB', 'RssAnon': '59820 kB', 'RssFile': '38544 kB', 'RssShmem': '0 kB', 'VmData': '865720 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 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': '55', 'nonvoluntary_ctxt_switches': '118'} ('datou_batch_current', '1645311', '1106968', '0', '1106968', '865720', '98364', b'', 'marlene', '3443240') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (25664547) 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 (3443240 ) ) 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 (25664547) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1375205858, 'portfolio_id': 25664547}, {'photo_id': 1375205857, 'portfolio_id': 25664547}, {'photo_id': 1375205830, 'portfolio_id': 25664547}, {'photo_id': 1375205786, 'portfolio_id': 25664547}, {'photo_id': 1375205785, 'portfolio_id': 25664547}, {'photo_id': 1375205784, 'portfolio_id': 25664547}, {'photo_id': 1375205755, 'portfolio_id': 25664547}, {'photo_id': 1375205753, 'portfolio_id': 25664547}, {'photo_id': 1375205752, 'portfolio_id': 25664547}, {'photo_id': 1375205751, 'portfolio_id': 25664547}, {'photo_id': 1375205706, 'portfolio_id': 25664547}, {'photo_id': 1375205689, 'portfolio_id': 25664547}, {'photo_id': 1375205687, 'portfolio_id': 25664547}, {'photo_id': 1375205685, 'portfolio_id': 25664547}, {'photo_id': 1375205683, 'portfolio_id': 25664547}, {'photo_id': 1375205682, 'portfolio_id': 25664547}, {'photo_id': 1375205681, 'portfolio_id': 25664547}, {'photo_id': 1375205664, 'portfolio_id': 25664547}, {'photo_id': 1375205660, 'portfolio_id': 25664547}, {'photo_id': 1375205657, 'portfolio_id': 25664547}, {'photo_id': 1375205655, 'portfolio_id': 25664547}, {'photo_id': 1375205653, 'portfolio_id': 25664547}, {'photo_id': 1375205610, 'portfolio_id': 25664547}, {'photo_id': 1375205603, 'portfolio_id': 25664547}, {'photo_id': 1375205600, 'portfolio_id': 25664547}, {'photo_id': 1375205598, 'portfolio_id': 25664547}, {'photo_id': 1375205596, 'portfolio_id': 25664547}, {'photo_id': 1375205574, 'portfolio_id': 25664547}, {'photo_id': 1375205571, 'portfolio_id': 25664547}, {'photo_id': 1375205197, 'portfolio_id': 25664547}, {'photo_id': 1375204857, 'portfolio_id': 25664547}] map_portfolio_id_photo_id: {25664547: [1375205858, 1375205857, 1375205830, 1375205786, 1375205785, 1375205784, 1375205755, 1375205753, 1375205752, 1375205751, 1375205706, 1375205689, 1375205687, 1375205685, 1375205683, 1375205682, 1375205681, 1375205664, 1375205660, 1375205657, 1375205655, 1375205653, 1375205610, 1375205603, 1375205600, 1375205598, 1375205596, 1375205574, 1375205571, 1375205197, 1375204857]} ##### 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.014927148818969727 #### 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 Tue Aug 5 05:14:28 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 (25664547) 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 : 25664547 get user id for portfolio 25664547 get sub ptf for main ptf 25664547, type 3726 and hashtags ['autre_refus', 'Carton_brun', 'plastique', 'environnement', 'papier', 'flou', 'mal_croppe', 'Carton_gris', 'kraft', 'Teint_Dans_La_Masse', 'metal', 'cartonnette'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25664547 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_brun','plastique','environnement','papier','flou','mal_croppe','Carton_gris','kraft','Teint_Dans_La_Masse','metal','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25664547 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_brun','plastique','environnement','papier','flou','mal_croppe','Carton_gris','kraft','Teint_Dans_La_Masse','metal','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 25664547, 'sub_port_id': 25664550, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303353, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'flou': {'main_port_id': 25664547, 'sub_port_id': 25664551, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303354, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'metal': {'main_port_id': 25664547, 'sub_port_id': 25664552, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303355, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'Teint_Dans_La_Masse': {'main_port_id': 25664547, 'sub_port_id': 25664553, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303356, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'papier': {'main_port_id': 25664547, 'sub_port_id': 25664554, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303357, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'kraft': {'main_port_id': 25664547, 'sub_port_id': 25664555, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303358, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'Carton_brun': {'main_port_id': 25664547, 'sub_port_id': 25664556, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303359, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'mal_croppe': {'main_port_id': 25664547, 'sub_port_id': 25664557, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303360, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'plastique': {'main_port_id': 25664547, 'sub_port_id': 25664558, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303361, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'cartonnette': {'main_port_id': 25664547, 'sub_port_id': 25664559, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303362, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'Carton_gris': {'main_port_id': 25664547, 'sub_port_id': 25664560, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303363, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}, 'autre_refus': {'main_port_id': 25664547, 'sub_port_id': 25664561, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303364, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25664550 , 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=25664547 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 (25664550) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664551 , 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=25664547 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 (25664551) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664552 , 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=25664547 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 (25664552) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664553 , 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=25664547 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 (25664553) result : ((1375205520,), (1375205521,), (1375205777,), (1375205778,), (1375205779,), (1375205847,), (1375205848,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664554 , 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=25664547 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 (25664554) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664555 , 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=25664547 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 (25664555) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664556 , 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=25664547 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 (25664556) result : ((1375205701,), (1375205782,), (1375205850,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664557 , 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=25664547 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 (25664557) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664558 , 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=25664547 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 (25664558) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664559 , 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=25664547 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 (25664559) result : ((1375205781,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664560 , 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=25664547 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 (25664560) result : ((1375205699,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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 25664561 , 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=25664547 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 (25664561) result : ((1375205523,), (1375205780,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25664547) result : ((1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) 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 (1375205600) 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`=25664547 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_brun','plastique','environnement','papier','flou','mal_croppe','Carton_gris','kraft','Teint_Dans_La_Masse','metal','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25664547 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_brun','plastique','environnement','papier','flou','mal_croppe','Carton_gris','kraft','Teint_Dans_La_Masse','metal','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 25664547, 'sub_port_id': 25664562, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303365, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'flou': {'main_port_id': 25664547, 'sub_port_id': 25664563, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303366, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'metal': {'main_port_id': 25664547, 'sub_port_id': 25664564, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303367, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 25664547, 'sub_port_id': 25664565, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303368, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'papier': {'main_port_id': 25664547, 'sub_port_id': 25664566, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303369, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'kraft': {'main_port_id': 25664547, 'sub_port_id': 25664567, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303370, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'Carton_brun': {'main_port_id': 25664547, 'sub_port_id': 25664568, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303371, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'mal_croppe': {'main_port_id': 25664547, 'sub_port_id': 25664569, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303372, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'plastique': {'main_port_id': 25664547, 'sub_port_id': 25664570, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303373, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'cartonnette': {'main_port_id': 25664547, 'sub_port_id': 25664571, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303374, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'Carton_gris': {'main_port_id': 25664547, 'sub_port_id': 25664572, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303375, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 3, 1), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}, 'autre_refus': {'main_port_id': 25664547, 'sub_port_id': 25664573, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17303376, 'last_updated_at': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_desc': datetime.datetime(2025, 8, 5, 5, 12, 56), 'last_updated_at_asc': datetime.datetime(2025, 8, 5, 5, 3, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664562,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664550 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664563,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664551 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664564,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664552 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664565,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664553 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664566,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664554 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664567,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664555 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664568,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664556 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664569,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664557 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664570,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664558 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664571,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664559 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664572,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664560 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25664573,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25664561 lien utilise dans velours : https://www.fotonower.com/velours/25664562,25664563,25664564,25664565,25664566,25664567,25664568,25664569,25664570,25664571,25664572,25664573?tags=environnement,flou,metal,Teint_Dans_La_Masse,papier,kraft,Carton_brun,mal_croppe,plastique,cartonnette,Carton_gris,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25664547]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1375205858, 1375205857, 1375205830] map_info['map_portfolio_photo'] : {25664547: [1375205858, 1375205857, 1375205830, 1375205786, 1375205785, 1375205784, 1375205755, 1375205753, 1375205752, 1375205751, 1375205706, 1375205689, 1375205687, 1375205685, 1375205683, 1375205682, 1375205681, 1375205664, 1375205660, 1375205657, 1375205655, 1375205653, 1375205610, 1375205603, 1375205600, 1375205598, 1375205596, 1375205574, 1375205571, 1375205197, 1375204857]} final : False mtd_id 4302 list_pids : [1375205858, 1375205857, 1375205830] Looping around the photos to save general results len do output : 1 /25664547. 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, '3443240') ('4302', '25664547', '1375205858', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205857', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205830', None, None, None, None, None, '3443240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25664547', "{'environnement': 25664550, 'flou': 25664551, 'metal': 25664552, 'Teint_Dans_La_Masse': 25664553, 'papier': 25664554, 'kraft': 25664555, 'Carton_brun': 25664556, 'mal_croppe': 25664557, 'plastique': 25664558, 'cartonnette': 25664559, 'Carton_gris': 25664560, 'autre_refus': 25664561}", None, None, None, None, '3443240'), ('4302', '25664547', '1375205858', None, None, None, None, None, '3443240'), ('4302', '25664547', '1375205857', None, None, None, None, None, '3443240'), ('4302', '25664547', '1375205830', None, None, None, None, None, '3443240')] time used for this insertion : 0.038701772689819336 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4763619899749756 time spend to save output : 0.038977861404418945 total time spend for step 1 : 0.5153398513793945 step2:final Tue Aug 5 05:14:29 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 (25664547) 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 25664547 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1375204857,1375205197,1375205574,1375205571,1375205610,1375205603,1375205600,1375205598,1375205664,1375205596,1375205660,1375205657,1375205655,1375205653,1375205689,1375205687,1375205685,1375205683,1375205682,1375205681,1375205706,1375205755,1375205753,1375205752,1375205751,1375205786,1375205785,1375205784,1375205830,1375205858,1375205857); 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([25664547]) Inside saveOutput : final : False verbose : True original output for save of step final : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ('0.029486091387375197',)} new output for save of step final : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ('0.029486091387375197',)} [1375205858, 1375205857, 1375205830] map_info['map_portfolio_photo'] : {25664547: [1375205858, 1375205857, 1375205830, 1375205786, 1375205785, 1375205784, 1375205755, 1375205753, 1375205752, 1375205751, 1375205706, 1375205689, 1375205687, 1375205685, 1375205683, 1375205682, 1375205681, 1375205664, 1375205660, 1375205657, 1375205655, 1375205653, 1375205610, 1375205603, 1375205600, 1375205598, 1375205596, 1375205574, 1375205571, 1375205197, 1375204857]} final : False mtd_id 4302 list_pids : [1375205858, 1375205857, 1375205830] Looping around the photos to save general results len do output : 3 /1375205858.Didn't retrieve data . /1375205857.Didn't retrieve data . /1375205830.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, '3443240') ('4302', '25664547', '1375205858', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205857', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205830', None, None, None, None, None, '3443240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '25664547', '1375205858', '0.029486091387375197', None, None, None, None, '3443240'), ('4302', '25664547', '1375205857', '0.029486091387375197', None, None, None, None, '3443240'), ('4302', '25664547', '1375205830', '0.029486091387375197', None, None, None, None, '3443240')] time used for this insertion : 0.011762857437133789 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07497048377990723 time spend to save output : 0.011998176574707031 total time spend for step 2 : 0.08696866035461426 step3:velours_tree Tue Aug 5 05:14:29 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 : {25664547: [{'environnement': 25664550, 'flou': 25664551, 'metal': 25664552, 'Teint_Dans_La_Masse': 25664553, 'papier': 25664554, 'kraft': 25664555, 'Carton_brun': 25664556, 'mal_croppe': 25664557, 'plastique': 25664558, 'cartonnette': 25664559, 'Carton_gris': 25664560, 'autre_refus': 25664561}]} input_args_next_step : {25664547: ()} output_args : {25664547: [{'environnement': 25664550, 'flou': 25664551, 'metal': 25664552, 'Teint_Dans_La_Masse': 25664553, 'papier': 25664554, 'kraft': 25664555, 'Carton_brun': 25664556, 'mal_croppe': 25664557, 'plastique': 25664558, 'cartonnette': 25664559, 'Carton_gris': 25664560, 'autre_refus': 25664561}]} args : 25664547 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'environnement': 25664550, 'flou': 25664551, 'metal': 25664552, 'Teint_Dans_La_Masse': 25664553, 'papier': 25664554, 'kraft': 25664555, 'Carton_brun': 25664556, 'mal_croppe': 25664557, 'plastique': 25664558, 'cartonnette': 25664559, 'Carton_gris': 25664560, 'autre_refus': 25664561},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25664547) 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([25664547]) 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.2938106060028076 time spend to save output : 5.269050598144531e-05 total time spend for step 3 : 0.29386329650878906 step4:send_mail_cod Tue Aug 5 05:14:29 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 : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ('0.029486091387375197',)} input_args_next_step : {1375205858: ()} output_args : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ('0.029486091387375197',)} args : 1375205858 depend.output_id : 0 input_args_next_step : {1375205858: ('0.029486091387375197',), 1375205857: ()} output_args : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ('0.029486091387375197',)} args : 1375205857 depend.output_id : 0 input_args_next_step : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ()} output_args : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ('0.029486091387375197',)} args : 1375205830 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 : {25664547: [{'environnement': 25664550, 'flou': 25664551, 'metal': 25664552, 'Teint_Dans_La_Masse': 25664553, 'papier': 25664554, 'kraft': 25664555, 'Carton_brun': 25664556, 'mal_croppe': 25664557, 'plastique': 25664558, 'cartonnette': 25664559, 'Carton_gris': 25664560, 'autre_refus': 25664561}]} input_args_next_step : {1375205858: ('0.029486091387375197',), 1375205857: ('0.029486091387375197',), 1375205830: ('0.029486091387375197',), 25664547: ()} output_args : {25664547: [{'environnement': 25664550, 'flou': 25664551, 'metal': 25664552, 'Teint_Dans_La_Masse': 25664553, 'papier': 25664554, 'kraft': 25664555, 'Carton_brun': 25664556, 'mal_croppe': 25664557, 'plastique': 25664558, 'cartonnette': 25664559, 'Carton_gris': 25664560, 'autre_refus': 25664561}]} args : 25664547 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 :4, first value : ('0.029486091387375197',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25664547) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1375205858,1375205857,1375205830) Found this number of photos: 3 ##### Call download_photos : nb_thread : 5 begin to download photo : 1375205830 begin to download photo : 1375205857 begin to download photo : 1375205858 download finish for photo 1375205830 download finish for photo 1375205857 download finish for photo 1375205858 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette256645511754363670/ imagette256645521754363670/ imagette256645551754363670/ imagette256645571754363670/ imagette256645581754363670/ length of list_filenames : 3 ; length of list_pids : 3 ; length of list_args : 3 results_Auto_P25664547_05-08-2025_05_14_30.pdf 25664551 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664551 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256645511754363670 25664552 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664552 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256645521754363670 25664555 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664555 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256645551754363670 25664557 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664557 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256645571754363670 25664558 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664558 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256645581754363670 25664559 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664559 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375205781: '1754363486_2773198_1375205653_3fb457fb99fc9583c06fef317c96f7d8_rle_crop_3903116647_0.png'} change filename to text .imagette256645591754363670/ imagette256645591754363670/1754363486_2773198_1375205653_3fb457fb99fc9583c06fef317c96f7d8_rle_crop_3903116647_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/e0e8fac7fb93422f601fe1558f89ce17_2334767.png imagette256645591754363670 25664561 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664561 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375205523: '1754363004_2763296_1375204857_fee59512561c373f30b0627550cf15aa_rle_crop_3903115953_0.png', 1375205780: '1754363486_2773198_1375205660_ebbbcb1120d27771069eba4ffdba2553_rle_crop_3903116620_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/297e063ce387219fff9304b16d31de13_13002694.png change filename to text .imagette256645611754363670/ imagette256645611754363670/1754363004_2763296_1375204857_fee59512561c373f30b0627550cf15aa_rle_crop_3903115953_0.png.png imagette256645611754363670/1754363486_2773198_1375205660_ebbbcb1120d27771069eba4ffdba2553_rle_crop_3903116620_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/1fe1c65a4982178130207ad63ff5b19a_95815391.png imagette256645611754363670 25664553 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664553 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375205520: '1754363004_2763296_1375204857_fee59512561c373f30b0627550cf15aa_rle_crop_3903115965_0.png', 1375205521: '1754363004_2763296_1375204857_fee59512561c373f30b0627550cf15aa_rle_crop_3903115963_0.png', 1375205777: '1754363486_2773198_1375205657_50687df366250174045b771901b8ad86_rle_crop_3903116631_0.png', 1375205778: '1754363486_2773198_1375205655_d1c1843620fcc9043e64b6235d583cae_rle_crop_3903116635_0.png', 1375205779: '1754363486_2773198_1375205655_d1c1843620fcc9043e64b6235d583cae_rle_crop_3903116638_0.png', 1375205847: '1754363608_2776768_1375205785_ddcf9a040ca441c0225c244cf4e25cca_rle_crop_3903116781_0.png', 1375205848: '1754363608_2776768_1375205784_ad1c0f4588b4f606e4bf3a2300e471d8_rle_crop_3903116794_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/2a1e7a200ce74632d74cf21a9c444d07_5836746.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/a3d92b735a3b339fe930bf5c0a0600cf_91466285.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/1dc3d697337c4543af004068421d3715_91176924.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/5308f843bed134cb79494c66daf431f6_55410896.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/3ef5161bf38849b606a23c39a1db3739_45763254.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/54918f003efcdcf16d5f33409dae7f64_82213450.png change filename to text .imagette256645531754363670/ imagette256645531754363670/1754363486_2773198_1375205657_50687df366250174045b771901b8ad86_rle_crop_3903116631_0.png.png imagette256645531754363670/1754363486_2773198_1375205655_d1c1843620fcc9043e64b6235d583cae_rle_crop_3903116635_0.png.png imagette256645531754363670/1754363608_2776768_1375205785_ddcf9a040ca441c0225c244cf4e25cca_rle_crop_3903116781_0.png.png imagette256645531754363670/1754363486_2773198_1375205655_d1c1843620fcc9043e64b6235d583cae_rle_crop_3903116638_0.png.png imagette256645531754363670/1754363004_2763296_1375204857_fee59512561c373f30b0627550cf15aa_rle_crop_3903115963_0.png.png imagette256645531754363670/1754363004_2763296_1375204857_fee59512561c373f30b0627550cf15aa_rle_crop_3903115965_0.png.png imagette256645531754363670/1754363608_2776768_1375205784_ad1c0f4588b4f606e4bf3a2300e471d8_rle_crop_3903116794_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/25ab60345a2921387525e7b04dab17f4_49230298.png imagette256645531754363670 25664556 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664556 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375205701: '1754363364_2770114_1375205610_07552e6e0f6310a884e138a48ebb52f9_rle_crop_3903116306_0.png', 1375205782: '1754363486_2773198_1375205657_50687df366250174045b771901b8ad86_rle_crop_3903116632_0.png', 1375205850: '1754363608_2776768_1375205785_ddcf9a040ca441c0225c244cf4e25cca_rle_crop_3903116783_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/be997845e9b4e20538a20b92ffe23f34_97272751.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/f268babc64b005a3996ff00980dd78e5_55674350.png change filename to text .imagette256645561754363670/ imagette256645561754363670/1754363608_2776768_1375205785_ddcf9a040ca441c0225c244cf4e25cca_rle_crop_3903116783_0.png.png imagette256645561754363670/1754363364_2770114_1375205610_07552e6e0f6310a884e138a48ebb52f9_rle_crop_3903116306_0.png.png imagette256645561754363670/1754363486_2773198_1375205657_50687df366250174045b771901b8ad86_rle_crop_3903116632_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/87cb5abfd6639f123c05c9a5aed92323_18101570.png imagette256645561754363670 25664560 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664560 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375205699: '1754363364_2770114_1375205571_ff423f7100f08d8e0d0e9b9490edc4b9_rle_crop_3903116312_0.png'} change filename to text .imagette256645601754363670/ imagette256645601754363670/1754363364_2770114_1375205571_ff423f7100f08d8e0d0e9b9490edc4b9_rle_crop_3903116312_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/bd41be10057f491ab7ae9f25c08a0b79_19572858.png imagette256645601754363670 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25664547 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25664562,25664563,25664564,25664565,25664566,25664567,25664568,25664569,25664570,25664571,25664572,25664573?tags=environnement,flou,metal,Teint_Dans_La_Masse,papier,kraft,Carton_brun,mal_croppe,plastique,cartonnette,Carton_gris,autre_refus your option no_mail is active, we will not send the real mail to your client args[1375205858] : ('0.029486091387375197',) no score found for photo 1375205858 We are sending mail with results at report@fotonower.com args[1375205857] : ('0.029486091387375197',) no score found for photo 1375205857 We are sending mail with results at report@fotonower.com args[1375205830] : ('0.029486091387375197',) no score found for photo 1375205830 We are sending mail with results at report@fotonower.com refus_total : 0.029486091387375197 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664547 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_P25664547_05-08-2025_05_14_30.pdf results_Auto_P25664547_05-08-2025_05_14_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25664547_05-08-2025_05_14_30.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','25664547','results_Auto_P25664547_05-08-2025_05_14_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25664547_05-08-2025_05_14_30.pdf','pdf','','0.08','0.029486091387375197') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25664547]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1375205858, 1375205857, 1375205830] map_info['map_portfolio_photo'] : {25664547: [1375205858, 1375205857, 1375205830, 1375205786, 1375205785, 1375205784, 1375205755, 1375205753, 1375205752, 1375205751, 1375205706, 1375205689, 1375205687, 1375205685, 1375205683, 1375205682, 1375205681, 1375205664, 1375205660, 1375205657, 1375205655, 1375205653, 1375205610, 1375205603, 1375205600, 1375205598, 1375205596, 1375205574, 1375205571, 1375205197, 1375204857]} final : False mtd_id 4302 list_pids : [1375205858, 1375205857, 1375205830] 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, '3443240') ('4302', '25664547', '1375205858', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205857', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205830', None, None, None, None, None, '3443240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25664547', '1375205858', None, None, None, None, None, '3443240'), ('4302', '25664547', '1375205857', None, None, None, None, None, '3443240'), ('4302', '25664547', '1375205830', None, None, None, None, None, '3443240')] time used for this insertion : 0.011939764022827148 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.0469117164611816 time spend to save output : 0.012120962142944336 total time spend for step 4 : 2.059032678604126 step5:split_time_score Tue Aug 5 05:14:31 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 : ['25664547'] 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 : [('25664547',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25664547) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1375205830: {'path': 'temp/1754363669_1645311_1375205830_19289427a52aa8a0dc062c3ac7dcf50a.jpg', 'extension': 'jpg'}, 1375205857: {'path': 'temp/1754363669_1645311_1375205857_740fcfa969151df0d78459c664d3732d.jpg', 'extension': 'jpg'}, 1375205858: {'path': 'temp/1754363669_1645311_1375205858_afd97cb4d10024cffa36f64038bb6d26.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 = 25664547; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25664547 group by h (('05', 31),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=25664547 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 (25664547) 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 (25664547) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 05082025 25664547 Nombre de photos uploadées : 31 / 23040 (0%) 05082025 25664547 Nombre de photos taguées (types de déchets): 0 / 31 (0%) 05082025 25664547 Nombre de photos taguées (volume) : 0 / 31 (0%) [{'photo_id': 1375204857, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/fee59512561c373f30b0627550cf15aa.jpg', 'username': None, 'uploaded_at': 1754362868, 'text': 'image_05082025_05_00_44_010138m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1375205197, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/eb6e2bb67f0e897fc117400371cb3069.jpg', 'username': None, 'uploaded_at': 1754362928, 'text': 'image_05082025_05_00_55_010136m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1375205574, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/20f956ced64b458ebb171965107b5c94.jpg', 'username': None, 'uploaded_at': 1754363167, 'text': 'image_05082025_05_01_54_10135.jpg'}, {'photo_id': 1375205571, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/5/ff423f7100f08d8e0d0e9b9490edc4b9.jpg', 'username': None, 'uploaded_at': 1754363167, 'text': 'image_05082025_05_05_35_010140m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.4836273193359375e-06 ??????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0015196800231933594 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25664547, '2025-08-05' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-08-05' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2062379,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20938658714294434 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= 2062379 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25656824, 'dashboard_result_id': 13573780, '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_P25656824_05-08-2025_00_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25656832, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25656833, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25656834, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25656835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25656836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25656837, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25656838, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25656839, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25656840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25656841, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25656842, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25656843, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25657102, 'dashboard_result_id': 13573781, '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_P25657102_05-08-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657125, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657126, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657131, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657132, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657133, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657134, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25657135, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657136, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25657469, 'dashboard_result_id': 13573782, '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_P25657469_05-08-2025_00_47_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25657480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657483, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657484, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657485, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657486, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657487, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657488, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657489, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657491, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25657869, 'dashboard_result_id': 13573783, '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_P25657869_05-08-2025_01_33_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657874, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657875, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657878, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657879, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657880, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657881, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25657883, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657885, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25659113, 'dashboard_result_id': 13573784, '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_P25659113_05-08-2025_01_48_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659118, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659119, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659120, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659122, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659124, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25659126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659129, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25659455, 'dashboard_result_id': 13573785, '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_P25659455_05-08-2025_02_02_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25659464, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659465, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659468, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659469, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659470, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659471, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659473, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659474, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659475, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25659773, 'dashboard_result_id': 13573786, '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_P25659773_05-08-2025_02_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659806, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659807, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659808, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659809, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659810, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659811, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659812, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25659813, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659814, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659815, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659816, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659817, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25660335, 'dashboard_result_id': 13573787, '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_P25660335_05-08-2025_02_32_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25660346, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25660347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25660348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25660349, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25660350, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25660351, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25660352, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25660353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25660354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25660355, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25660356, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25660357, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25660840, 'dashboard_result_id': 13573788, '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_P25660840_05-08-2025_02_48_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25660873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25660874, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25660875, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25660876, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25660877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25660878, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25660879, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25660880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25660881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25660882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25660883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25660884, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25661324, 'dashboard_result_id': 13573789, '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_P25661324_05-08-2025_03_05_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25661358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25661359, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25661360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25661361, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25661362, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25661363, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25661364, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25661365, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25661367, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25661368, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25661369, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25661370, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25661814, 'dashboard_result_id': 13573790, '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_P25661814_05-08-2025_03_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25661868, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25661869, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25661870, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25661871, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25661872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25661873, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25661874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25661875, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25661876, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25661877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25661878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25661879, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25662166, 'dashboard_result_id': 13573791, '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_P25662166_05-08-2025_03_32_57.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25662204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25662205, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25662206, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25662207, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25662208, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25662209, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25662210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25662211, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25662212, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25662213, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25662214, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25662215, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25662636, 'dashboard_result_id': 13573792, '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_P25662636_05-08-2025_03_48_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25662654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25662655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25662656, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25662657, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25662658, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25662659, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25662660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25662661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25662662, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25662663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25662664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25662665, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25663241, 'dashboard_result_id': 13573793, '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_P25663241_05-08-2025_04_02_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25663246, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25663247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25663248, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25663249, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25663250, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25663251, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25663252, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25663253, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25663254, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25663255, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25663256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25663257, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25663405, 'dashboard_result_id': 13573794, '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_P25663405_05-08-2025_04_12_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25663423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25663424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25663425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25663426, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25663427, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25663428, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25663429, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25663430, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25663431, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25663432, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25663433, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25663434, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25664255, 'dashboard_result_id': 13573795, '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_P25664255_05-08-2025_04_31_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25664261, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25664262, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25664263, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25664264, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25664265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25664266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25664267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25664268, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25664269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25664270, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25664271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25664272, 'pht': 3726}}"}, {'dashboat_entry_day': 2062379, 'dashboard_run_id': 2070659, 'mtr_portfolio_id': 25664547, 'dashboard_result_id': 13573796, '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_P25664547_05-08-2025_05_12_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25664550, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25664551, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25664552, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25664553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25664554, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25664555, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25664556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25664557, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25664558, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25664559, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25664560, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25664561, '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 = 25656824 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': 3440437, 'mtr_portfolio_id': 25656824, 'created_at': datetime.datetime(2025, 8, 5, 0, 16, 59), 'result': '0.058907875279875815', 'result_long': None, 'result_double': None}] Qualite : 0.058907875279875815 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25656824 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25656824_05-08-2025_00_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25656824 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_P25656824_05-08-2025_00_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25656832, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25656833, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25656834, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25656835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25656836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25656837, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25656838, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25656839, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25656840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25656841, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25656842, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25656843, 'pht': 3726}}" where mtr_portfolio_id = 25656824 and dashboard_run_id = 2070659 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`=25656824 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573780, 0.058907875279875815, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25656824_05-08-2025_00_17_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25656832, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25656833, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25656834, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25656835, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25656836, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25656837, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25656838, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25656839, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25656840, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25656841, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25656842, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25656843, '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 = 25657102 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': 3440493, 'mtr_portfolio_id': 25657102, 'created_at': datetime.datetime(2025, 8, 5, 0, 32, 59), 'result': '0.06500437511109095', 'result_long': None, 'result_double': None}] Qualite : 0.06500437511109095 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25657102 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25657102_05-08-2025_00_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25657102 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_P25657102_05-08-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657125, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657126, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657131, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657132, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657133, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657134, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25657135, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657136, 'pht': 3726}}" where mtr_portfolio_id = 25657102 and dashboard_run_id = 2070659 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`=25657102 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573781, 0.06500437511109095, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25657102_05-08-2025_00_32_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657125, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657126, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657127, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657128, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657129, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657130, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657131, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657132, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657133, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657134, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25657135, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657136, '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 = 25657469 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': 3440594, 'mtr_portfolio_id': 25657469, 'created_at': datetime.datetime(2025, 8, 5, 0, 47, 27), 'result': '0.05577297802820157', 'result_long': None, 'result_double': None}] Qualite : 0.05577297802820157 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25657469 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25657469_05-08-2025_00_47_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25657469 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_P25657469_05-08-2025_00_47_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25657480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657483, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657484, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657485, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657486, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657487, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657488, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657489, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657491, 'pht': 3726}}" where mtr_portfolio_id = 25657469 and dashboard_run_id = 2070659 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`=25657469 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573782, 0.05577297802820157, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25657469_05-08-2025_00_47_28.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25657480, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657482, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657483, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657484, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657485, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657486, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657487, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657488, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657489, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657490, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657491, '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 = 25657869 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': 3440737, 'mtr_portfolio_id': 25657869, 'created_at': datetime.datetime(2025, 8, 5, 1, 33, 1), 'result': '0.055433274007320496', 'result_long': None, 'result_double': None}] Qualite : 0.055433274007320496 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25657869 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25657869_05-08-2025_01_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25657869 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_P25657869_05-08-2025_01_33_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657874, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657875, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657878, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657879, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657880, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657881, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25657883, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657885, 'pht': 3726}}" where mtr_portfolio_id = 25657869 and dashboard_run_id = 2070659 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`=25657869 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573783, 0.055433274007320496, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25657869_05-08-2025_01_33_02.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25657874, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25657875, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25657876, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25657877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25657878, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25657879, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25657880, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25657881, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25657882, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25657883, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25657884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25657885, '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 = 25659113 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': 3441137, 'mtr_portfolio_id': 25659113, 'created_at': datetime.datetime(2025, 8, 5, 1, 48, 57), 'result': '0.05135286118226185', 'result_long': None, 'result_double': None}] Qualite : 0.05135286118226185 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25659113 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25659113_05-08-2025_01_48_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25659113 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_P25659113_05-08-2025_01_48_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659118, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659119, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659120, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659122, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659124, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25659126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659129, 'pht': 3726}}" where mtr_portfolio_id = 25659113 and dashboard_run_id = 2070659 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`=25659113 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573784, 0.05135286118226185, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25659113_05-08-2025_01_48_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659118, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659119, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659120, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659121, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659122, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659123, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659124, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659125, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25659126, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659127, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659128, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659129, '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 = 25659455 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': 3441204, 'mtr_portfolio_id': 25659455, 'created_at': datetime.datetime(2025, 8, 5, 2, 2, 57), 'result': '0.07478317085122338', 'result_long': None, 'result_double': None}] Qualite : 0.07478317085122338 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25659455 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25659455_05-08-2025_02_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25659455 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_P25659455_05-08-2025_02_02_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25659464, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659465, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659468, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659469, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659470, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659471, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659473, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659474, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659475, 'pht': 3726}}" where mtr_portfolio_id = 25659455 and dashboard_run_id = 2070659 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`=25659455 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573785, 0.07478317085122338, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25659455_05-08-2025_02_02_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25659464, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659465, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659466, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659468, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659469, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659470, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659471, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659472, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659473, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659474, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659475, '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 = 25659773 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': 3441307, 'mtr_portfolio_id': 25659773, 'created_at': datetime.datetime(2025, 8, 5, 2, 17), 'result': '0.048114372379386865', 'result_long': None, 'result_double': None}] Qualite : 0.048114372379386865 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25659773 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25659773_05-08-2025_02_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25659773 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_P25659773_05-08-2025_02_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659806, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659807, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659808, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659809, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659810, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659811, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659812, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25659813, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659814, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659815, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659816, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659817, 'pht': 3726}}" where mtr_portfolio_id = 25659773 and dashboard_run_id = 2070659 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`=25659773 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573786, 0.048114372379386865, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25659773_05-08-2025_02_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25659806, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25659807, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25659808, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25659809, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25659810, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25659811, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25659812, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25659813, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25659814, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25659815, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25659816, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25659817, '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 = 25660335 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': 3441402, 'mtr_portfolio_id': 25660335, 'created_at': datetime.datetime(2025, 8, 5, 2, 32, 57), 'result': '0.058162778084859146', 'result_long': None, 'result_double': None}] Qualite : 0.058162778084859146 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25660335 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25660335_05-08-2025_02_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25660335 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_P25660335_05-08-2025_02_32_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25660346, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25660347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25660348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25660349, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25660350, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25660351, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25660352, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25660353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25660354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25660355, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25660356, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25660357, 'pht': 3726}}" where mtr_portfolio_id = 25660335 and dashboard_run_id = 2070659 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`=25660335 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573787, 0.058162778084859146, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25660335_05-08-2025_02_32_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25660346, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25660347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25660348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25660349, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25660350, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25660351, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25660352, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25660353, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25660354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25660355, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25660356, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25660357, '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 = 25660840 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': 3441630, 'mtr_portfolio_id': 25660840, 'created_at': datetime.datetime(2025, 8, 5, 2, 48, 58), 'result': '0.04773082183802479', 'result_long': None, 'result_double': None}] Qualite : 0.04773082183802479 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25660840 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25660840_05-08-2025_02_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25660840 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_P25660840_05-08-2025_02_48_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25660873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25660874, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25660875, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25660876, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25660877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25660878, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25660879, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25660880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25660881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25660882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25660883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25660884, 'pht': 3726}}" where mtr_portfolio_id = 25660840 and dashboard_run_id = 2070659 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`=25660840 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573788, 0.04773082183802479, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25660840_05-08-2025_02_48_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25660873, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25660874, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25660875, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25660876, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25660877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25660878, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25660879, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25660880, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25660881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25660882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25660883, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25660884, '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 = 25661324 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': 3441859, 'mtr_portfolio_id': 25661324, 'created_at': datetime.datetime(2025, 8, 5, 3, 4, 59), 'result': '0.03408459046771175', 'result_long': None, 'result_double': None}] Qualite : 0.03408459046771175 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25661324 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25661324_05-08-2025_03_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25661324 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_P25661324_05-08-2025_03_05_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25661358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25661359, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25661360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25661361, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25661362, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25661363, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25661364, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25661365, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25661367, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25661368, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25661369, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25661370, 'pht': 3726}}" where mtr_portfolio_id = 25661324 and dashboard_run_id = 2070659 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`=25661324 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573789, 0.03408459046771175, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25661324_05-08-2025_03_05_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25661358, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25661359, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25661360, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25661361, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25661362, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25661363, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25661364, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25661365, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25661367, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25661368, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25661369, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25661370, '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 = 25661814 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': 3442084, 'mtr_portfolio_id': 25661814, 'created_at': datetime.datetime(2025, 8, 5, 3, 16, 59), 'result': '0.051369501733545105', 'result_long': None, 'result_double': None}] Qualite : 0.051369501733545105 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25661814 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25661814_05-08-2025_03_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25661814 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_P25661814_05-08-2025_03_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25661868, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25661869, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25661870, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25661871, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25661872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25661873, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25661874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25661875, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25661876, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25661877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25661878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25661879, 'pht': 3726}}" where mtr_portfolio_id = 25661814 and dashboard_run_id = 2070659 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`=25661814 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573790, 0.051369501733545105, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25661814_05-08-2025_03_16_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25661868, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25661869, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25661870, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25661871, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25661872, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25661873, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25661874, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25661875, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25661876, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25661877, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25661878, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25661879, '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 = 25662166 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': 3442210, 'mtr_portfolio_id': 25662166, 'created_at': datetime.datetime(2025, 8, 5, 3, 32, 57), 'result': '0.05164016671132091', 'result_long': None, 'result_double': None}] Qualite : 0.05164016671132091 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25662166 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25662166_05-08-2025_03_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25662166 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_P25662166_05-08-2025_03_32_57.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25662204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25662205, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25662206, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25662207, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25662208, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25662209, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25662210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25662211, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25662212, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25662213, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25662214, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25662215, 'pht': 3726}}" where mtr_portfolio_id = 25662166 and dashboard_run_id = 2070659 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`=25662166 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573791, 0.05164016671132091, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25662166_05-08-2025_03_32_57.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25662204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25662205, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25662206, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25662207, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25662208, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25662209, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25662210, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25662211, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25662212, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25662213, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25662214, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25662215, '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 = 25662636 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': 3442433, 'mtr_portfolio_id': 25662636, 'created_at': datetime.datetime(2025, 8, 5, 3, 48, 58), 'result': '0.0315368894448009', 'result_long': None, 'result_double': None}] Qualite : 0.0315368894448009 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25662636 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25662636_05-08-2025_03_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25662636 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_P25662636_05-08-2025_03_48_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25662654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25662655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25662656, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25662657, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25662658, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25662659, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25662660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25662661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25662662, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25662663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25662664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25662665, 'pht': 3726}}" where mtr_portfolio_id = 25662636 and dashboard_run_id = 2070659 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`=25662636 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573792, 0.0315368894448009, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25662636_05-08-2025_03_48_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25662654, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25662655, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25662656, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25662657, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25662658, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25662659, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25662660, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25662661, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25662662, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25662663, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25662664, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25662665, '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 = 25663241 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 = 25663241 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 = 25663241 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25663241 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 = 25663241 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 = 25663241 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25663241_05-08-2025_04_02_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25663241 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_P25663241_05-08-2025_04_02_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25663246, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25663247, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25663248, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25663249, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25663250, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25663251, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25663252, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25663253, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25663254, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25663255, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25663256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25663257, 'pht': 3726}}" where mtr_portfolio_id = 25663241 and dashboard_run_id = 2070659 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 = 25663405 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': 3442846, 'mtr_portfolio_id': 25663405, 'created_at': datetime.datetime(2025, 8, 5, 4, 12, 58), 'result': '0.03709335584436466', 'result_long': None, 'result_double': None}] Qualite : 0.03709335584436466 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25663405 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25663405_05-08-2025_04_12_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25663405 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_P25663405_05-08-2025_04_12_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25663423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25663424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25663425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25663426, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25663427, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25663428, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25663429, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25663430, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25663431, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25663432, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25663433, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25663434, 'pht': 3726}}" where mtr_portfolio_id = 25663405 and dashboard_run_id = 2070659 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`=25663405 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573794, 0.03709335584436466, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25663405_05-08-2025_04_12_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25663423, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25663424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25663425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25663426, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25663427, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25663428, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25663429, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25663430, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25663431, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25663432, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25663433, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25663434, '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 = 25664255 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 = 25664255 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 = 25664255 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25664255 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 = 25664255 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 = 25664255 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25664255_05-08-2025_04_31_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25664255 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_P25664255_05-08-2025_04_31_01.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25664261, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25664262, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25664263, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25664264, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25664265, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25664266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25664267, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25664268, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25664269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25664270, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25664271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25664272, 'pht': 3726}}" where mtr_portfolio_id = 25664255 and dashboard_run_id = 2070659 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 = 25664547 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': 3443240, 'mtr_portfolio_id': 25664547, 'created_at': datetime.datetime(2025, 8, 5, 5, 14, 29), 'result': '0.029486091387375197', 'result_long': None, 'result_double': None}] Qualite : 0.029486091387375197 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25664547 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25664547_05-08-2025_05_14_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25664547 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_P25664547_05-08-2025_05_14_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25664550, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25664551, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25664552, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25664553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25664554, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25664555, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25664556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25664557, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25664558, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25664559, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25664560, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25664561, 'pht': 3726}}" where mtr_portfolio_id = 25664547 and dashboard_run_id = 2070659 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`=25664547 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13573796, 0.029486091387375197, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25664547_05-08-2025_05_14_30.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25664550, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25664551, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25664552, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25664553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25664554, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25664555, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25664556, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25664557, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25664558, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25664559, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25664560, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25664561, '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 (25656824,25657102,25657469,25657869,25659113,25659455,25659773,25660335,25660840,25661324,25661814,25662166,25662636,25663241,25663405,25664255,25664547) result : ((1375186508,), (1375186513,), (1375186530,), (1375186915,), (1375186939,), (1375186963,), (1375186987,), (1375187242,), (1375187243,), (1375187244,), (1375187246,), (1375187249,), (1375187251,), (1375187454,), (1375187459,), (1375187473,), (1375187633,), (1375187635,), (1375187637,), (1375187647,), (1375187648,), (1375187649,), (1375187651,), (1375187661,), (1375187662,), (1375187663,), (1375187665,), (1375187672,), (1375187690,), (1375187710,), (1375187711,), (1375187712,), (1375187720,), (1375187721,), (1375187722,), (1375187723,), (1375187746,), (1375187751,), (1375187753,), (1375187755,), (1375187757,), (1375187760,), (1375187768,), (1375187769,), (1375187771,), (1375187773,), (1375187776,), (1375187781,), (1375187789,), (1375187792,), (1375187797,), (1375187800,), (1375187801,), (1375187802,), (1375187804,), (1375187807,), (1375187858,), (1375187859,), (1375187860,), (1375187877,), (1375187878,), (1375187879,), (1375187881,), (1375187891,), (1375187892,), (1375187893,), (1375187895,), (1375187899,), (1375187915,), (1375187911,), (1375187912,), (1375187913,), (1375187949,), (1375187950,), (1375188005,), (1375188006,), (1375188007,), (1375188009,), (1375188026,), (1375188027,), (1375188028,), (1375188030,), (1375188031,), (1375188043,), (1375188044,), (1375188045,), (1375188047,), (1375188051,), (1375188063,), (1375188065,), (1375188070,), (1375188072,), (1375188082,), (1375188083,), (1375188084,), (1375188100,), (1375188101,), (1375188102,), (1375188104,), (1375188120,), (1375188121,), (1375188123,), (1375188126,), (1375188128,), (1375188131,), (1375188139,), (1375188141,), (1375188144,), (1375188146,), (1375188147,), (1375188148,), (1375188152,), (1375188153,), (1375188154,), (1375188155,), (1375188156,), (1375188157,), (1375188163,), (1375188166,), (1375188169,), (1375188171,), (1375188173,), (1375188174,), (1375188175,), (1375188177,), (1375188199,), (1375188200,), (1375188201,), (1375188203,), (1375188204,), (1375188209,), (1375188217,), (1375188218,), (1375188219,), (1375188221,), (1375188224,), (1375188235,), (1375188237,), (1375188238,), (1375188240,), (1375188245,), (1375188265,), (1375188261,), (1375188262,), (1375188263,), (1375188274,), (1375188275,), (1375188276,), (1375188278,), (1375188279,), (1375188295,), (1375188298,), (1375188300,), (1375188305,), (1375188311,), (1375188313,), (1375188316,), (1375188318,), (1375188319,), (1375188322,), (1375188333,), (1375188338,), (1375188342,), (1375188344,), (1375188347,), (1375188349,), (1375188355,), (1375188356,), (1375188358,), (1375188359,), (1375188361,), (1375188366,), (1375188368,), (1375188371,), (1375188373,), (1375188383,), (1375188384,), (1375188385,), (1375188388,), (1375188391,), (1375188407,), (1375188408,), (1375188409,), (1375188410,), (1375188414,), (1375188429,), (1375188430,), (1375188431,), (1375188433,), (1375188441,), (1375188450,), (1375188455,), (1375188471,), (1375188475,), (1375188476,), (1375188477,), (1375188479,), (1375188493,), (1375188494,), (1375188495,), (1375188510,), (1375188511,), (1375188512,), (1375188528,), (1375188529,), (1375188531,), (1375188536,), (1375188539,), (1375188548,), (1375188551,), (1375188554,), (1375188556,), (1375188559,), (1375188561,), (1375188564,), (1375188565,), (1375188582,), (1375188579,), (1375188580,), (1375188603,), (1375188604,), (1375188618,), (1375188619,), (1375188630,), (1375188631,), (1375188652,), (1375188653,), (1375188669,), (1375188670,), (1375188671,), (1375188674,), (1375188677,), (1375188693,), (1375188694,), (1375188695,), (1375188697,), (1375188699,), (1375188702,), (1375188752,), (1375188753,), (1375188754,), (1375188756,), (1375188771,), (1375188773,), (1375188775,), (1375188779,), (1375188783,), (1375188786,), (1375188791,), (1375188794,), (1375188797,), (1375188799,), (1375188802,), (1375188804,), (1375188806,), (1375188807,), (1375188808,), (1375188819,), (1375188820,), (1375188821,), (1375188839,), (1375189148,), (1375189174,), (1375189195,), (1375189221,), (1375189237,), (1375189542,), (1375189573,), (1375191835,), (1375191831,), (1375191832,), (1375191833,), (1375191856,), (1375191857,), (1375191858,), (1375191893,), (1375191894,), (1375191895,), (1375191913,), (1375191914,), (1375191915,), (1375191917,), (1375191928,), (1375191948,), (1375191949,), (1375191973,), (1375191974,), (1375191975,), (1375191977,), (1375191994,), (1375191995,), (1375192007,), (1375192008,), (1375192009,), (1375192011,), (1375192039,), (1375192040,), (1375192041,), (1375192049,), (1375192050,), (1375192051,), (1375192053,), (1375192077,), (1375192078,), (1375192079,), (1375192096,), (1375192097,), (1375192098,), (1375192100,), (1375192103,), (1375192111,), (1375192112,), (1375192114,), (1375192117,), (1375192120,), (1375192122,), (1375192133,), (1375192138,), (1375192143,), (1375192148,), (1375192152,), (1375192155,), (1375192158,), (1375192162,), (1375192167,), (1375192168,), (1375192169,), (1375192170,), (1375192182,), (1375192184,), (1375192189,), (1375192194,), (1375192195,), (1375192196,), (1375192198,), (1375192210,), (1375192221,), (1375192227,), (1375192229,), (1375192231,), (1375192247,), (1375192248,), (1375192266,), (1375192267,), (1375192268,), (1375192281,), (1375192283,), (1375192285,), (1375192300,), (1375192301,), (1375192302,), (1375192318,), (1375192319,), (1375192332,), (1375192333,), (1375192335,), (1375192339,), (1375192343,), (1375192345,), (1375192356,), (1375192358,), (1375192361,), (1375192364,), (1375192366,), (1375192369,), (1375192374,), (1375192377,), (1375192380,), (1375192383,), (1375192385,), (1375192387,), (1375192390,), (1375192391,), (1375192392,), (1375192401,), (1375192405,), (1375192406,), (1375192413,), (1375192416,), (1375192420,), (1375192422,), (1375192490,), (1375192514,), (1375192544,), (1375192916,), (1375192918,), (1375192921,), (1375192923,), (1375192951,), (1375192944,), (1375192946,), (1375192948,), (1375193086,), (1375193108,), (1375193131,), (1375193154,), (1375193178,), (1375193596,), (1375193618,), (1375193639,), (1375193664,), (1375193687,), (1375194177,), (1375194194,), (1375194196,), (1375194199,), (1375194201,), (1375194204,), (1375194364,), (1375194408,), (1375194457,), (1375194493,), (1375194530,), (1375194552,), (1375194684,), (1375194733,), (1375194761,), (1375194785,), (1375194809,), (1375194926,), (1375194981,), (1375195036,), (1375195210,), (1375195211,), (1375195212,), (1375195395,), (1375195427,), (1375195557,), (1375195581,), (1375195597,), (1375195606,), (1375195608,), (1375195622,), (1375195623,), (1375195624,), (1375195626,), (1375195645,), (1375195646,), (1375195648,), (1375195671,), (1375195672,), (1375195673,), (1375195683,), (1375195684,), (1375195685,), (1375195703,), (1375195704,), (1375195706,), (1375195709,), (1375195711,), (1375195722,), (1375195723,), (1375195725,), (1375195726,), (1375195728,), (1375195753,), (1375195749,), (1375195750,), (1375195751,), (1375195765,), (1375195767,), (1375195768,), (1375195769,), (1375195779,), (1375195780,), (1375195781,), (1375195798,), (1375195799,), (1375195800,), (1375195816,), (1375195817,), (1375195818,), (1375195833,), (1375195834,), (1375195861,), (1375195862,), (1375195863,), (1375195868,), (1375195869,), (1375195870,), (1375195871,), (1375195888,), (1375195890,), (1375195891,), (1375195892,), (1375195906,), (1375195907,), (1375195908,), (1375195909,), (1375195922,), (1375195923,), (1375195924,), (1375195925,), (1375195928,), (1375195937,), (1375195938,), (1375195939,), (1375195940,), (1375195955,), (1375195956,), (1375195968,), (1375195969,), (1375195970,), (1375195971,), (1375195990,), (1375195991,), (1375195993,), (1375195994,), (1375195996,), (1375196011,), (1375196007,), (1375196008,), (1375196009,), (1375196041,), (1375196042,), (1375196043,), (1375196044,), (1375196059,), (1375196060,), (1375196084,), (1375196085,), (1375196087,), (1375196090,), (1375196093,), (1375196095,), (1375196103,), (1375196104,), (1375196107,), (1375196110,), (1375196112,), (1375196116,), (1375196122,), (1375196125,), (1375196133,), (1375196134,), (1375196135,), (1375196136,), (1375196139,), (1375196142,), (1375196178,), (1375196179,), (1375196180,), (1375196181,), (1375196183,), (1375196195,), (1375196196,), (1375196197,), (1375196198,), (1375196207,), (1375196208,), (1375196209,), (1375196211,), (1375196214,), (1375196226,), (1375196227,), (1375196228,), (1375196229,), (1375196233,), (1375196236,), (1375196246,), (1375196250,), (1375196254,), (1375196262,), (1375196265,), (1375196269,), (1375196270,), (1375196272,), (1375196286,), (1375196287,), (1375196288,), (1375196290,), (1375196292,), (1375196310,), (1375196311,), (1375196312,), (1375196314,), (1375196317,), (1375196319,), (1375196335,), (1375196336,), (1375196340,), (1375196343,), (1375196345,), (1375196349,), (1375196353,), (1375196356,), (1375196358,), (1375196359,), (1375196360,), (1375196367,), (1375196363,), (1375196365,), (1375196376,), (1375196377,), (1375196434,), (1375196439,), (1375196465,), (1375196466,), (1375196468,), (1375196470,), (1375196481,), (1375196482,), (1375196483,), (1375196485,), (1375196503,), (1375196504,), (1375196505,), (1375196507,), (1375196520,), (1375196521,), (1375196569,), (1375196572,), (1375196575,), (1375196579,), (1375196586,), (1375196589,), (1375196592,), (1375196595,), (1375196596,), (1375196610,), (1375196615,), (1375196619,), (1375196621,), (1375196625,), (1375196629,), (1375196632,), (1375196633,), (1375196651,), (1375196652,), (1375196653,), (1375196670,), (1375196671,), (1375197242,), (1375197286,), (1375197338,), (1375197390,), (1375197437,), (1375197483,), (1375197607,), (1375197637,), (1375197652,), (1375197678,), (1375197739,), (1375198706,), (1375198724,), (1375198725,), (1375198740,), (1375198755,), (1375198756,), (1375198826,), (1375198828,), (1375198831,), (1375198833,), (1375198847,), (1375198848,), (1375198866,), (1375198867,), (1375198868,), (1375198870,), (1375198907,), (1375198908,), (1375198909,), (1375198911,), (1375198929,), (1375198930,), (1375198931,), (1375198982,), (1375199000,), (1375199001,), (1375199003,), (1375199006,), (1375199021,), (1375199022,), (1375199050,), (1375199043,), (1375199044,), (1375199045,), (1375199047,), (1375199079,), (1375199080,), (1375199104,), (1375199122,), (1375199123,), (1375199124,), (1375199126,), (1375199130,), (1375199141,), (1375199142,), (1375199156,), (1375199157,), (1375199158,), (1375199160,), (1375199164,), (1375199167,), (1375199206,), (1375199207,), (1375199208,), (1375199272,), (1375199292,), (1375199293,), (1375199295,), (1375199307,), (1375199308,), (1375199309,), (1375199328,), (1375199329,), (1375199330,), (1375199338,), (1375199339,), (1375199340,), (1375199342,), (1375199345,), (1375199383,), (1375199384,), (1375199394,), (1375199395,), (1375199396,), (1375199398,), (1375199399,), (1375199416,), (1375199418,), (1375199419,), (1375199422,), (1375199424,), (1375199465,), (1375199460,), (1375199462,), (1375199463,), (1375199478,), (1375199479,), (1375199480,), (1375199490,), (1375199491,), (1375199492,), (1375199495,), (1375199497,), (1375199511,), (1375199512,), (1375199514,), (1375199517,), (1375199520,), (1375199522,), (1375199529,), (1375199532,), (1375199535,), (1375199536,), (1375199537,), (1375199538,), (1375199539,), (1375199543,), (1375199547,), (1375199548,), (1375199549,), (1375199550,), (1375199556,), (1375199559,), (1375199561,), (1375199564,), (1375199566,), (1375199567,), (1375199570,), (1375199571,), (1375199576,), (1375199580,), (1375199584,), (1375199587,), (1375199588,), (1375199589,), (1375199590,), (1375199592,), (1375199607,), (1375199608,), (1375199609,), (1375199611,), (1375199613,), (1375199624,), (1375199625,), (1375199626,), (1375199629,), (1375199633,), (1375199668,), (1375199670,), (1375199673,), (1375199678,), (1375199683,), (1375199685,), (1375199702,), (1375199703,), (1375199704,), (1375199706,), (1375199715,), (1375199716,), (1375199718,), (1375199720,), (1375199740,), (1375199741,), (1375199743,), (1375199746,), (1375199747,), (1375199750,), (1375199758,), (1375199759,), (1375199764,), (1375199766,), (1375199767,), (1375199770,), (1375199772,), (1375199773,), (1375199825,), (1375199974,), (1375200000,), (1375200002,), (1375200004,), (1375200008,), (1375200011,), (1375200024,), (1375200025,), (1375200026,), (1375200028,), (1375200037,), (1375200053,), (1375200054,), (1375200055,), (1375200057,), (1375200076,), (1375200077,), (1375200078,), (1375200080,), (1375200084,), (1375200104,), (1375200107,), (1375200110,), (1375200113,), (1375200116,), (1375200122,), (1375200125,), (1375200130,), (1375200144,), (1375200200,), (1375200164,), (1375200166,), (1375200173,), (1375200483,), (1375200505,), (1375200525,), (1375200545,), (1375200571,), (1375200792,), (1375200793,), (1375200794,), (1375200797,), (1375200801,), (1375201013,), (1375201018,), (1375201020,), (1375201023,), (1375201033,), (1375201059,), (1375201328,), (1375201350,), (1375201374,), (1375201403,), (1375201425,), (1375201447,), (1375201544,), (1375201567,), (1375201584,), (1375201586,), (1375201587,), (1375201600,), (1375201654,), (1375201668,), (1375201680,), (1375201683,), (1375201685,), (1375201689,), (1375201697,), (1375201698,), (1375201701,), (1375201705,), (1375201910,), (1375201939,), (1375201962,), (1375201986,), (1375202015,), (1375202040,), (1375202226,), (1375202227,), (1375202228,), (1375202400,), (1375202424,), (1375202586,), (1375202863,), (1375203094,), (1375204857,), (1375205197,), (1375205571,), (1375205574,), (1375205596,), (1375205598,), (1375205600,), (1375205603,), (1375205610,), (1375205653,), (1375205655,), (1375205657,), (1375205660,), (1375205664,), (1375205681,), (1375205682,), (1375205683,), (1375205685,), (1375205687,), (1375205689,), (1375205706,), (1375205751,), (1375205752,), (1375205753,), (1375205755,), (1375205784,), (1375205785,), (1375205786,), (1375205830,), (1375205857,), (1375205858,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'05082025': {'nb_upload': 31, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25664547]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1375205858, 1375205857, 1375205830] map_info['map_portfolio_photo'] : {25664547: [1375205858, 1375205857, 1375205830, 1375205786, 1375205785, 1375205784, 1375205755, 1375205753, 1375205752, 1375205751, 1375205706, 1375205689, 1375205687, 1375205685, 1375205683, 1375205682, 1375205681, 1375205664, 1375205660, 1375205657, 1375205655, 1375205653, 1375205610, 1375205603, 1375205600, 1375205598, 1375205596, 1375205574, 1375205571, 1375205197, 1375204857]} final : True mtd_id 4302 list_pids : [1375205858, 1375205857, 1375205830] Looping around the photos to save general results len do output : 1 /25664547Didn'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, '3443240') ('4302', '25664547', '1375205858', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205857', None, None, None, None, None, '3443240') ('4302', None, None, None, None, None, None, None, '3443240') ('4302', '25664547', '1375205830', None, None, None, None, None, '3443240') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '25664547', 'None', None, None, None, None, '3443240'), ('4302', '25664547', '1375205858', None, None, None, None, None, '3443240'), ('4302', '25664547', '1375205857', None, None, None, None, None, '3443240'), ('4302', '25664547', '1375205830', None, None, None, None, None, '3443240')] time used for this insertion : 0.1184544563293457 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.488312005996704 time spend to save output : 0.11863279342651367 total time spend for step 5 : 1.6069447994232178 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 (3443240) 1.97user 2.11system 0:07.57elapsed 54%CPU (0avgtext+0avgdata 157452maxresident)k 368inputs+3712outputs (4major+63748minor)pagefaults 0swaps