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 : 1332398 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 (3547374) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3547374) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025138 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3547374'] with mtr_portfolio_ids : ['26025138'] and first list_photo_ids : [] new path : /proc/1332398/ Name: python3 Umask: 0002 State: R (running) Tgid: 1332398 Ngid: 0 Pid: 1332398 PPid: 1332397 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1332398 NSpid: 1332398 NSpgid: 1331209 NSsid: 1331209 VmPeak: 1107344 kB VmSize: 1107344 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 101188 kB VmRSS: 101188 kB RssAnon: 60164 kB RssFile: 41024 kB RssShmem: 0 kB VmData: 866096 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 620 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: 88 nonvoluntary_ctxt_switches: 170 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1332398', 'Ngid': '0', 'Pid': '1332398', 'PPid': '1332397', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1332398', 'NSpid': '1332398', 'NSpgid': '1331209', 'NSsid': '1331209', 'VmPeak': '1107344 kB', 'VmSize': '1107344 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '101188 kB', 'VmRSS': '101188 kB', 'RssAnon': '60164 kB', 'RssFile': '41024 kB', 'RssShmem': '0 kB', 'VmData': '866096 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '620 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': '88', 'nonvoluntary_ctxt_switches': '170'} ('datou_batch_current', '1332398', '1107344', '0', '1107344', '866096', '101188', b'', 'marlene', '3547374') 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 (26025138) 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 (3547374 ) ) 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 (26025138) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1377303816, 'portfolio_id': 26025138}, {'photo_id': 1377303384, 'portfolio_id': 26025138}, {'photo_id': 1377303056, 'portfolio_id': 26025138}] map_portfolio_id_photo_id: {26025138: [1377303816, 1377303384, 1377303056]} ##### 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.014773130416870117 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Aug 15 14:26:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26025138) 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 : 26025138 get user id for portfolio 26025138 get sub ptf for main ptf 26025138, type 3726 and hashtags ['environnement', 'papier', 'Carton_gris', 'flou', 'metal', 'Teint_Dans_La_Masse', 'cartonnette', 'kraft', 'plastique', 'autre_refus', 'mal_croppe', 'Carton_brun'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26025138 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','Carton_gris','flou','metal','Teint_Dans_La_Masse','cartonnette','kraft','plastique','autre_refus','mal_croppe','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26025138 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','Carton_gris','flou','metal','Teint_Dans_La_Masse','cartonnette','kraft','plastique','autre_refus','mal_croppe','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26025138, 'sub_port_id': 26025139, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528269, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'Carton_brun': {'main_port_id': 26025138, 'sub_port_id': 26025140, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528270, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'metal': {'main_port_id': 26025138, 'sub_port_id': 26025141, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528271, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'flou': {'main_port_id': 26025138, 'sub_port_id': 26025142, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528272, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'environnement': {'main_port_id': 26025138, 'sub_port_id': 26025143, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528273, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'papier': {'main_port_id': 26025138, 'sub_port_id': 26025144, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528274, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 26025138, 'sub_port_id': 26025145, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528275, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'autre_refus': {'main_port_id': 26025138, 'sub_port_id': 26025146, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528276, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'kraft': {'main_port_id': 26025138, 'sub_port_id': 26025147, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528277, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'cartonnette': {'main_port_id': 26025138, 'sub_port_id': 26025148, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528278, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'plastique': {'main_port_id': 26025138, 'sub_port_id': 26025149, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528279, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}, 'Carton_gris': {'main_port_id': 26025138, 'sub_port_id': 26025150, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528280, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 18, 59), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 18, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025139 , 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=26025138 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 (26025139) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025140 , 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=26025138 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 (26025140) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025141 , 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=26025138 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 (26025141) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025142 , 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=26025138 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 (26025142) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025143 , 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=26025138 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 (26025143) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025144 , 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=26025138 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 (26025144) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025145 , 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=26025138 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 (26025145) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025146 , 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=26025138 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 (26025146) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025147 , 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=26025138 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 (26025147) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025148 , 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=26025138 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 (26025148) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025149 , 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=26025138 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 (26025149) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26025150 , 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=26025138 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 (26025150) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26025138) result : ((1377303056,), (1377303384,), (1377303816,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") 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`=26025138 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','Carton_gris','flou','metal','Teint_Dans_La_Masse','cartonnette','kraft','plastique','autre_refus','mal_croppe','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26025138 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','papier','Carton_gris','flou','metal','Teint_Dans_La_Masse','cartonnette','kraft','plastique','autre_refus','mal_croppe','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 26025138, 'sub_port_id': 26025151, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528281, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'Carton_brun': {'main_port_id': 26025138, 'sub_port_id': 26025152, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528282, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'metal': {'main_port_id': 26025138, 'sub_port_id': 26025153, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528283, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'flou': {'main_port_id': 26025138, 'sub_port_id': 26025154, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528284, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'environnement': {'main_port_id': 26025138, 'sub_port_id': 26025155, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528285, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'papier': {'main_port_id': 26025138, 'sub_port_id': 26025156, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528286, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'Teint_Dans_La_Masse': {'main_port_id': 26025138, 'sub_port_id': 26025157, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528287, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'autre_refus': {'main_port_id': 26025138, 'sub_port_id': 26025158, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528288, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'kraft': {'main_port_id': 26025138, 'sub_port_id': 26025159, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528289, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'cartonnette': {'main_port_id': 26025138, 'sub_port_id': 26025160, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528290, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'plastique': {'main_port_id': 26025138, 'sub_port_id': 26025161, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528291, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}, 'Carton_gris': {'main_port_id': 26025138, 'sub_port_id': 26025162, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17528292, 'last_updated_at': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_desc': datetime.datetime(2025, 8, 15, 14, 19), 'last_updated_at_asc': datetime.datetime(2025, 8, 15, 14, 19)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025151,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025139 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025152,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025140 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025153,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025141 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025154,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025142 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025155,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025143 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025156,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025144 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025157,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025158,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025146 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025159,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025147 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025160,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025148 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025161,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025149 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26025162,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26025150 lien utilise dans velours : https://www.fotonower.com/velours/26025151,26025152,26025153,26025154,26025155,26025156,26025157,26025158,26025159,26025160,26025161,26025162?tags=mal_croppe,Carton_brun,metal,flou,environnement,papier,Teint_Dans_La_Masse,autre_refus,kraft,cartonnette,plastique,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26025138]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1377303816] map_info['map_portfolio_photo'] : {26025138: [1377303816, 1377303384, 1377303056]} final : False mtd_id 4302 list_pids : [1377303816] Looping around the photos to save general results len do output : 1 /26025138. 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, '3547374') ('4302', '26025138', '1377303816', None, None, None, None, None, '3547374') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26025138', "{'mal_croppe': 26025139, 'Carton_brun': 26025140, 'metal': 26025141, 'flou': 26025142, 'environnement': 26025143, 'papier': 26025144, 'Teint_Dans_La_Masse': 26025145, 'autre_refus': 26025146, 'kraft': 26025147, 'cartonnette': 26025148, 'plastique': 26025149, 'Carton_gris': 26025150}", None, None, None, None, '3547374'), ('4302', '26025138', '1377303816', None, None, None, None, None, '3547374')] time used for this insertion : 0.015623331069946289 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5562517642974854 time spend to save output : 0.015990018844604492 total time spend for step 1 : 1.5722417831420898 step2:final Fri Aug 15 14:26:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (26025138) 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 26025138 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1377303056,1377303384,1377303816); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26025138]) Inside saveOutput : final : False verbose : True original output for save of step final : {1377303816: ('0.0',)} new output for save of step final : {1377303816: ('0.0',)} [1377303816] map_info['map_portfolio_photo'] : {26025138: [1377303816, 1377303384, 1377303056]} final : False mtd_id 4302 list_pids : [1377303816] Looping around the photos to save general results len do output : 1 /1377303816.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, '3547374') ('4302', '26025138', '1377303816', None, None, None, None, None, '3547374') 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', '26025138', '1377303816', '0.0', None, None, None, None, '3547374')] time used for this insertion : 0.015119791030883789 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.052565813064575195 time spend to save output : 0.015403509140014648 total time spend for step 2 : 0.06796932220458984 step3:velours_tree Fri Aug 15 14:26:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {26025138: [{'mal_croppe': 26025139, 'Carton_brun': 26025140, 'metal': 26025141, 'flou': 26025142, 'environnement': 26025143, 'papier': 26025144, 'Teint_Dans_La_Masse': 26025145, 'autre_refus': 26025146, 'kraft': 26025147, 'cartonnette': 26025148, 'plastique': 26025149, 'Carton_gris': 26025150}]} input_args_next_step : {26025138: ()} output_args : {26025138: [{'mal_croppe': 26025139, 'Carton_brun': 26025140, 'metal': 26025141, 'flou': 26025142, 'environnement': 26025143, 'papier': 26025144, 'Teint_Dans_La_Masse': 26025145, 'autre_refus': 26025146, 'kraft': 26025147, 'cartonnette': 26025148, 'plastique': 26025149, 'Carton_gris': 26025150}]} args : 26025138 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 : ({'mal_croppe': 26025139, 'Carton_brun': 26025140, 'metal': 26025141, 'flou': 26025142, 'environnement': 26025143, 'papier': 26025144, 'Teint_Dans_La_Masse': 26025145, 'autre_refus': 26025146, 'kraft': 26025147, 'cartonnette': 26025148, 'plastique': 26025149, 'Carton_gris': 26025150},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26025138) 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([26025138]) 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.4141502380371094 time spend to save output : 8.273124694824219e-05 total time spend for step 3 : 0.4142329692840576 step4:send_mail_cod Fri Aug 15 14:26:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1377303816: ('0.0',)} input_args_next_step : {1377303816: ()} output_args : {1377303816: ('0.0',)} args : 1377303816 depend.output_id : 0 complete output_args for input 3 : {26025138: [{'mal_croppe': 26025139, 'Carton_brun': 26025140, 'metal': 26025141, 'flou': 26025142, 'environnement': 26025143, 'papier': 26025144, 'Teint_Dans_La_Masse': 26025145, 'autre_refus': 26025146, 'kraft': 26025147, 'cartonnette': 26025148, 'plastique': 26025149, 'Carton_gris': 26025150}]} input_args_next_step : {1377303816: ('0.0',), 26025138: ()} output_args : {26025138: [{'mal_croppe': 26025139, 'Carton_brun': 26025140, 'metal': 26025141, 'flou': 26025142, 'environnement': 26025143, 'papier': 26025144, 'Teint_Dans_La_Masse': 26025145, 'autre_refus': 26025146, 'kraft': 26025147, 'cartonnette': 26025148, 'plastique': 26025149, 'Carton_gris': 26025150}]} args : 26025138 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :2, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26025138) 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 (1377303816) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1377303816 download finish for photo 1377303816 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette260251391755260819/ imagette260251411755260819/ imagette260251421755260819/ imagette260251461755260819/ imagette260251471755260819/ imagette260251481755260819/ imagette260251491755260819/ imagette260251401755260819/ imagette260251451755260819/ imagette260251501755260819/ length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P26025138_15-08-2025_14_26_59.pdf 26025139 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=26025139 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251391755260819 26025141 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=26025141 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251411755260819 26025142 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=26025142 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251421755260819 26025146 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=26025146 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251461755260819 26025147 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=26025147 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251471755260819 26025148 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=26025148 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251481755260819 26025149 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=26025149 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251491755260819 26025140 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=26025140 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251401755260819 26025145 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=26025145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251451755260819 26025150 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=26025150 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette260251501755260819 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26025138 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/26025151,26025152,26025153,26025154,26025155,26025156,26025157,26025158,26025159,26025160,26025161,26025162?tags=mal_croppe,Carton_brun,metal,flou,environnement,papier,Teint_Dans_La_Masse,autre_refus,kraft,cartonnette,plastique,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1377303816] : ('0.0',) no score found for photo 1377303816 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=26025138 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_P26025138_15-08-2025_14_26_59.pdf results_Auto_P26025138_15-08-2025_14_26_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26025138_15-08-2025_14_26_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','26025138','results_Auto_P26025138_15-08-2025_14_26_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26025138_15-08-2025_14_26_59.pdf','pdf','','0.04','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26025138]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1377303816] map_info['map_portfolio_photo'] : {26025138: [1377303816, 1377303384, 1377303056]} final : False mtd_id 4302 list_pids : [1377303816] 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, '3547374') ('4302', '26025138', '1377303816', None, None, None, None, None, '3547374') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26025138', '1377303816', None, None, None, None, None, '3547374')] time used for this insertion : 0.014557361602783203 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.1635017395019531 time spend to save output : 0.014796733856201172 total time spend for step 4 : 1.1782984733581543 step5:split_time_score Fri Aug 15 14:27:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26025138'] 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 : [('26025138',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26025138) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1377303816: {'path': 'temp/1755260819_1332398_1377303816_7188044fbbfc691a553f97244ddff784.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 = 26025138; (('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 = 26025138 group by h (('14', 3),) 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=26025138 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 (26025138) 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 (26025138) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15082025 26025138 Nombre de photos uploadées : 3 / 23040 (0%) 15082025 26025138 Nombre de photos taguées (types de déchets): 0 / 3 (0%) 15082025 26025138 Nombre de photos taguées (volume) : 0 / 3 (0%) [{'photo_id': 1377303056, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/c4387f9e3f597c0925d27055f378c03d.jpg', 'username': None, 'uploaded_at': 1755260163, 'text': 'image_15082025_14_15_33_9131.jpg'}, {'photo_id': 1377303384, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/1817a156149360a1ec249fb7e95059d0.jpg', 'username': None, 'uploaded_at': 1755260228, 'text': 'image_15082025_14_15_33_9131.jpg'}, {'photo_id': 1377303816, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/15/7188044fbbfc691a553f97244ddff784.jpg', 'username': None, 'uploaded_at': 1755260703, 'text': 'image_15082025_14_24_44_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.337860107421875e-06 elapsed_time : order_list_meta_photo_and_scores 8.821487426757812e-06 ??? elapsed_time : fill_and_build_computed_from_old_data 0.00024199485778808594 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26025138, '2025-08-15' ) 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-15' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2122421,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2186872959136963 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= 2122421 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26009616, 'dashboard_result_id': 14054462, '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_P26009616_15-08-2025_06_08_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26009667, 'dashboard_result_id': 14054463, '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_P26009667_15-08-2025_06_07_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26010093, 'dashboard_result_id': 14054464, '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_P26010093_15-08-2025_06_07_33.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26011192, 'dashboard_result_id': 14054465, '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_P26011192_15-08-2025_06_01_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26011457, 'dashboard_result_id': 14054466, '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_P26011457_15-08-2025_06_00_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26011726, 'dashboard_result_id': 14054467, '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_P26011726_15-08-2025_06_02_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26012288, 'dashboard_result_id': 14054468, '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_P26012288_15-08-2025_06_07_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26012804, 'dashboard_result_id': 14054469, '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_P26012804_15-08-2025_06_05_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26013291, 'dashboard_result_id': 14054470, '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_P26013291_15-08-2025_06_06_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26013988, 'dashboard_result_id': 14054471, '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_P26013988_15-08-2025_06_07_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26014385, 'dashboard_result_id': 14054472, '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_P26014385_15-08-2025_06_16_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26014766, 'dashboard_result_id': 14054473, '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_P26014766_15-08-2025_06_16_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26015128, 'dashboard_result_id': 14054474, '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_P26015128_15-08-2025_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26015599, 'dashboard_result_id': 14054475, '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_P26015599_15-08-2025_06_17_37.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26016100, 'dashboard_result_id': 14054476, '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_P26016100_15-08-2025_06_18_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26016138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016139, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016141, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016149, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26016640, 'dashboard_result_id': 14054477, '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_P26016640_15-08-2025_06_17_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016683, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016684, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016686, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016687, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016688, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016690, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016691, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016692, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26016693, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016694, 'pht': 3726}}"}, {'dashboat_entry_day': 2122421, 'dashboard_run_id': 2133859, 'mtr_portfolio_id': 26025138, 'dashboard_result_id': 14054478, '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_P26025138_15-08-2025_14_19_02.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26025139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26025140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26025141, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26025142, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26025143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26025144, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26025145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26025146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26025147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26025148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26025149, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26025150, '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 = 26009616 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': 3546028, 'mtr_portfolio_id': 26009616, 'created_at': datetime.datetime(2025, 8, 15, 6, 8, 31), 'result': '0.033195353221311966', 'result_long': None, 'result_double': None}] Qualite : 0.033195353221311966 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26009616 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_06_08_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26009616 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_P26009616_15-08-2025_06_08_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, 'pht': 3726}}" where mtr_portfolio_id = 26009616 and dashboard_run_id = 2133859 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`=26009616 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054462, 0.033195353221311966, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009616_15-08-2025_06_08_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009617, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009619, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009620, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009621, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009622, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009623, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009624, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009625, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009626, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26009627, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009628, '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 = 26009667 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': 3546029, 'mtr_portfolio_id': 26009667, 'created_at': datetime.datetime(2025, 8, 15, 6, 7, 28), 'result': '0.04419611748506136', 'result_long': None, 'result_double': None}] Qualite : 0.04419611748506136 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26009667 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_06_07_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26009667 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_P26009667_15-08-2025_06_07_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, 'pht': 3726}}" where mtr_portfolio_id = 26009667 and dashboard_run_id = 2133859 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`=26009667 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054463, 0.04419611748506136, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26009667_15-08-2025_06_07_31.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26009670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26009671, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26009672, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26009673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26009674, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26009675, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26009676, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26009677, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26009679, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26009680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26009681, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26009682, '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 = 26010093 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': 3546030, 'mtr_portfolio_id': 26010093, 'created_at': datetime.datetime(2025, 8, 15, 6, 7, 31), 'result': '0.06501914492538194', 'result_long': None, 'result_double': None}] Qualite : 0.06501914492538194 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26010093 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_06_07_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26010093 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_P26010093_15-08-2025_06_07_33.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, 'pht': 3726}}" where mtr_portfolio_id = 26010093 and dashboard_run_id = 2133859 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`=26010093 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054464, 0.06501914492538194, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26010093_15-08-2025_06_07_33.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26010154, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26010155, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26010156, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26010157, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26010158, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26010159, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26010160, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26010161, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26010162, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26010163, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26010164, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26010165, '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 = 26011192 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': 3546031, 'mtr_portfolio_id': 26011192, 'created_at': datetime.datetime(2025, 8, 15, 6, 0, 59), 'result': '0.04805472450881789', 'result_long': None, 'result_double': None}] Qualite : 0.04805472450881789 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011192 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_06_01_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011192 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_P26011192_15-08-2025_06_01_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, 'pht': 3726}}" where mtr_portfolio_id = 26011192 and dashboard_run_id = 2133859 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`=26011192 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054465, 0.04805472450881789, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011192_15-08-2025_06_01_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011232, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011233, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011235, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011237, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011238, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011239, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011240, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011241, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011242, '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 = 26011457 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': 3546032, 'mtr_portfolio_id': 26011457, 'created_at': datetime.datetime(2025, 8, 15, 6, 0, 30), 'result': '0.059702491777704314', 'result_long': None, 'result_double': None}] Qualite : 0.059702491777704314 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011457 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_06_00_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011457 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_P26011457_15-08-2025_06_00_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, 'pht': 3726}}" where mtr_portfolio_id = 26011457 and dashboard_run_id = 2133859 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`=26011457 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054466, 0.059702491777704314, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011457_15-08-2025_06_00_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26011462, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011463, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011464, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011465, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011466, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011469, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011470, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011472, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011473, '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 = 26011726 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': 3546033, 'mtr_portfolio_id': 26011726, 'created_at': datetime.datetime(2025, 8, 15, 6, 1, 57), 'result': '0.05552775321499164', 'result_long': None, 'result_double': None}] Qualite : 0.05552775321499164 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26011726 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_06_02_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26011726 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_P26011726_15-08-2025_06_02_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, 'pht': 3726}}" where mtr_portfolio_id = 26011726 and dashboard_run_id = 2133859 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`=26011726 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054467, 0.05552775321499164, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26011726_15-08-2025_06_02_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26011786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26011787, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26011788, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26011789, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26011790, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26011791, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26011792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26011793, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26011794, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26011795, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26011796, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26011797, '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 = 26012288 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': 3546034, 'mtr_portfolio_id': 26012288, 'created_at': datetime.datetime(2025, 8, 15, 6, 6, 59), 'result': '0.04154221185442299', 'result_long': None, 'result_double': None}] Qualite : 0.04154221185442299 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26012288 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_06_07_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26012288 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_P26012288_15-08-2025_06_07_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, 'pht': 3726}}" where mtr_portfolio_id = 26012288 and dashboard_run_id = 2133859 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`=26012288 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054468, 0.04154221185442299, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012288_15-08-2025_06_07_02.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012300, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012301, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012302, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012303, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012304, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012305, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012306, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012307, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012308, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012309, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012310, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012311, '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 = 26012804 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': 3546035, 'mtr_portfolio_id': 26012804, 'created_at': datetime.datetime(2025, 8, 15, 6, 5, 57), 'result': '0.041975529808386466', 'result_long': None, 'result_double': None}] Qualite : 0.041975529808386466 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26012804 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_06_05_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26012804 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_P26012804_15-08-2025_06_05_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, 'pht': 3726}}" where mtr_portfolio_id = 26012804 and dashboard_run_id = 2133859 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`=26012804 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054469, 0.041975529808386466, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26012804_15-08-2025_06_05_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26012822, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26012823, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26012824, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26012825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26012826, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26012827, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26012828, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26012829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26012830, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26012831, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26012832, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26012833, '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 = 26013291 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': 3546036, 'mtr_portfolio_id': 26013291, 'created_at': datetime.datetime(2025, 8, 15, 6, 6, 29), 'result': '0.039870167648543724', 'result_long': None, 'result_double': None}] Qualite : 0.039870167648543724 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26013291 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_06_06_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26013291 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_P26013291_15-08-2025_06_06_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, 'pht': 3726}}" where mtr_portfolio_id = 26013291 and dashboard_run_id = 2133859 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`=26013291 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054470, 0.039870167648543724, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013291_15-08-2025_06_06_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26013309, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013310, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26013311, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26013313, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26013314, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26013315, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26013316, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26013317, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26013318, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26013319, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26013320, '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 = 26013988 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': 3546037, 'mtr_portfolio_id': 26013988, 'created_at': datetime.datetime(2025, 8, 15, 6, 7, 58), 'result': '0.05320519459734983', 'result_long': None, 'result_double': None}] Qualite : 0.05320519459734983 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26013988 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_06_07_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26013988 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_P26013988_15-08-2025_06_07_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, 'pht': 3726}}" where mtr_portfolio_id = 26013988 and dashboard_run_id = 2133859 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`=26013988 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054471, 0.05320519459734983, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26013988_15-08-2025_06_07_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26013998, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26013999, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014000, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014001, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014002, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014004, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014005, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014006, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014007, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014008, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014010, '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 = 26014385 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': 3546038, 'mtr_portfolio_id': 26014385, 'created_at': datetime.datetime(2025, 8, 15, 6, 16), 'result': '0.042812318372411194', 'result_long': None, 'result_double': None}] Qualite : 0.042812318372411194 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26014385 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_06_16_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26014385 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_P26014385_15-08-2025_06_16_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, 'pht': 3726}}" where mtr_portfolio_id = 26014385 and dashboard_run_id = 2133859 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`=26014385 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054472, 0.042812318372411194, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014385_15-08-2025_06_16_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26014399, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014401, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014402, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014403, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014404, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014405, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014406, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014407, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014410, '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 = 26014766 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': 3546039, 'mtr_portfolio_id': 26014766, 'created_at': datetime.datetime(2025, 8, 15, 6, 16, 27), 'result': '0.0464830301287842', 'result_long': None, 'result_double': None}] Qualite : 0.0464830301287842 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26014766 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_06_16_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26014766 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_P26014766_15-08-2025_06_16_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, 'pht': 3726}}" where mtr_portfolio_id = 26014766 and dashboard_run_id = 2133859 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`=26014766 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054473, 0.0464830301287842, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26014766_15-08-2025_06_16_30.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26014776, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26014777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26014778, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26014779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26014780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26014781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26014782, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26014783, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26014784, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26014785, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26014786, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26014787, '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 = 26015128 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': 3546040, 'mtr_portfolio_id': 26015128, 'created_at': datetime.datetime(2025, 8, 15, 6, 16, 57), 'result': '0.04129868097512786', 'result_long': None, 'result_double': None}] Qualite : 0.04129868097512786 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26015128 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_06_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26015128 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_P26015128_15-08-2025_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, 'pht': 3726}}" where mtr_portfolio_id = 26015128 and dashboard_run_id = 2133859 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`=26015128 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054474, 0.04129868097512786, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015128_15-08-2025_06_17_00.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015133, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015134, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015135, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015136, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015137, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015138, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015139, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015140, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015141, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015142, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26015143, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015144, '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 = 26015599 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': 3546041, 'mtr_portfolio_id': 26015599, 'created_at': datetime.datetime(2025, 8, 15, 6, 17, 33), 'result': '0.05795773797872131', 'result_long': None, 'result_double': None}] Qualite : 0.05795773797872131 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26015599 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_06_17_37.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26015599 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_P26015599_15-08-2025_06_17_37.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, 'pht': 3726}}" where mtr_portfolio_id = 26015599 and dashboard_run_id = 2133859 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`=26015599 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054475, 0.05795773797872131, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26015599_15-08-2025_06_17_37.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26015625, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26015626, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26015627, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26015628, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26015629, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26015630, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26015631, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26015632, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26015633, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26015634, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26015635, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26015636, '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 = 26016100 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': 3546042, 'mtr_portfolio_id': 26016100, 'created_at': datetime.datetime(2025, 8, 15, 6, 17, 59), 'result': '0.04428600985209892', 'result_long': None, 'result_double': None}] Qualite : 0.04428600985209892 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26016100 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016100_15-08-2025_06_18_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26016100 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_P26016100_15-08-2025_06_18_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26016138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016139, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016141, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016149, 'pht': 3726}}" where mtr_portfolio_id = 26016100 and dashboard_run_id = 2133859 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`=26016100 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054476, 0.04428600985209892, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016100_15-08-2025_06_18_01.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26016138, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016139, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016141, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016143, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016144, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016145, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016148, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016149, '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 = 26016640 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': 3546043, 'mtr_portfolio_id': 26016640, 'created_at': datetime.datetime(2025, 8, 15, 6, 17, 28), 'result': '0.029506718824724085', 'result_long': None, 'result_double': None}] Qualite : 0.029506718824724085 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26016640 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016640_15-08-2025_06_17_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26016640 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_P26016640_15-08-2025_06_17_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016683, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016684, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016686, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016687, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016688, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016690, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016691, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016692, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26016693, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016694, 'pht': 3726}}" where mtr_portfolio_id = 26016640 and dashboard_run_id = 2133859 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`=26016640 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14054477, 0.029506718824724085, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26016640_15-08-2025_06_17_31.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26016683, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26016684, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26016685, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26016686, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26016687, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26016688, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26016689, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26016690, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26016691, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26016692, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26016693, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26016694, '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 = 26025138 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 = 26025138 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 = 26025138 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 26025138 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 = 26025138 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 = 26025138 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26025138_15-08-2025_14_26_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26025138 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_P26025138_15-08-2025_14_26_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26025139, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26025140, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26025141, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26025142, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26025143, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26025144, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26025145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26025146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26025147, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26025148, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26025149, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26025150, 'pht': 3726}}" where mtr_portfolio_id = 26025138 and dashboard_run_id = 2133861 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26009616,26009667,26010093,26011192,26011457,26011726,26012288,26012804,26013291,26013988,26014385,26014766,26015128,26015599,26016100,26016640,26025138) result : ((1377183099,), (1377184546,), (1377184550,), (1377184791,), (1377184820,), (1377184849,), (1377184879,), (1377185245,), (1377185214,), (1377185547,), (1377185701,), (1377185814,), (1377185930,), (1377187140,), (1377187184,), (1377187228,), (1377187274,), (1377187304,), (1377187685,), (1377187797,), (1377187888,), (1377188711,), (1377188767,), (1377188820,), (1377188876,), (1377188932,), (1377190070,), (1377190228,), (1377190359,), (1377190441,), (1377190471,), (1377190479,), (1377190495,), (1377190502,), (1377190532,), (1377190561,), (1377190593,), (1377191277,), (1377191317,), (1377191372,), (1377191420,), (1377191469,), (1377191527,), (1377191911,), (1377191983,), (1377192027,), (1377192057,), (1377192109,), (1377192242,), (1377192317,), (1377192322,), (1377192326,), (1377192330,), (1377192448,), (1377192451,), (1377192453,), (1377192636,), (1377192638,), (1377192640,), (1377192642,), (1377192701,), (1377192702,), (1377192703,), (1377192705,), (1377192709,), (1377192807,), (1377192810,), (1377192843,), (1377192861,), (1377192865,), (1377192869,), (1377192926,), (1377192923,), (1377192924,), (1377192949,), (1377192956,), (1377192973,), (1377192997,), (1377192999,), (1377193001,), (1377193005,), (1377193046,), (1377193050,), (1377193053,), (1377193126,), (1377193147,), (1377193163,), (1377193166,), (1377193171,), (1377193192,), (1377193195,), (1377193222,), (1377193224,), (1377193226,), (1377193229,), (1377193248,), (1377193250,), (1377193253,), (1377193257,), (1377193260,), (1377193263,), (1377193272,), (1377193359,), (1377193369,), (1377193414,), (1377193539,), (1377193571,), (1377199434,), (1377199461,), (1377199463,), (1377199477,), (1377199479,), (1377199482,), (1377199487,), (1377199491,), (1377199505,), (1377199514,), (1377199534,), (1377199538,), (1377199548,), (1377199564,), (1377199572,), (1377199575,), (1377199607,), (1377199612,), (1377199616,), (1377199620,), (1377199623,), (1377199634,), (1377199637,), (1377199641,), (1377199666,), (1377199669,), (1377199706,), (1377199708,), (1377199709,), (1377199712,), (1377199716,), (1377199730,), (1377199733,), (1377199735,), (1377199738,), (1377199740,), (1377199743,), (1377199752,), (1377199754,), (1377199757,), (1377199761,), (1377199764,), (1377199768,), (1377199779,), (1377199782,), (1377199789,), (1377199791,), (1377199793,), (1377199798,), (1377199801,), (1377199804,), (1377199808,), (1377199811,), (1377199815,), (1377199824,), (1377199826,), (1377199829,), (1377199835,), (1377199879,), (1377199856,), (1377199858,), (1377199860,), (1377199863,), (1377199869,), (1377199892,), (1377199895,), (1377199898,), (1377199902,), (1377199962,), (1377199964,), (1377199966,), (1377199969,), (1377199972,), (1377199974,), (1377199996,), (1377200022,), (1377200050,), (1377200078,), (1377200131,), (1377200442,), (1377200538,), (1377200571,), (1377200876,), (1377200880,), (1377200883,), (1377200887,), (1377201028,), (1377201059,), (1377201089,), (1377201122,), (1377201217,), (1377201218,), (1377201220,), (1377201224,), (1377201228,), (1377201238,), (1377201248,), (1377201250,), (1377201252,), (1377201310,), (1377201313,), (1377201331,), (1377201334,), (1377201336,), (1377201352,), (1377201353,), (1377201374,), (1377201376,), (1377201389,), (1377201440,), (1377201442,), (1377201444,), (1377201446,), (1377201450,), (1377201697,), (1377201728,), (1377201761,), (1377201794,), (1377201824,), (1377201856,), (1377201949,), (1377201978,), (1377202014,), (1377202302,), (1377202148,), (1377202184,), (1377202214,), (1377202243,), (1377202273,), (1377202605,), (1377202670,), (1377202725,), (1377202801,), (1377202859,), (1377202902,), (1377203221,), (1377203251,), (1377203281,), (1377203313,), (1377203346,), (1377203350,), (1377203358,), (1377203359,), (1377203361,), (1377203365,), (1377203369,), (1377203373,), (1377203399,), (1377203427,), (1377203552,), (1377203585,), (1377203617,), (1377203648,), (1377203678,), (1377203768,), (1377203808,), (1377203840,), (1377203870,), (1377203900,), (1377204161,), (1377204191,), (1377204532,), (1377204562,), (1377204594,), (1377205038,), (1377205095,), (1377205165,), (1377205221,), (1377205574,), (1377205602,), (1377205636,), (1377205702,), (1377206188,), (1377206220,), (1377206248,), (1377206314,), (1377206349,), (1377206585,), (1377206614,), (1377206642,), (1377206677,), (1377206716,), (1377207106,), (1377207160,), (1377207206,), (1377207236,), (1377207269,), (1377207300,), (1377207465,), (1377207521,), (1377207571,), (1377207606,), (1377207738,), (1377207788,), (1377207839,), (1377207878,), (1377207908,), (1377208001,), (1377208003,), (1377208006,), (1377208008,), (1377208011,), (1377208014,), (1377208162,), (1377208027,), (1377208034,), (1377208071,), (1377208102,), (1377208133,), (1377208347,), (1377208380,), (1377208504,), (1377208513,), (1377208518,), (1377208521,), (1377208524,), (1377208557,), (1377208587,), (1377208622,), (1377208653,), (1377208689,), (1377208720,), (1377208954,), (1377208987,), (1377209018,), (1377209273,), (1377209276,), (1377209279,), (1377209283,), (1377209510,), (1377209513,), (1377209537,), (1377209543,), (1377209565,), (1377209567,), (1377209570,), (1377209572,), (1377209574,), (1377209577,), (1377209603,), (1377209605,), (1377209608,), (1377209611,), (1377209614,), (1377209616,), (1377209624,), (1377209628,), (1377209634,), (1377209639,), (1377209642,), (1377209650,), (1377209651,), (1377209652,), (1377209654,), (1377209673,), (1377209677,), (1377209680,), (1377209682,), (1377209684,), (1377209686,), (1377209702,), (1377209704,), (1377209706,), (1377209708,), (1377209711,), (1377209716,), (1377209723,), (1377209726,), (1377209732,), (1377209738,), (1377209741,), (1377209743,), (1377209750,), (1377209751,), (1377209754,), (1377209756,), (1377209758,), (1377209759,), (1377209771,), (1377209774,), (1377209775,), (1377209777,), (1377209780,), (1377209783,), (1377209805,), (1377209808,), (1377209809,), (1377209811,), (1377209847,), (1377209840,), (1377209842,), (1377209866,), (1377209878,), (1377209880,), (1377209882,), (1377209884,), (1377209886,), (1377209903,), (1377209907,), (1377209912,), (1377209916,), (1377209918,), (1377209919,), (1377209923,), (1377209925,), (1377209946,), (1377209977,), (1377210020,), (1377210133,), (1377210162,), (1377210297,), (1377210329,), (1377210900,), (1377210931,), (1377210932,), (1377210934,), (1377210936,), (1377210938,), (1377210971,), (1377210973,), (1377210974,), (1377210980,), (1377211003,), (1377211005,), (1377211007,), (1377211010,), (1377211013,), (1377211017,), (1377211033,), (1377211035,), (1377211037,), (1377211039,), (1377211041,), (1377211043,), (1377211052,), (1377211054,), (1377211056,), (1377211059,), (1377211062,), (1377211065,), (1377211076,), (1377211077,), (1377211079,), (1377211082,), (1377211084,), (1377211087,), (1377211098,), (1377211101,), (1377211103,), (1377211104,), (1377211105,), (1377211111,), (1377211135,), (1377211136,), (1377211171,), (1377211173,), (1377211177,), (1377211181,), (1377211118,), (1377211122,), (1377211129,), (1377211132,), (1377211149,), (1377211153,), (1377211158,), (1377211160,), (1377211161,), (1377211162,), (1377211167,), (1377211169,), (1377211187,), (1377211188,), (1377211189,), (1377211190,), (1377211192,), (1377211197,), (1377211200,), (1377211203,), (1377211206,), (1377211208,), (1377211210,), (1377211431,), (1377214993,), (1377214957,), (1377215242,), (1377215250,), (1377215252,), (1377215254,), (1377215267,), (1377215288,), (1377215291,), (1377215311,), (1377215314,), (1377215318,), (1377215319,), (1377215322,), (1377215346,), (1377215349,), (1377215352,), (1377215388,), (1377215390,), (1377215392,), (1377215409,), (1377215411,), (1377215414,), (1377215417,), (1377215421,), (1377215423,), (1377215427,), (1377215435,), (1377215437,), (1377215439,), (1377215441,), (1377215448,), (1377215452,), (1377215463,), (1377215482,), (1377215479,), (1377215508,), (1377215515,), (1377215516,), (1377215517,), (1377215524,), (1377215527,), (1377215529,), (1377215532,), (1377215534,), (1377215545,), (1377215547,), (1377215549,), (1377215575,), (1377215576,), (1377215578,), (1377215605,), (1377215608,), (1377215611,), (1377215631,), (1377215634,), (1377215636,), (1377215652,), (1377215654,), (1377215657,), (1377215661,), (1377215672,), (1377215673,), (1377215674,), (1377215678,), (1377215681,), (1377215695,), (1377215699,), (1377215703,), (1377215706,), (1377215720,), (1377215728,), (1377215734,), (1377215737,), (1377215746,), (1377215747,), (1377215749,), (1377215752,), (1377215769,), (1377215770,), (1377215771,), (1377215787,), (1377215789,), (1377215791,), (1377215793,), (1377215796,), (1377215799,), (1377215806,), (1377215808,), (1377215810,), (1377215812,), (1377215814,), (1377215817,), (1377215842,), (1377215838,), (1377215840,), (1377215875,), (1377215878,), (1377215881,), (1377215885,), (1377215888,), (1377215898,), (1377215902,), (1377215905,), (1377215908,), (1377215911,), (1377215914,), (1377215918,), (1377215919,), (1377215920,), (1377215924,), (1377215927,), (1377215931,), (1377215934,), (1377215936,), (1377215938,), (1377215941,), (1377215943,), (1377215945,), (1377215949,), (1377215961,), (1377215963,), (1377215969,), (1377215972,), (1377215976,), (1377215986,), (1377215987,), (1377215988,), (1377215991,), (1377215994,), (1377215998,), (1377216008,), (1377216012,), (1377216023,), (1377216031,), (1377216046,), (1377216048,), (1377216050,), (1377216053,), (1377216066,), (1377216068,), (1377216070,), (1377216102,), (1377216104,), (1377216106,), (1377216111,), (1377216130,), (1377216132,), (1377216134,), (1377216138,), (1377216141,), (1377216152,), (1377216155,), (1377216159,), (1377216162,), (1377216164,), (1377216166,), (1377216171,), (1377216178,), (1377216180,), (1377216182,), (1377216185,), (1377216188,), (1377216203,), (1377216206,), (1377216210,), (1377216214,), (1377216218,), (1377216237,), (1377216231,), (1377216234,), (1377216235,), (1377216258,), (1377216264,), (1377216277,), (1377216280,), (1377216283,), (1377216287,), (1377216301,), (1377216303,), (1377216305,), (1377216308,), (1377216310,), (1377216312,), (1377216321,), (1377216322,), (1377216329,), (1377216335,), (1377216338,), (1377216355,), (1377216360,), (1377216362,), (1377216366,), (1377216371,), (1377216386,), (1377216389,), (1377216391,), (1377216394,), (1377216397,), (1377216400,), (1377216411,), (1377216414,), (1377216418,), (1377216421,), (1377216424,), (1377216426,), (1377216431,), (1377216434,), (1377216437,), (1377216439,), (1377216444,), (1377216446,), (1377216464,), (1377216466,), (1377216468,), (1377216471,), (1377216473,), (1377216476,), (1377216480,), (1377216483,), (1377216486,), (1377216491,), (1377216495,), (1377216510,), (1377216511,), (1377216512,), (1377216515,), (1377216534,), (1377216536,), (1377216540,), (1377216543,), (1377216547,), (1377216567,), (1377216569,), (1377216573,), (1377216576,), (1377216579,), (1377216583,), (1377216734,), (1377216638,), (1377216674,), (1377216708,), (1377216999,), (1377217031,), (1377217059,), (1377217247,), (1377217254,), (1377217256,), (1377217415,), (1377217450,), (1377217478,), (1377217499,), (1377217511,), (1377217548,), (1377217556,), (1377217558,), (1377217561,), (1377217564,), (1377217581,), (1377217589,), (1377217590,), (1377217591,), (1377217594,), (1377217614,), (1377217621,), (1377217632,), (1377217661,), (1377217691,), (1377217964,), (1377217993,), (1377218053,), (1377218106,), (1377218158,), (1377218458,), (1377218494,), (1377218524,), (1377219018,), (1377219054,), (1377219081,), (1377219114,), (1377219143,), (1377219394,), (1377219428,), (1377219455,), (1377219485,), (1377219491,), (1377219522,), (1377219630,), (1377219662,), (1377219693,), (1377219724,), (1377219805,), (1377219806,), (1377219810,), (1377219812,), (1377219816,), (1377219817,), (1377219821,), (1377219822,), (1377219824,), (1377219825,), (1377219826,), (1377219827,), (1377219837,), (1377219839,), (1377219842,), (1377219844,), (1377219847,), (1377219850,), (1377219861,), (1377219864,), (1377219876,), (1377219877,), (1377219880,), (1377219882,), (1377219884,), (1377219887,), (1377219912,), (1377219901,), (1377219908,), (1377219909,), (1377219932,), (1377219941,), (1377219944,), (1377219947,), (1377219968,), (1377219976,), (1377219978,), (1377219981,), (1377219983,), (1377219997,), (1377220004,), (1377220006,), (1377220007,), (1377220009,), (1377220033,), (1377220040,), (1377220041,), (1377220044,), (1377220047,), (1377220072,), (1377220083,), (1377220086,), (1377220088,), (1377220091,), (1377220093,), (1377220107,), (1377220115,), (1377220116,), (1377220117,), (1377220131,), (1377220133,), (1377220135,), (1377220137,), (1377220139,), (1377220140,), (1377220141,), (1377220142,), (1377220146,), (1377220148,), (1377220161,), (1377220165,), (1377220167,), (1377220170,), (1377220172,), (1377220181,), (1377220192,), (1377220194,), (1377220209,), (1377220218,), (1377220220,), (1377220222,), (1377220242,), (1377220250,), (1377220252,), (1377220255,), (1377220259,), (1377220273,), (1377220283,), (1377220287,), (1377220291,), (1377220295,), (1377220308,), (1377220317,), (1377220320,), (1377220348,), (1377220357,), (1377220358,), (1377220360,), (1377220364,), (1377220366,), (1377220413,), (1377220392,), (1377220401,), (1377220403,), (1377220405,), (1377220409,), (1377220431,), (1377220440,), (1377220442,), (1377220444,), (1377220470,), (1377220473,), (1377220477,), (1377220480,), (1377220484,), (1377220487,), (1377220490,), (1377220491,), (1377220493,), (1377220505,), (1377220509,), (1377220513,), (1377220521,), (1377220529,), (1377220532,), (1377220536,), (1377220540,), (1377220551,), (1377220559,), (1377220560,), (1377220562,), (1377220565,), (1377220567,), (1377220604,), (1377220623,), (1377220634,), (1377220648,), (1377220663,), (1377220671,), (1377220672,), (1377220674,), (1377220677,), (1377220693,), (1377220700,), (1377220701,), (1377220703,), (1377220706,), (1377220726,), (1377220739,), (1377303056,), (1377303384,), (1377303816,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15082025': {'nb_upload': 3, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26025138]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1377303816] map_info['map_portfolio_photo'] : {26025138: [1377303816, 1377303384, 1377303056]} final : True mtd_id 4302 list_pids : [1377303816] Looping around the photos to save general results len do output : 1 /26025138Didn'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, '3547374') ('4302', '26025138', '1377303816', None, None, None, None, None, '3547374') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26025138', 'None', None, None, None, None, '3547374'), ('4302', '26025138', '1377303816', None, None, None, None, None, '3547374')] time used for this insertion : 0.012813329696655273 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4039058685302734 time spend to save output : 0.013067960739135742 total time spend for step 5 : 1.4169738292694092 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 (3547374) 2.09user 2.57system 0:08.05elapsed 57%CPU (0avgtext+0avgdata 159284maxresident)k 14232inputs+1280outputs (165major+61936minor)pagefaults 0swaps