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 : 1653116 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 (3801337) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3801337) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384953 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3801337'] with mtr_portfolio_ids : ['27384953'] and first list_photo_ids : [] new path : /proc/1653116/ Name: python3 Umask: 0002 State: R (running) Tgid: 1653116 Ngid: 0 Pid: 1653116 PPid: 1653115 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1653116 NSpid: 1653116 NSpgid: 1651626 NSsid: 1651626 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99112 kB VmRSS: 99112 kB RssAnon: 59844 kB RssFile: 39268 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 47 nonvoluntary_ctxt_switches: 90 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1653116', 'Ngid': '0', 'Pid': '1653116', 'PPid': '1653115', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1653116', 'NSpid': '1653116', 'NSpgid': '1651626', 'NSsid': '1651626', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99112 kB', 'VmRSS': '99112 kB', 'RssAnon': '59844 kB', 'RssFile': '39268 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '47', 'nonvoluntary_ctxt_switches': '90'} ('datou_batch_current', '1653116', '1106868', '0', '1106868', '865620', '99112', b'', 'marlene', '3801337') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27384953) 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 (3801337 ) ) 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 (27384953) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1387073593, 'portfolio_id': 27384953}, {'photo_id': 1387073591, 'portfolio_id': 27384953}, {'photo_id': 1387073583, 'portfolio_id': 27384953}, {'photo_id': 1387073578, 'portfolio_id': 27384953}, {'photo_id': 1387073575, 'portfolio_id': 27384953}, {'photo_id': 1387073572, 'portfolio_id': 27384953}, {'photo_id': 1387073570, 'portfolio_id': 27384953}, {'photo_id': 1387073546, 'portfolio_id': 27384953}, {'photo_id': 1387073544, 'portfolio_id': 27384953}, {'photo_id': 1387073541, 'portfolio_id': 27384953}, {'photo_id': 1387073515, 'portfolio_id': 27384953}, {'photo_id': 1387073514, 'portfolio_id': 27384953}] map_portfolio_id_photo_id: {27384953: [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570, 1387073546, 1387073544, 1387073541, 1387073515, 1387073514]} ##### 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.050899505615234375 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Oct 1 05:34:56 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 (27384953) 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 : 27384953 get user id for portfolio 27384953 get sub ptf for main ptf 27384953, type 3726 and hashtags ['papier', 'Carton_gris', 'mal_croppe', 'environnement', 'Teint_Dans_La_Masse', 'flou', 'Carton_brun', 'metal', 'kraft', 'cartonnette', 'autre_refus', 'plastique'] 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`=27384953 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','mal_croppe','environnement','Teint_Dans_La_Masse','flou','Carton_brun','metal','kraft','cartonnette','autre_refus','plastique')) 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`=27384953 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','mal_croppe','environnement','Teint_Dans_La_Masse','flou','Carton_brun','metal','kraft','cartonnette','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 27384953, 'sub_port_id': 27384965, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505243, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'flou': {'main_port_id': 27384953, 'sub_port_id': 27384966, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505244, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'Carton_gris': {'main_port_id': 27384953, 'sub_port_id': 27384967, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505245, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'environnement': {'main_port_id': 27384953, 'sub_port_id': 27384968, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505246, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'autre_refus': {'main_port_id': 27384953, 'sub_port_id': 27384969, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505247, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 27384953, 'sub_port_id': 27384970, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505248, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'cartonnette': {'main_port_id': 27384953, 'sub_port_id': 27384971, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505249, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'Carton_brun': {'main_port_id': 27384953, 'sub_port_id': 27384972, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505250, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'mal_croppe': {'main_port_id': 27384953, 'sub_port_id': 27384973, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505251, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'kraft': {'main_port_id': 27384953, 'sub_port_id': 27384974, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505252, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'plastique': {'main_port_id': 27384953, 'sub_port_id': 27384975, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505253, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}, 'metal': {'main_port_id': 27384953, 'sub_port_id': 27384976, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505254, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 32), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27384965 , 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=27384953 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 (27384965) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384966 , 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=27384953 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 (27384966) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384967 , 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=27384953 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 (27384967) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384968 , 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=27384953 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 (27384968) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384969 , 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=27384953 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 (27384969) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384970 , 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=27384953 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 (27384970) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384971 , 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=27384953 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 (27384971) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384972 , 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=27384953 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 (27384972) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384973 , 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=27384953 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 (27384973) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384974 , 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=27384953 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 (27384974) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384975 , 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=27384953 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 (27384975) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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 27384976 , 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=27384953 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 (27384976) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27384953) result : ((1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) 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`=27384953 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','mal_croppe','environnement','Teint_Dans_La_Masse','flou','Carton_brun','metal','kraft','cartonnette','autre_refus','plastique')) 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`=27384953 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','Carton_gris','mal_croppe','environnement','Teint_Dans_La_Masse','flou','Carton_brun','metal','kraft','cartonnette','autre_refus','plastique')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 27384953, 'sub_port_id': 27384978, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505267, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'flou': {'main_port_id': 27384953, 'sub_port_id': 27384979, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505268, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'Carton_gris': {'main_port_id': 27384953, 'sub_port_id': 27384980, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505269, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'environnement': {'main_port_id': 27384953, 'sub_port_id': 27384984, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505270, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'autre_refus': {'main_port_id': 27384953, 'sub_port_id': 27384994, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505271, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 27384953, 'sub_port_id': 27384995, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505272, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'cartonnette': {'main_port_id': 27384953, 'sub_port_id': 27384996, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505273, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'Carton_brun': {'main_port_id': 27384953, 'sub_port_id': 27384997, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505274, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'mal_croppe': {'main_port_id': 27384953, 'sub_port_id': 27384998, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505275, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'kraft': {'main_port_id': 27384953, 'sub_port_id': 27384999, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505276, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'plastique': {'main_port_id': 27384953, 'sub_port_id': 27385000, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505277, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 33), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}, 'metal': {'main_port_id': 27384953, 'sub_port_id': 27385001, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18505278, 'last_updated_at': datetime.datetime(2025, 10, 1, 5, 33, 34), 'last_updated_at_desc': datetime.datetime(2025, 10, 1, 5, 33, 34), 'last_updated_at_asc': datetime.datetime(2025, 10, 1, 5, 33, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384978,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384965 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384979,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384966 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384980,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384967 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384984,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384968 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384994,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384969 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384995,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384970 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384996,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384971 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384997,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384972 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384998,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384973 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27384999,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384974 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27385000,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384975 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27385001,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27384976 lien utilise dans velours : https://marlene.fotonower.com/velours/27384978,27384979,27384980,27384984,27384994,27384995,27384996,27384997,27384998,27384999,27385000,27385001?tags=papier,flou,Carton_gris,environnement,autre_refus,Teint_Dans_La_Masse,cartonnette,Carton_brun,mal_croppe,kraft,plastique,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27384953]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] map_info['map_portfolio_photo'] : {27384953: [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570, 1387073546, 1387073544, 1387073541, 1387073515, 1387073514]} final : False mtd_id 4302 list_pids : [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] Looping around the photos to save general results len do output : 1 /27384953. 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, '3801337') ('4302', '27384953', '1387073593', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073591', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073583', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073578', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073575', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073572', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073570', None, None, None, None, None, '3801337') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '27384953', "{'papier': 27384965, 'flou': 27384966, 'Carton_gris': 27384967, 'environnement': 27384968, 'autre_refus': 27384969, 'Teint_Dans_La_Masse': 27384970, 'cartonnette': 27384971, 'Carton_brun': 27384972, 'mal_croppe': 27384973, 'kraft': 27384974, 'plastique': 27384975, 'metal': 27384976}", None, None, None, None, '3801337'), ('4302', '27384953', '1387073593', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073591', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073583', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073578', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073575', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073572', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073570', None, None, None, None, None, '3801337')] time used for this insertion : 0.03639841079711914 save_final save missing photos in datou_result : time spend for datou_step_exec : 5.035437822341919 time spend to save output : 0.03668045997619629 total time spend for step 1 : 5.072118282318115 step2:final Wed Oct 1 05:35:01 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 (27384953) 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 27384953 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1387073515,1387073514,1387073546,1387073593,1387073544,1387073591,1387073541,1387073583,1387073578,1387073575,1387073572,1387073570); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27384953]) Inside saveOutput : final : False verbose : True original output for save of step final : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} new output for save of step final : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] map_info['map_portfolio_photo'] : {27384953: [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570, 1387073546, 1387073544, 1387073541, 1387073515, 1387073514]} final : False mtd_id 4302 list_pids : [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] Looping around the photos to save general results len do output : 7 /1387073593.Didn't retrieve data . /1387073591.Didn't retrieve data . /1387073583.Didn't retrieve data . /1387073578.Didn't retrieve data . /1387073575.Didn't retrieve data . /1387073572.Didn't retrieve data . /1387073570.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, '3801337') ('4302', '27384953', '1387073593', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073591', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073583', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073578', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073575', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073572', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073570', None, None, None, None, None, '3801337') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 21 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', '27384953', '1387073593', '0.0', None, None, None, None, '3801337'), ('4302', '27384953', '1387073591', '0.0', None, None, None, None, '3801337'), ('4302', '27384953', '1387073583', '0.0', None, None, None, None, '3801337'), ('4302', '27384953', '1387073578', '0.0', None, None, None, None, '3801337'), ('4302', '27384953', '1387073575', '0.0', None, None, None, None, '3801337'), ('4302', '27384953', '1387073572', '0.0', None, None, None, None, '3801337'), ('4302', '27384953', '1387073570', '0.0', None, None, None, None, '3801337')] time used for this insertion : 0.04601144790649414 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.20567536354064941 time spend to save output : 0.04649710655212402 total time spend for step 2 : 0.25217247009277344 step3:velours_tree Wed Oct 1 05:35:02 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 : {27384953: [{'papier': 27384965, 'flou': 27384966, 'Carton_gris': 27384967, 'environnement': 27384968, 'autre_refus': 27384969, 'Teint_Dans_La_Masse': 27384970, 'cartonnette': 27384971, 'Carton_brun': 27384972, 'mal_croppe': 27384973, 'kraft': 27384974, 'plastique': 27384975, 'metal': 27384976}]} input_args_next_step : {27384953: ()} output_args : {27384953: [{'papier': 27384965, 'flou': 27384966, 'Carton_gris': 27384967, 'environnement': 27384968, 'autre_refus': 27384969, 'Teint_Dans_La_Masse': 27384970, 'cartonnette': 27384971, 'Carton_brun': 27384972, 'mal_croppe': 27384973, 'kraft': 27384974, 'plastique': 27384975, 'metal': 27384976}]} args : 27384953 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 27384965, 'flou': 27384966, 'Carton_gris': 27384967, 'environnement': 27384968, 'autre_refus': 27384969, 'Teint_Dans_La_Masse': 27384970, 'cartonnette': 27384971, 'Carton_brun': 27384972, 'mal_croppe': 27384973, 'kraft': 27384974, 'plastique': 27384975, 'metal': 27384976},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27384953) 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([27384953]) 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.31199193000793457 time spend to save output : 4.291534423828125e-05 total time spend for step 3 : 0.31203484535217285 step4:send_mail_cod Wed Oct 1 05:35:02 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 : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} input_args_next_step : {1387073593: ()} output_args : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} args : 1387073593 depend.output_id : 0 input_args_next_step : {1387073593: ('0.0',), 1387073591: ()} output_args : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} args : 1387073591 depend.output_id : 0 input_args_next_step : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ()} output_args : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} args : 1387073583 depend.output_id : 0 input_args_next_step : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ()} output_args : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} args : 1387073578 depend.output_id : 0 input_args_next_step : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ()} output_args : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} args : 1387073575 depend.output_id : 0 input_args_next_step : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ()} output_args : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} args : 1387073572 depend.output_id : 0 input_args_next_step : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ()} output_args : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',)} args : 1387073570 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {27384953: [{'papier': 27384965, 'flou': 27384966, 'Carton_gris': 27384967, 'environnement': 27384968, 'autre_refus': 27384969, 'Teint_Dans_La_Masse': 27384970, 'cartonnette': 27384971, 'Carton_brun': 27384972, 'mal_croppe': 27384973, 'kraft': 27384974, 'plastique': 27384975, 'metal': 27384976}]} input_args_next_step : {1387073593: ('0.0',), 1387073591: ('0.0',), 1387073583: ('0.0',), 1387073578: ('0.0',), 1387073575: ('0.0',), 1387073572: ('0.0',), 1387073570: ('0.0',), 27384953: ()} output_args : {27384953: [{'papier': 27384965, 'flou': 27384966, 'Carton_gris': 27384967, 'environnement': 27384968, 'autre_refus': 27384969, 'Teint_Dans_La_Masse': 27384970, 'cartonnette': 27384971, 'Carton_brun': 27384972, 'mal_croppe': 27384973, 'kraft': 27384974, 'plastique': 27384975, 'metal': 27384976}]} args : 27384953 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 :8, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27384953) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1387073593,1387073591,1387073583,1387073578,1387073575,1387073572,1387073570) Found this number of photos: 7 ##### Call download_photos : nb_thread : 5 begin to download photo : 1387073570 begin to download photo : 1387073575 begin to download photo : 1387073583 begin to download photo : 1387073593 download finish for photo 1387073583 begin to download photo : 1387073591 download finish for photo 1387073575 begin to download photo : 1387073578 download finish for photo 1387073593 download finish for photo 1387073570 begin to download photo : 1387073572 download finish for photo 1387073591 download finish for photo 1387073578 download finish for photo 1387073572 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette273849661759289702/ imagette273849691759289702/ imagette273849711759289702/ imagette273849731759289702/ imagette273849741759289702/ imagette273849751759289702/ imagette273849761759289702/ imagette273849671759289702/ imagette273849701759289702/ imagette273849721759289702/ length of list_filenames : 7 ; length of list_pids : 7 ; length of list_args : 7 results_Auto_P27384953_01-10-2025_05_35_02.pdf 27384966 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384966 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849661759289702 27384969 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384969 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849691759289702 27384971 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384971 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849711759289702 27384973 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384973 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849731759289702 27384974 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384974 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849741759289702 27384975 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384975 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849751759289702 27384976 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384976 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849761759289702 27384967 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384967 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849671759289702 27384970 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384970 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849701759289702 27384972 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384972 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette273849721759289702 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27384953 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27384978,27384979,27384980,27384984,27384994,27384995,27384996,27384997,27384998,27384999,27385000,27385001?tags=papier,flou,Carton_gris,environnement,autre_refus,Teint_Dans_La_Masse,cartonnette,Carton_brun,mal_croppe,kraft,plastique,metal your option no_mail is active, we will not send the real mail to your client args[1387073593] : ('0.0',) no score found for photo 1387073593 We are sending mail with results at report@fotonower.com args[1387073591] : ('0.0',) no score found for photo 1387073591 We are sending mail with results at report@fotonower.com args[1387073583] : ('0.0',) no score found for photo 1387073583 We are sending mail with results at report@fotonower.com args[1387073578] : ('0.0',) no score found for photo 1387073578 We are sending mail with results at report@fotonower.com args[1387073575] : ('0.0',) no score found for photo 1387073575 We are sending mail with results at report@fotonower.com args[1387073572] : ('0.0',) no score found for photo 1387073572 We are sending mail with results at report@fotonower.com args[1387073570] : ('0.0',) no score found for photo 1387073570 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_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384953 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_P27384953_01-10-2025_05_35_02.pdf results_Auto_P27384953_01-10-2025_05_35_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27384953_01-10-2025_05_35_02.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','27384953','results_Auto_P27384953_01-10-2025_05_35_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27384953_01-10-2025_05_35_02.pdf','pdf','','0.08','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27384953]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] map_info['map_portfolio_photo'] : {27384953: [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570, 1387073546, 1387073544, 1387073541, 1387073515, 1387073514]} final : False mtd_id 4302 list_pids : [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] 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, '3801337') ('4302', '27384953', '1387073593', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073591', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073583', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073578', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073575', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073572', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073570', None, None, None, None, None, '3801337') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27384953', '1387073593', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073591', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073583', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073578', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073575', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073572', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073570', None, None, None, None, None, '3801337')] time used for this insertion : 0.036305904388427734 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7363488674163818 time spend to save output : 0.03654837608337402 total time spend for step 4 : 1.7728972434997559 step5:split_time_score Wed Oct 1 05:35:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['27384953'] 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 : [('27384953',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27384953) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1387073593: {'path': 'temp/1759289702_1653116_1387073593_a5496ef5fdc4a35543d68b73dc3fdd00.jpg', 'extension': 'jpg'}, 1387073583: {'path': 'temp/1759289702_1653116_1387073583_091c4c0019ab9fb2a2e83730964ff84f.jpg', 'extension': 'jpg'}, 1387073591: {'path': 'temp/1759289702_1653116_1387073591_65854ad862a43737080d156d566b2cbc.jpg', 'extension': 'jpg'}, 1387073575: {'path': 'temp/1759289702_1653116_1387073575_baf440adbc192e10e5e600004fadd91a.jpg', 'extension': 'jpg'}, 1387073578: {'path': 'temp/1759289702_1653116_1387073578_1000d65b54b293aa0642ec95f8641093.jpg', 'extension': 'jpg'}, 1387073570: {'path': 'temp/1759289702_1653116_1387073570_823943bf4b00adf1f62edeaba5fb8eda.jpg', 'extension': 'jpg'}, 1387073572: {'path': 'temp/1759289702_1653116_1387073572_16dcdfa9e17793a390149fdf297cc79a.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 = 27384953; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27384953 group by h (('05', 12),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27384953 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 (27384953) 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 (27384953) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 01102025 27384953 Nombre de photos uploadées : 12 / 23040 (0%) 01102025 27384953 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 01102025 27384953 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1387073515, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/ee31c5b33c5e285c8ba6258ca5b2277b.jpg', 'username': None, 'uploaded_at': 1759289468, 'text': 'image_01102025_05_30_14_10136.jpg'}, {'photo_id': 1387073514, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/3b7f5161ab6204cdcf62dd3391dcad3f.jpg', 'username': None, 'uploaded_at': 1759289468, 'text': 'image_01102025_05_30_24_10137.jpg'}, {'photo_id': 1387073546, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/25cfaeb7d3900dbccd1e3c5e381ab610.jpg', 'username': None, 'uploaded_at': 1759289528, 'text': 'image_01102025_05_30_43_10136.jpg'}, {'photo_id': 1387073593, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/1/a5496ef5fdc4a35543d68b73dc3fdd00.jpg', 'username': None, 'uploaded_at': 1759289628, 'text': 'image_01102025_05_30_43_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 8.58306884765625e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0008108615875244141 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27384953, '2025-10-01' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-10-01' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2369419,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6513628959655762 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= 2369419 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27375839, 'dashboard_result_id': 15846001, '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_P27375839_01-10-2025_00_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27375884, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27375885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27375886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27375887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27375888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27375889, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27375890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27375891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27375892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27375893, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27375894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27375895, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27376525, 'dashboard_result_id': 15846002, '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_P27376525_01-10-2025_00_33_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27376527, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376528, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376529, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376531, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376533, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376535, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376538, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27376906, 'dashboard_result_id': 15846003, '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_P27376906_01-10-2025_00_47_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27376933, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376936, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376937, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376938, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376939, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27377191, 'dashboard_result_id': 15846004, '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_P27377191_01-10-2025_01_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27377197, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27377198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27377199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27377200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27377201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27377202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27377203, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27377204, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27377205, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27377206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27377207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27377208, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27378456, 'dashboard_result_id': 15846005, '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_P27378456_01-10-2025_01_47_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27378462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27378463, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27378464, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27378465, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27378466, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27378467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27378468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27378469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27378470, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27378471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27378472, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27378473, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27378717, 'dashboard_result_id': 15846006, '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_P27378717_01-10-2025_02_05_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27378729, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27378730, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27378731, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27378732, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27378733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27378734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27378735, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27378736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27378737, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27378738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27378739, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27378740, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27378994, 'dashboard_result_id': 15846007, '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_P27378994_01-10-2025_02_17_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379006, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379007, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379017, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379018, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27379410, 'dashboard_result_id': 15846008, '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_P27379410_01-10-2025_02_33_36.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379422, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379425, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379441, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379446, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27379907, 'dashboard_result_id': 15846009, '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_P27379907_01-10-2025_02_49_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379912, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379913, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379914, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379917, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379918, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379920, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379921, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379922, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379923, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27380372, 'dashboard_result_id': 15846010, '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_P27380372_01-10-2025_03_07_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27380391, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27380393, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27380394, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27380395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27380396, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27380397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27380398, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27380399, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27380400, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27380401, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27380402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27380403, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27380848, 'dashboard_result_id': 15846011, '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_P27380848_01-10-2025_03_17_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27380892, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27380893, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27380894, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27380895, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27380896, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27380897, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27380899, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27380900, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27380901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27380902, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27380903, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27380904, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27381440, 'dashboard_result_id': 15846012, '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_P27381440_01-10-2025_03_33_35.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27381451, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27381452, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27381453, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27381454, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27381455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27381456, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27381458, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27381459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27381460, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27381461, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27381462, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27381463, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27381997, 'dashboard_result_id': 15846013, '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_P27381997_01-10-2025_03_50_06.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382004, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382005, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382006, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382007, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382008, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382010, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382011, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382013, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382014, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27382455, 'dashboard_result_id': 15846014, '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_P27382455_01-10-2025_04_03_35.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382463, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382464, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382465, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382466, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382468, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382470, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382472, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382473, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27382890, 'dashboard_result_id': 15846015, '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_P27382890_01-10-2025_04_13_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382941, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382942, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382943, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382944, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382945, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382946, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382948, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382949, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382950, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382951, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382952, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27384322, 'dashboard_result_id': 15846016, '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_P27384322_01-10-2025_05_17_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27384328, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27384329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27384330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27384331, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27384332, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27384333, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27384334, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27384335, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27384336, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27384337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27384338, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27384339, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27384680, 'dashboard_result_id': 15846017, '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_P27384680_01-10-2025_05_33_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27384686, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27384687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27384688, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27384689, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27384690, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27384691, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27384692, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27384693, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27384694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27384695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27384696, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27384697, 'pht': 3726}}"}, {'dashboat_entry_day': 2369419, 'dashboard_run_id': 2378219, 'mtr_portfolio_id': 27384953, 'dashboard_result_id': 15846018, '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_P27384953_01-10-2025_05_33_35.pdf'}"}] 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 = 27375839 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': 3797909, 'mtr_portfolio_id': 27375839, 'created_at': datetime.datetime(2025, 10, 1, 0, 17), 'result': '0.05926231604959723', 'result_long': None, 'result_double': None}] Qualite : 0.05926231604959723 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27375839 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27375839_01-10-2025_00_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27375839 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_P27375839_01-10-2025_00_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27375884, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27375885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27375886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27375887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27375888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27375889, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27375890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27375891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27375892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27375893, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27375894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27375895, 'pht': 3726}}" where mtr_portfolio_id = 27375839 and dashboard_run_id = 2378219 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`=27375839 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846001, 0.05926231604959723, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27375839_01-10-2025_00_17_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27375884, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27375885, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27375886, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27375887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27375888, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27375889, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27375890, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27375891, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27375892, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27375893, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27375894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27375895, '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 = 27376525 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': 3797954, 'mtr_portfolio_id': 27376525, 'created_at': datetime.datetime(2025, 10, 1, 0, 33, 34), 'result': '0.07297377682741689', 'result_long': None, 'result_double': None}] Qualite : 0.07297377682741689 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27376525 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376525_01-10-2025_00_33_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27376525 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_P27376525_01-10-2025_00_33_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27376527, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376528, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376529, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376531, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376533, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376535, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376538, 'pht': 3726}}" where mtr_portfolio_id = 27376525 and dashboard_run_id = 2378219 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`=27376525 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846002, 0.07297377682741689, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376525_01-10-2025_00_33_35.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27376527, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376528, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376529, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376530, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376531, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376532, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376533, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376534, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376535, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376536, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376537, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376538, '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 = 27376906 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': 3798005, 'mtr_portfolio_id': 27376906, 'created_at': datetime.datetime(2025, 10, 1, 0, 47, 3), 'result': '0.053940660498579276', 'result_long': None, 'result_double': None}] Qualite : 0.053940660498579276 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27376906 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376906_01-10-2025_00_47_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27376906 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_P27376906_01-10-2025_00_47_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27376933, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376936, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376937, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376938, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376939, 'pht': 3726}}" where mtr_portfolio_id = 27376906 and dashboard_run_id = 2378219 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`=27376906 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846003, 0.053940660498579276, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27376906_01-10-2025_00_47_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27376928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27376929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27376930, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27376931, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27376932, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27376933, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27376934, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27376935, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27376936, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27376937, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27376938, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27376939, '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 = 27377191 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': 3798117, 'mtr_portfolio_id': 27377191, 'created_at': datetime.datetime(2025, 10, 1, 1, 3), 'result': '0.06445660284371924', 'result_long': None, 'result_double': None}] Qualite : 0.06445660284371924 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27377191 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27377191 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_P27377191_01-10-2025_01_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27377197, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27377198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27377199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27377200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27377201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27377202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27377203, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27377204, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27377205, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27377206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27377207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27377208, 'pht': 3726}}" where mtr_portfolio_id = 27377191 and dashboard_run_id = 2378219 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`=27377191 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846004, 0.06445660284371924, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27377191_01-10-2025_01_03_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27377197, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27377198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27377199, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27377200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27377201, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27377202, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27377203, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27377204, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27377205, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27377206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27377207, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27377208, '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 = 27378456 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': 3798457, 'mtr_portfolio_id': 27378456, 'created_at': datetime.datetime(2025, 10, 1, 1, 47, 5), 'result': '0.07494427881729167', 'result_long': None, 'result_double': None}] Qualite : 0.07494427881729167 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27378456 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27378456_01-10-2025_01_47_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27378456 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_P27378456_01-10-2025_01_47_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27378462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27378463, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27378464, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27378465, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27378466, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27378467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27378468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27378469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27378470, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27378471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27378472, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27378473, 'pht': 3726}}" where mtr_portfolio_id = 27378456 and dashboard_run_id = 2378219 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`=27378456 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846005, 0.07494427881729167, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27378456_01-10-2025_01_47_05.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27378462, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27378463, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27378464, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27378465, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27378466, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27378467, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27378468, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27378469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27378470, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27378471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27378472, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27378473, '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 = 27378717 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': 3798527, 'mtr_portfolio_id': 27378717, 'created_at': datetime.datetime(2025, 10, 1, 2, 5, 3), 'result': '0.12480798154941312', 'result_long': None, 'result_double': None}] Qualite : 0.12480798154941312 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27378717 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27378717_01-10-2025_02_05_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27378717 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_P27378717_01-10-2025_02_05_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27378729, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27378730, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27378731, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27378732, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27378733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27378734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27378735, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27378736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27378737, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27378738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27378739, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27378740, 'pht': 3726}}" where mtr_portfolio_id = 27378717 and dashboard_run_id = 2378219 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`=27378717 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846006, 0.12480798154941312, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27378717_01-10-2025_02_05_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27378729, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27378730, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27378731, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27378732, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27378733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27378734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27378735, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27378736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27378737, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27378738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27378739, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27378740, '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 = 27378994 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': 3798659, 'mtr_portfolio_id': 27378994, 'created_at': datetime.datetime(2025, 10, 1, 2, 17, 1), 'result': '0.06341386679330407', 'result_long': None, 'result_double': None}] Qualite : 0.06341386679330407 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27378994 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27378994_01-10-2025_02_17_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27378994 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_P27378994_01-10-2025_02_17_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379006, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379007, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379017, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379018, 'pht': 3726}}" where mtr_portfolio_id = 27378994 and dashboard_run_id = 2378219 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`=27378994 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846007, 0.06341386679330407, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27378994_01-10-2025_02_17_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379006, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379007, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379008, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379011, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379012, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379014, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379015, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379016, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379017, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379018, '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 = 27379410 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': 3798750, 'mtr_portfolio_id': 27379410, 'created_at': datetime.datetime(2025, 10, 1, 2, 33, 35), 'result': '0.03945989714714962', 'result_long': None, 'result_double': None}] Qualite : 0.03945989714714962 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27379410 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27379410_01-10-2025_02_33_36.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27379410 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_P27379410_01-10-2025_02_33_36.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379422, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379425, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379441, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379446, 'pht': 3726}}" where mtr_portfolio_id = 27379410 and dashboard_run_id = 2378219 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`=27379410 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846008, 0.03945989714714962, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27379410_01-10-2025_02_33_36.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379422, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379423, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379424, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379425, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379440, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379441, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379442, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379443, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379446, '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 = 27379907 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 = 27379907 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 = 27379907 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27379907 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 = 27379907 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 = 27379907 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27379907_01-10-2025_02_49_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27379907 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_P27379907_01-10-2025_02_49_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27379912, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27379913, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27379914, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27379915, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27379916, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27379917, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27379918, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27379919, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27379920, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27379921, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27379922, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27379923, 'pht': 3726}}" where mtr_portfolio_id = 27379907 and dashboard_run_id = 2378219 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 = 27380372 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': 3799225, 'mtr_portfolio_id': 27380372, 'created_at': datetime.datetime(2025, 10, 1, 3, 7, 3), 'result': '0.04429797687544566', 'result_long': None, 'result_double': None}] Qualite : 0.04429797687544566 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27380372 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27380372_01-10-2025_03_07_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27380372 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_P27380372_01-10-2025_03_07_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27380391, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27380393, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27380394, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27380395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27380396, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27380397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27380398, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27380399, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27380400, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27380401, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27380402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27380403, 'pht': 3726}}" where mtr_portfolio_id = 27380372 and dashboard_run_id = 2378219 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`=27380372 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846010, 0.04429797687544566, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27380372_01-10-2025_03_07_04.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27380391, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27380393, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27380394, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27380395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27380396, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27380397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27380398, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27380399, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27380400, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27380401, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27380402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27380403, '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 = 27380848 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': 3799487, 'mtr_portfolio_id': 27380848, 'created_at': datetime.datetime(2025, 10, 1, 3, 17, 29), 'result': '0.0378919996012994', 'result_long': None, 'result_double': None}] Qualite : 0.0378919996012994 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27380848 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27380848_01-10-2025_03_17_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27380848 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_P27380848_01-10-2025_03_17_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27380892, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27380893, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27380894, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27380895, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27380896, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27380897, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27380899, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27380900, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27380901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27380902, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27380903, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27380904, 'pht': 3726}}" where mtr_portfolio_id = 27380848 and dashboard_run_id = 2378219 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`=27380848 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846011, 0.0378919996012994, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27380848_01-10-2025_03_17_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27380892, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27380893, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27380894, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27380895, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27380896, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27380897, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27380899, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27380900, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27380901, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27380902, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27380903, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27380904, '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 = 27381440 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': 3799749, 'mtr_portfolio_id': 27381440, 'created_at': datetime.datetime(2025, 10, 1, 3, 33, 34), 'result': '0.049456037333140024', 'result_long': None, 'result_double': None}] Qualite : 0.049456037333140024 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27381440 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27381440_01-10-2025_03_33_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27381440 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_P27381440_01-10-2025_03_33_35.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27381451, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27381452, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27381453, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27381454, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27381455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27381456, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27381458, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27381459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27381460, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27381461, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27381462, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27381463, 'pht': 3726}}" where mtr_portfolio_id = 27381440 and dashboard_run_id = 2378219 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`=27381440 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846012, 0.049456037333140024, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27381440_01-10-2025_03_33_35.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27381451, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27381452, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27381453, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27381454, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27381455, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27381456, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27381458, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27381459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27381460, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27381461, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27381462, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27381463, '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 = 27381997 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 = 27381997 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 = 27381997 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27381997 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 = 27381997 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 = 27381997 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27381997_01-10-2025_03_50_06.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27381997 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_P27381997_01-10-2025_03_50_06.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382003, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382004, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382005, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382006, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382007, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382008, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382009, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382010, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382011, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382012, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382013, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382014, 'pht': 3726}}" where mtr_portfolio_id = 27381997 and dashboard_run_id = 2378219 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 = 27382455 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': 3800290, 'mtr_portfolio_id': 27382455, 'created_at': datetime.datetime(2025, 10, 1, 4, 3, 34), 'result': '0.0466531128494615', 'result_long': None, 'result_double': None}] Qualite : 0.0466531128494615 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27382455 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27382455_01-10-2025_04_03_35.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27382455 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_P27382455_01-10-2025_04_03_35.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382463, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382464, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382465, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382466, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382468, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382470, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382472, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382473, 'pht': 3726}}" where mtr_portfolio_id = 27382455 and dashboard_run_id = 2378219 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`=27382455 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846014, 0.0466531128494615, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27382455_01-10-2025_04_03_35.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382463, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382464, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382465, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382466, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382467, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382468, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382470, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382471, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382472, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382473, '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 = 27382890 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': 3800529, 'mtr_portfolio_id': 27382890, 'created_at': datetime.datetime(2025, 10, 1, 4, 13, 1), 'result': '0.027272265009682464', 'result_long': None, 'result_double': None}] Qualite : 0.027272265009682464 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27382890 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27382890_01-10-2025_04_13_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27382890 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_P27382890_01-10-2025_04_13_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382941, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382942, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382943, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382944, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382945, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382946, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382948, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382949, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382950, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382951, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382952, 'pht': 3726}}" where mtr_portfolio_id = 27382890 and dashboard_run_id = 2378219 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`=27382890 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846015, 0.027272265009682464, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27382890_01-10-2025_04_13_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27382941, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27382942, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27382943, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27382944, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27382945, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27382946, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27382947, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27382948, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27382949, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27382950, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27382951, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27382952, '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 = 27384322 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': 3801213, 'mtr_portfolio_id': 27384322, 'created_at': datetime.datetime(2025, 10, 1, 5, 17, 2), 'result': '0.054236969790385094', 'result_long': None, 'result_double': None}] Qualite : 0.054236969790385094 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27384322 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27384322_01-10-2025_05_17_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27384322 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_P27384322_01-10-2025_05_17_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27384328, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27384329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27384330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27384331, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27384332, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27384333, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27384334, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27384335, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27384336, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27384337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27384338, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27384339, 'pht': 3726}}" where mtr_portfolio_id = 27384322 and dashboard_run_id = 2378219 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`=27384322 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846016, 0.054236969790385094, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27384322_01-10-2025_05_17_02.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27384328, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27384329, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27384330, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27384331, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27384332, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27384333, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27384334, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27384335, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27384336, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27384337, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27384338, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27384339, '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 = 27384680 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': 3801260, 'mtr_portfolio_id': 27384680, 'created_at': datetime.datetime(2025, 10, 1, 5, 33, 2), 'result': '0.024412615480622735', 'result_long': None, 'result_double': None}] Qualite : 0.024412615480622735 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27384680 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27384680_01-10-2025_05_33_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27384680 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_P27384680_01-10-2025_05_33_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27384686, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27384687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27384688, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27384689, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27384690, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27384691, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27384692, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27384693, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27384694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27384695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27384696, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27384697, 'pht': 3726}}" where mtr_portfolio_id = 27384680 and dashboard_run_id = 2378219 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`=27384680 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15846017, 0.024412615480622735, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27384680_01-10-2025_05_33_03.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27384686, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27384687, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27384688, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27384689, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27384690, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27384691, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27384692, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27384693, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27384694, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27384695, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27384696, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27384697, '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 = 27384953 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 = 27384953 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 = 27384953 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27384953 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 = 27384953 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 = 27384953 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27384953_01-10-2025_05_35_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27384953 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_P27384953_01-10-2025_05_35_02.pdf'}" where mtr_portfolio_id = 27384953 and dashboard_run_id = 2378219 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27375839,27376525,27376906,27377191,27378456,27378717,27378994,27379410,27379907,27380372,27380848,27381440,27381997,27382455,27382890,27384322,27384680,27384953) result : ((1387049350,), (1387051024,), (1387051025,), (1387051027,), (1387051041,), (1387051044,), (1387051049,), (1387051073,), (1387051318,), (1387051321,), (1387051333,), (1387051551,), (1387051617,), (1387051623,), (1387052038,), (1387052041,), (1387052204,), (1387052206,), (1387052208,), (1387052211,), (1387052272,), (1387052289,), (1387052294,), (1387052297,), (1387052453,), (1387052457,), (1387052478,), (1387052500,), (1387052502,), (1387052504,), (1387052768,), (1387052851,), (1387052908,), (1387052905,), (1387052965,), (1387052985,), (1387052989,), (1387053194,), (1387053439,), (1387053472,), (1387053474,), (1387053485,), (1387053491,), (1387053509,), (1387053515,), (1387053518,), (1387053530,), (1387053533,), (1387053536,), (1387053540,), (1387053543,), (1387053588,), (1387053595,), (1387053599,), (1387053601,), (1387053604,), (1387053618,), (1387053619,), (1387053620,), (1387053622,), (1387053626,), (1387053640,), (1387053653,), (1387053656,), (1387053660,), (1387053664,), (1387053666,), (1387053670,), (1387053673,), (1387053674,), (1387053684,), (1387053688,), (1387053691,), (1387053694,), (1387053726,), (1387053727,), (1387053738,), (1387053753,), (1387053756,), (1387053761,), (1387053767,), (1387053771,), (1387053815,), (1387053836,), (1387053839,), (1387053842,), (1387053856,), (1387053864,), (1387053868,), (1387053901,), (1387053903,), (1387053905,), (1387053908,), (1387053911,), (1387053914,), (1387053926,), (1387053928,), (1387053929,), (1387053932,), (1387053935,), (1387053938,), (1387053962,), (1387053965,), (1387053968,), (1387053971,), (1387054013,), (1387054047,), (1387054049,), (1387054069,), (1387054083,), (1387053999,), (1387054002,), (1387054003,), (1387054006,), (1387054009,), (1387054089,), (1387054091,), (1387054095,), (1387054137,), (1387054180,), (1387054182,), (1387054183,), (1387054201,), (1387054206,), (1387054210,), (1387054220,), (1387054223,), (1387054225,), (1387054229,), (1387054231,), (1387054234,), (1387054262,), (1387054270,), (1387054274,), (1387054277,), (1387054281,), (1387054289,), (1387054379,), (1387054382,), (1387054385,), (1387054420,), (1387054426,), (1387054427,), (1387054429,), (1387054454,), (1387054457,), (1387054459,), (1387054463,), (1387054467,), (1387054478,), (1387054481,), (1387054484,), (1387054487,), (1387054499,), (1387054502,), (1387054504,), (1387054506,), (1387054519,), (1387054521,), (1387054522,), (1387054525,), (1387054528,), (1387054565,), (1387054567,), (1387054569,), (1387054573,), (1387054577,), (1387054595,), (1387054598,), (1387054603,), (1387054609,), (1387054610,), (1387054612,), (1387054617,), (1387054620,), (1387054626,), (1387054628,), (1387054631,), (1387054634,), (1387054635,), (1387054636,), (1387054637,), (1387054638,), (1387054639,), (1387054651,), (1387054656,), (1387054658,), (1387054659,), (1387054660,), (1387054680,), (1387054678,), (1387054721,), (1387054745,), (1387054749,), (1387054752,), (1387054755,), (1387054821,), (1387054825,), (1387054828,), (1387054905,), (1387054916,), (1387054931,), (1387054934,), (1387054949,), (1387054959,), (1387054982,), (1387054985,), (1387054988,), (1387054992,), (1387054995,), (1387054997,), (1387055004,), (1387055006,), (1387055008,), (1387055011,), (1387055014,), (1387055017,), (1387055025,), (1387055028,), (1387055032,), (1387055035,), (1387055064,), (1387055075,), (1387055079,), (1387055129,), (1387055131,), (1387055134,), (1387055137,), (1387055146,), (1387055153,), (1387055155,), (1387055156,), (1387055162,), (1387055164,), (1387055167,), (1387055170,), (1387055174,), (1387055176,), (1387055193,), (1387055196,), (1387055200,), (1387055205,), (1387055210,), (1387055228,), (1387055231,), (1387055234,), (1387055249,), (1387055252,), (1387055255,), (1387055299,), (1387055310,), (1387055312,), (1387055315,), (1387055317,), (1387055335,), (1387055401,), (1387055404,), (1387055405,), (1387055579,), (1387055583,), (1387055585,), (1387055589,), (1387055593,), (1387055598,), (1387055599,), (1387055611,), (1387055613,), (1387055643,), (1387055645,), (1387055647,), (1387055655,), (1387056068,), (1387059050,), (1387059081,), (1387059084,), (1387059085,), (1387059087,), (1387059090,), (1387059093,), (1387059106,), (1387059109,), (1387059130,), (1387059138,), (1387059146,), (1387059155,), (1387059162,), (1387059163,), (1387059164,), (1387059169,), (1387059210,), (1387059231,), (1387059245,), (1387059249,), (1387059250,), (1387059251,), (1387059252,), (1387059257,), (1387059275,), (1387059277,), (1387059278,), (1387059281,), (1387059336,), (1387059342,), (1387059386,), (1387059392,), (1387059394,), (1387059397,), (1387059403,), (1387059416,), (1387059419,), (1387059425,), (1387059428,), (1387059432,), (1387059473,), (1387059475,), (1387059477,), (1387059480,), (1387059494,), (1387059501,), (1387059505,), (1387059509,), (1387059516,), (1387059527,), (1387059567,), (1387059574,), (1387059578,), (1387059585,), (1387059589,), (1387059613,), (1387059614,), (1387059616,), (1387059617,), (1387059626,), (1387059633,), (1387059640,), (1387059642,), (1387059644,), (1387059645,), (1387059646,), (1387059648,), (1387059664,), (1387059666,), (1387059668,), (1387059671,), (1387059712,), (1387059705,), (1387059707,), (1387059709,), (1387059755,), (1387059785,), (1387059788,), (1387059904,), (1387059908,), (1387059912,), (1387059975,), (1387059983,), (1387059985,), (1387060001,), (1387060004,), (1387060006,), (1387060008,), (1387060011,), (1387060030,), (1387060033,), (1387060036,), (1387060038,), (1387060065,), (1387060066,), (1387060069,), (1387060073,), (1387060077,), (1387060089,), (1387060093,), (1387060097,), (1387060142,), (1387060145,), (1387060148,), (1387060153,), (1387060229,), (1387060247,), (1387060250,), (1387060254,), (1387060258,), (1387060281,), (1387060284,), (1387060287,), (1387060291,), (1387060295,), (1387060299,), (1387060833,), (1387060835,), (1387060841,), (1387060843,), (1387060844,), (1387060850,), (1387060855,), (1387060864,), (1387060905,), (1387060906,), (1387061570,), (1387061589,), (1387060766,), (1387060769,), (1387060800,), (1387060804,), (1387060899,), (1387060901,), (1387060903,), (1387060930,), (1387060931,), (1387060944,), (1387060950,), (1387061450,), (1387061452,), (1387061459,), (1387061546,), (1387061593,), (1387061594,), (1387061597,), (1387061598,), (1387061602,), (1387061603,), (1387061607,), (1387061608,), (1387061616,), (1387061636,), (1387061638,), (1387061640,), (1387061641,), (1387061671,), (1387061683,), (1387061686,), (1387061690,), (1387061694,), (1387061716,), (1387061719,), (1387061721,), (1387061805,), (1387061997,), (1387061999,), (1387062001,), (1387062020,), (1387062022,), (1387062024,), (1387062040,), (1387062081,), (1387062086,), (1387062089,), (1387062093,), (1387062128,), (1387062130,), (1387062132,), (1387062134,), (1387062136,), (1387062145,), (1387062147,), (1387062149,), (1387062152,), (1387062156,), (1387062157,), (1387062159,), (1387062161,), (1387062163,), (1387062164,), (1387062168,), (1387062175,), (1387062177,), (1387062179,), (1387062181,), (1387062182,), (1387062188,), (1387062189,), (1387062191,), (1387062192,), (1387062199,), (1387062215,), (1387062269,), (1387062236,), (1387062238,), (1387062240,), (1387062327,), (1387062330,), (1387062333,), (1387062335,), (1387062338,), (1387062370,), (1387062384,), (1387062393,), (1387062401,), (1387062404,), (1387062405,), (1387062414,), (1387062416,), (1387062417,), (1387062419,), (1387062435,), (1387062442,), (1387062497,), (1387062499,), (1387062501,), (1387062504,), (1387062539,), (1387062542,), (1387062545,), (1387062547,), (1387062564,), (1387062566,), (1387062570,), (1387062584,), (1387062590,), (1387062591,), (1387062608,), (1387062613,), (1387062615,), (1387062616,), (1387062617,), (1387062631,), (1387062633,), (1387062635,), (1387062637,), (1387062647,), (1387062650,), (1387062653,), (1387062664,), (1387062666,), (1387062668,), (1387062670,), (1387062673,), (1387062676,), (1387062683,), (1387062685,), (1387062687,), (1387062690,), (1387062692,), (1387062694,), (1387062701,), (1387062704,), (1387062707,), (1387062719,), (1387062721,), (1387062723,), (1387062724,), (1387062727,), (1387062758,), (1387062738,), (1387062741,), (1387062744,), (1387062747,), (1387062751,), (1387062779,), (1387062805,), (1387062844,), (1387062850,), (1387062857,), (1387062861,), (1387062867,), (1387062929,), (1387062931,), (1387062933,), (1387062936,), (1387063039,), (1387063050,), (1387063055,), (1387063058,), (1387063082,), (1387063087,), (1387063088,), (1387063089,), (1387063097,), (1387063099,), (1387063100,), (1387063101,), (1387063103,), (1387063111,), (1387063127,), (1387063130,), (1387063132,), (1387063134,), (1387063137,), (1387063139,), (1387063145,), (1387063166,), (1387063170,), (1387063174,), (1387063177,), (1387063180,), (1387063186,), (1387063206,), (1387063208,), (1387063210,), (1387063212,), (1387063214,), (1387063229,), (1387063230,), (1387063231,), (1387063233,), (1387063240,), (1387063246,), (1387063248,), (1387063253,), (1387063258,), (1387063260,), (1387063283,), (1387063269,), (1387063271,), (1387063273,), (1387063278,), (1387063280,), (1387063289,), (1387063294,), (1387063295,), (1387063296,), (1387063298,), (1387063309,), (1387063311,), (1387063315,), (1387063325,), (1387063327,), (1387063329,), (1387063331,), (1387063333,), (1387063336,), (1387063354,), (1387063355,), (1387063356,), (1387063358,), (1387063368,), (1387063393,), (1387063394,), (1387063395,), (1387063397,), (1387063429,), (1387063431,), (1387063433,), (1387063447,), (1387063449,), (1387063453,), (1387063456,), (1387063458,), (1387063461,), (1387063469,), (1387063472,), (1387063476,), (1387063479,), (1387063482,), (1387063495,), (1387063498,), (1387063501,), (1387063515,), (1387063517,), (1387063518,), (1387063521,), (1387063530,), (1387063535,), (1387063572,), (1387063575,), (1387063581,), (1387063583,), (1387063587,), (1387063589,), (1387063609,), (1387063612,), (1387063614,), (1387063632,), (1387063635,), (1387063637,), (1387063647,), (1387063655,), (1387063658,), (1387063709,), (1387064365,), (1387063600,), (1387063602,), (1387063604,), (1387063664,), (1387063666,), (1387063690,), (1387063703,), (1387063752,), (1387063753,), (1387063766,), (1387063767,), (1387063770,), (1387063773,), (1387063776,), (1387063777,), (1387063781,), (1387063782,), (1387063784,), (1387063786,), (1387063789,), (1387064266,), (1387064359,), (1387064361,), (1387064363,), (1387064374,), (1387064378,), (1387064381,), (1387064384,), (1387064388,), (1387065043,), (1387065046,), (1387065049,), (1387065051,), (1387065053,), (1387065066,), (1387065068,), (1387065071,), (1387065075,), (1387065120,), (1387065586,), (1387065602,), (1387065605,), (1387065608,), (1387065620,), (1387065623,), (1387065626,), (1387065628,), (1387065647,), (1387065728,), (1387065725,), (1387065727,), (1387065748,), (1387065752,), (1387065755,), (1387065827,), (1387065830,), (1387065833,), (1387065835,), (1387065837,), (1387065838,), (1387065854,), (1387065856,), (1387065857,), (1387065858,), (1387065866,), (1387065906,), (1387065907,), (1387065908,), (1387065910,), (1387065913,), (1387065926,), (1387065930,), (1387065968,), (1387065972,), (1387065976,), (1387065980,), (1387066018,), (1387066021,), (1387066049,), (1387066051,), (1387066101,), (1387066103,), (1387066104,), (1387066107,), (1387066120,), (1387066122,), (1387066125,), (1387066133,), (1387066194,), (1387066198,), (1387066202,), (1387066205,), (1387066218,), (1387066220,), (1387066222,), (1387066225,), (1387066233,), (1387066241,), (1387066277,), (1387066279,), (1387066280,), (1387066283,), (1387066285,), (1387066287,), (1387066293,), (1387066296,), (1387066299,), (1387066305,), (1387066308,), (1387066310,), (1387066337,), (1387066316,), (1387066323,), (1387066326,), (1387066335,), (1387066343,), (1387066346,), (1387066351,), (1387066355,), (1387066374,), (1387066386,), (1387066387,), (1387066388,), (1387066389,), (1387066413,), (1387066418,), (1387066422,), (1387066424,), (1387066439,), (1387066442,), (1387066444,), (1387066447,), (1387066476,), (1387066478,), (1387066481,), (1387066484,), (1387066489,), (1387066493,), (1387066514,), (1387066518,), (1387066521,), (1387066528,), (1387066539,), (1387066572,), (1387066574,), (1387066597,), (1387066601,), (1387066604,), (1387066607,), (1387066609,), (1387066612,), (1387066634,), (1387066639,), (1387066642,), (1387066645,), (1387066647,), (1387066659,), (1387066661,), (1387066662,), (1387066663,), (1387066667,), (1387066687,), (1387066692,), (1387066696,), (1387066699,), (1387066702,), (1387066718,), (1387066721,), (1387066724,), (1387066727,), (1387066729,), (1387066755,), (1387066757,), (1387066758,), (1387066762,), (1387066768,), (1387066780,), (1387066785,), (1387066788,), (1387066823,), (1387066811,), (1387066814,), (1387066817,), (1387066819,), (1387066821,), (1387066840,), (1387066844,), (1387066846,), (1387066848,), (1387066850,), (1387066876,), (1387066879,), (1387066882,), (1387066885,), (1387066887,), (1387066901,), (1387066904,), (1387066907,), (1387066910,), (1387066914,), (1387066917,), (1387066958,), (1387066961,), (1387066962,), (1387066963,), (1387066965,), (1387066978,), (1387066979,), (1387066982,), (1387066986,), (1387066990,), (1387067016,), (1387067020,), (1387067023,), (1387067026,), (1387067030,), (1387067033,), (1387067065,), (1387067088,), (1387067090,), (1387067092,), (1387067119,), (1387067122,), (1387067123,), (1387067124,), (1387067126,), (1387067128,), (1387067145,), (1387067147,), (1387067149,), (1387067152,), (1387067173,), (1387067175,), (1387067178,), (1387067199,), (1387067203,), (1387067212,), (1387067220,), (1387067222,), (1387067231,), (1387067244,), (1387067248,), (1387067251,), (1387067255,), (1387067281,), (1387067284,), (1387067287,), (1387067289,), (1387067935,), (1387067939,), (1387067945,), (1387067949,), (1387067957,), (1387067313,), (1387067491,), (1387068157,), (1387068161,), (1387068164,), (1387068166,), (1387068170,), (1387068191,), (1387068195,), (1387068198,), (1387068540,), (1387068543,), (1387068727,), (1387068735,), (1387068739,), (1387068743,), (1387068754,), (1387068759,), (1387068950,), (1387069078,), (1387069081,), (1387069083,), (1387069085,), (1387069089,), (1387069114,), (1387069115,), (1387069118,), (1387069121,), (1387069125,), (1387069153,), (1387069158,), (1387069162,), (1387069182,), (1387069186,), (1387069190,), (1387069194,), (1387069197,), (1387069199,), (1387069221,), (1387069224,), (1387069227,), (1387069232,), (1387069250,), (1387069254,), (1387069286,), (1387071773,), (1387071776,), (1387071897,), (1387071925,), (1387071948,), (1387071951,), (1387071973,), (1387072552,), (1387072576,), (1387072580,), (1387072586,), (1387072591,), (1387072609,), (1387072611,), (1387072615,), (1387072620,), (1387072640,), (1387072643,), (1387072646,), (1387072677,), (1387072681,), (1387072687,), (1387072705,), (1387072709,), (1387072712,), (1387072714,), (1387072734,), (1387072737,), (1387072742,), (1387072750,), (1387072780,), (1387072783,), (1387072786,), (1387072813,), (1387072841,), (1387072845,), (1387072849,), (1387072852,), (1387072874,), (1387072902,), (1387072906,), (1387072911,), (1387072918,), (1387072922,), (1387072925,), (1387072930,), (1387072934,), (1387072937,), (1387072940,), (1387072958,), (1387072960,), (1387072962,), (1387072964,), (1387072967,), (1387072971,), (1387072984,), (1387072986,), (1387072989,), (1387072993,), (1387072995,), (1387072997,), (1387073002,), (1387073005,), (1387073009,), (1387073012,), (1387073015,), (1387073016,), (1387073023,), (1387073031,), (1387073035,), (1387073039,), (1387073048,), (1387073050,), (1387073053,), (1387073056,), (1387073059,), (1387073062,), (1387073073,), (1387073077,), (1387073083,), (1387073114,), (1387073129,), (1387073206,), (1387073213,), (1387073218,), (1387073224,), (1387073228,), (1387073231,), (1387073251,), (1387073257,), (1387073261,), (1387073267,), (1387073269,), (1387073284,), (1387073288,), (1387073291,), (1387073292,), (1387073294,), (1387073295,), (1387073310,), (1387073314,), (1387073317,), (1387073320,), (1387073325,), (1387073328,), (1387073401,), (1387073405,), (1387073407,), (1387073425,), (1387073428,), (1387073429,), (1387073432,), (1387073485,), (1387073489,), (1387073517,), (1387073514,), (1387073515,), (1387073541,), (1387073544,), (1387073546,), (1387073570,), (1387073572,), (1387073575,), (1387073578,), (1387073583,), (1387073591,), (1387073593,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'01102025': {'nb_upload': 12, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27384953]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] map_info['map_portfolio_photo'] : {27384953: [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570, 1387073546, 1387073544, 1387073541, 1387073515, 1387073514]} final : True mtd_id 4302 list_pids : [1387073593, 1387073591, 1387073583, 1387073578, 1387073575, 1387073572, 1387073570] Looping around the photos to save general results len do output : 1 /27384953Didn'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, '3801337') ('4302', '27384953', '1387073593', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073591', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073583', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073578', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073575', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073572', None, None, None, None, None, '3801337') ('4302', None, None, None, None, None, None, None, '3801337') ('4302', '27384953', '1387073570', None, None, None, None, None, '3801337') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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, '27384953', 'None', None, None, None, None, '3801337'), ('4302', '27384953', '1387073593', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073591', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073583', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073578', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073575', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073572', None, None, None, None, None, '3801337'), ('4302', '27384953', '1387073570', None, None, None, None, None, '3801337')] time used for this insertion : 0.0373079776763916 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.452467679977417 time spend to save output : 0.03749823570251465 total time spend for step 5 : 4.489965915679932 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 (3801337) 1.90user 2.46system 0:14.29elapsed 30%CPU (0avgtext+0avgdata 159020maxresident)k 1360inputs+4176outputs (40major+64098minor)pagefaults 0swaps