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 : 1197722 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 (4218179) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4218179) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399777 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4218179'] with mtr_portfolio_ids : ['29399777'] and first list_photo_ids : [] new path : /proc/1197722/ Name: python3 Umask: 0002 State: R (running) Tgid: 1197722 Ngid: 0 Pid: 1197722 PPid: 1197721 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1197722 NSpid: 1197722 NSpgid: 1196204 NSsid: 1196204 VmPeak: 1113364 kB VmSize: 1113364 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105780 kB VmRSS: 105780 kB RssAnon: 66296 kB RssFile: 39484 kB RssShmem: 0 kB VmData: 872092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 624 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: 66 nonvoluntary_ctxt_switches: 93 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1197722', 'Ngid': '0', 'Pid': '1197722', 'PPid': '1197721', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1197722', 'NSpid': '1197722', 'NSpgid': '1196204', 'NSsid': '1196204', 'VmPeak': '1113364 kB', 'VmSize': '1113364 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105780 kB', 'VmRSS': '105780 kB', 'RssAnon': '66296 kB', 'RssFile': '39484 kB', 'RssShmem': '0 kB', 'VmData': '872092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '624 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': '66', 'nonvoluntary_ctxt_switches': '93'} ('datou_batch_current', '1197722', '1113364', '0', '1113364', '872092', '105780', b'', 'marlene', '4218179') 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 (29399777) 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 (4218179 ) ) 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 (29399777) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1399174795, 'portfolio_id': 29399777}, {'photo_id': 1399174794, 'portfolio_id': 29399777}, {'photo_id': 1399174793, 'portfolio_id': 29399777}, {'photo_id': 1399174614, 'portfolio_id': 29399777}, {'photo_id': 1399174581, 'portfolio_id': 29399777}, {'photo_id': 1399174542, 'portfolio_id': 29399777}, {'photo_id': 1399174497, 'portfolio_id': 29399777}, {'photo_id': 1399174484, 'portfolio_id': 29399777}, {'photo_id': 1399174329, 'portfolio_id': 29399777}, {'photo_id': 1399174289, 'portfolio_id': 29399777}, {'photo_id': 1399174257, 'portfolio_id': 29399777}, {'photo_id': 1399174221, 'portfolio_id': 29399777}, {'photo_id': 1399174045, 'portfolio_id': 29399777}, {'photo_id': 1399174044, 'portfolio_id': 29399777}, {'photo_id': 1399174043, 'portfolio_id': 29399777}, {'photo_id': 1399174042, 'portfolio_id': 29399777}, {'photo_id': 1399173850, 'portfolio_id': 29399777}, {'photo_id': 1399173815, 'portfolio_id': 29399777}, {'photo_id': 1399173778, 'portfolio_id': 29399777}, {'photo_id': 1399173745, 'portfolio_id': 29399777}, {'photo_id': 1399173713, 'portfolio_id': 29399777}, {'photo_id': 1399173682, 'portfolio_id': 29399777}, {'photo_id': 1399172992, 'portfolio_id': 29399777}, {'photo_id': 1399172889, 'portfolio_id': 29399777}, {'photo_id': 1399172203, 'portfolio_id': 29399777}, {'photo_id': 1399172169, 'portfolio_id': 29399777}, {'photo_id': 1399172137, 'portfolio_id': 29399777}, {'photo_id': 1399171786, 'portfolio_id': 29399777}, {'photo_id': 1399171754, 'portfolio_id': 29399777}, {'photo_id': 1399171721, 'portfolio_id': 29399777}, {'photo_id': 1399171684, 'portfolio_id': 29399777}, {'photo_id': 1399171302, 'portfolio_id': 29399777}] map_portfolio_id_photo_id: {29399777: [1399174795, 1399174794, 1399174793, 1399174614, 1399174581, 1399174542, 1399174497, 1399174484, 1399174329, 1399174289, 1399174257, 1399174221, 1399174045, 1399174044, 1399174043, 1399174042, 1399173850, 1399173815, 1399173778, 1399173745, 1399173713, 1399173682, 1399172992, 1399172889, 1399172203, 1399172169, 1399172137, 1399171786, 1399171754, 1399171721, 1399171684, 1399171302]} ##### 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.018198728561401367 #### 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 Sat Dec 13 03:10:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29399777) 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 : 29399777 get user id for portfolio 29399777 get sub ptf for main ptf 29399777, type 3726 and hashtags ['Carton_gris', 'cartonnette', 'flou', 'Carton_brun', 'papier', 'Teint_Dans_La_Masse', 'autre_refus', 'plastique', 'metal', 'mal_croppe', 'kraft', 'environnement'] 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`=29399777 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','cartonnette','flou','Carton_brun','papier','Teint_Dans_La_Masse','autre_refus','plastique','metal','mal_croppe','kraft','environnement')) 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`=29399777 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','cartonnette','flou','Carton_brun','papier','Teint_Dans_La_Masse','autre_refus','plastique','metal','mal_croppe','kraft','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 29399777, 'sub_port_id': 29399778, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20029996, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'environnement': {'main_port_id': 29399777, 'sub_port_id': 29399779, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20029997, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'metal': {'main_port_id': 29399777, 'sub_port_id': 29399780, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20029998, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'kraft': {'main_port_id': 29399777, 'sub_port_id': 29399781, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20029999, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'Carton_brun': {'main_port_id': 29399777, 'sub_port_id': 29399782, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030000, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'autre_refus': {'main_port_id': 29399777, 'sub_port_id': 29399783, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030001, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 29399777, 'sub_port_id': 29399784, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030002, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'mal_croppe': {'main_port_id': 29399777, 'sub_port_id': 29399785, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030003, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'papier': {'main_port_id': 29399777, 'sub_port_id': 29399786, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030004, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'plastique': {'main_port_id': 29399777, 'sub_port_id': 29399787, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030005, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'cartonnette': {'main_port_id': 29399777, 'sub_port_id': 29399788, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030006, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}, 'flou': {'main_port_id': 29399777, 'sub_port_id': 29399789, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030007, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29399778 , 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=29399777 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 (29399778) result : ((1399174058,), (1399174060,), (1399174426,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399779 , 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=29399777 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 (29399779) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399780 , 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=29399777 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 (29399780) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399781 , 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=29399777 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 (29399781) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399782 , 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=29399777 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 (29399782) result : ((1399174915,), (1399175599,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399783 , 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=29399777 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 (29399783) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399784 , 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=29399777 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 (29399784) result : ((1399174056,), (1399174425,), (1399174905,), (1399174907,), (1399175579,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399785 , 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=29399777 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 (29399785) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399786 , 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=29399777 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 (29399786) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399787 , 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=29399777 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 (29399787) result : ((1399174433,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399788 , 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=29399777 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 (29399788) result : ((1399174427,), (1399174429,), (1399175589,), (1399175591,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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 29399789 , 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=29399777 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 (29399789) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29399777) result : ((1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) 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`=29399777 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','cartonnette','flou','Carton_brun','papier','Teint_Dans_La_Masse','autre_refus','plastique','metal','mal_croppe','kraft','environnement')) 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`=29399777 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','cartonnette','flou','Carton_brun','papier','Teint_Dans_La_Masse','autre_refus','plastique','metal','mal_croppe','kraft','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 29399777, 'sub_port_id': 29399790, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030008, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'environnement': {'main_port_id': 29399777, 'sub_port_id': 29399791, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030009, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'metal': {'main_port_id': 29399777, 'sub_port_id': 29399792, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030010, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'kraft': {'main_port_id': 29399777, 'sub_port_id': 29399793, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030011, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'Carton_brun': {'main_port_id': 29399777, 'sub_port_id': 29399794, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030012, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'autre_refus': {'main_port_id': 29399777, 'sub_port_id': 29399795, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030013, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 29399777, 'sub_port_id': 29399796, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030014, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'mal_croppe': {'main_port_id': 29399777, 'sub_port_id': 29399797, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030015, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'papier': {'main_port_id': 29399777, 'sub_port_id': 29399798, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030016, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'plastique': {'main_port_id': 29399777, 'sub_port_id': 29399799, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030017, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'cartonnette': {'main_port_id': 29399777, 'sub_port_id': 29399800, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030018, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 2, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}, 'flou': {'main_port_id': 29399777, 'sub_port_id': 29399801, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20030019, 'last_updated_at': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_desc': datetime.datetime(2025, 12, 13, 3, 9), 'last_updated_at_asc': datetime.datetime(2025, 12, 13, 3, 2, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399790,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399778 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399791,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399779 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399792,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399780 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399793,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399781 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399794,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399782 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399795,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399783 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399796,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399784 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399797,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399785 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399798,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399786 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399799,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399787 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399800,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399788 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29399801,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29399789 lien utilise dans velours : https://marlene.fotonower.com/velours/29399790,29399791,29399792,29399793,29399794,29399795,29399796,29399797,29399798,29399799,29399800,29399801?tags=Carton_gris,environnement,metal,kraft,Carton_brun,autre_refus,Teint_Dans_La_Masse,mal_croppe,papier,plastique,cartonnette,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29399777]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1399174795, 1399174794, 1399174793] map_info['map_portfolio_photo'] : {29399777: [1399174795, 1399174794, 1399174793, 1399174614, 1399174581, 1399174542, 1399174497, 1399174484, 1399174329, 1399174289, 1399174257, 1399174221, 1399174045, 1399174044, 1399174043, 1399174042, 1399173850, 1399173815, 1399173778, 1399173745, 1399173713, 1399173682, 1399172992, 1399172889, 1399172203, 1399172169, 1399172137, 1399171786, 1399171754, 1399171721, 1399171684, 1399171302]} final : False mtd_id 4302 list_pids : [1399174795, 1399174794, 1399174793] Looping around the photos to save general results len do output : 1 /29399777. 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, '4218179') ('4302', '29399777', '1399174795', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174794', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174793', None, None, None, None, None, '4218179') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29399777', "{'Carton_gris': 29399778, 'environnement': 29399779, 'metal': 29399780, 'kraft': 29399781, 'Carton_brun': 29399782, 'autre_refus': 29399783, 'Teint_Dans_La_Masse': 29399784, 'mal_croppe': 29399785, 'papier': 29399786, 'plastique': 29399787, 'cartonnette': 29399788, 'flou': 29399789}", None, None, None, None, '4218179'), ('4302', '29399777', '1399174795', None, None, None, None, None, '4218179'), ('4302', '29399777', '1399174794', None, None, None, None, None, '4218179'), ('4302', '29399777', '1399174793', None, None, None, None, None, '4218179')] time used for this insertion : 0.015810728073120117 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.811370611190796 time spend to save output : 0.01615285873413086 total time spend for step 1 : 1.8275234699249268 step2:final Sat Dec 13 03:11: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 (29399777) 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 29399777 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1399171302,1399171786,1399171754,1399171721,1399171684,1399172203,1399172169,1399172137,1399172992,1399172889,1399173850,1399173815,1399173778,1399173745,1399173713,1399173682,1399174045,1399174044,1399174043,1399174042,1399174329,1399174289,1399174257,1399174221,1399174614,1399174581,1399174542,1399174497,1399174484,1399174795,1399174794,1399174793); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29399777]) Inside saveOutput : final : False verbose : True original output for save of step final : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ('0.02734455635811095',)} new output for save of step final : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ('0.02734455635811095',)} [1399174795, 1399174794, 1399174793] map_info['map_portfolio_photo'] : {29399777: [1399174795, 1399174794, 1399174793, 1399174614, 1399174581, 1399174542, 1399174497, 1399174484, 1399174329, 1399174289, 1399174257, 1399174221, 1399174045, 1399174044, 1399174043, 1399174042, 1399173850, 1399173815, 1399173778, 1399173745, 1399173713, 1399173682, 1399172992, 1399172889, 1399172203, 1399172169, 1399172137, 1399171786, 1399171754, 1399171721, 1399171684, 1399171302]} final : False mtd_id 4302 list_pids : [1399174795, 1399174794, 1399174793] Looping around the photos to save general results len do output : 3 /1399174795.Didn't retrieve data . /1399174794.Didn't retrieve data . /1399174793.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, '4218179') ('4302', '29399777', '1399174795', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174794', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174793', None, None, None, None, None, '4218179') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29399777', '1399174795', '0.02734455635811095', None, None, None, None, '4218179'), ('4302', '29399777', '1399174794', '0.02734455635811095', None, None, None, None, '4218179'), ('4302', '29399777', '1399174793', '0.02734455635811095', None, None, None, None, '4218179')] time used for this insertion : 0.014558553695678711 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07905864715576172 time spend to save output : 0.014881134033203125 total time spend for step 2 : 0.09393978118896484 step3:velours_tree Sat Dec 13 03:11: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 complete output_args for input 0 : {29399777: [{'Carton_gris': 29399778, 'environnement': 29399779, 'metal': 29399780, 'kraft': 29399781, 'Carton_brun': 29399782, 'autre_refus': 29399783, 'Teint_Dans_La_Masse': 29399784, 'mal_croppe': 29399785, 'papier': 29399786, 'plastique': 29399787, 'cartonnette': 29399788, 'flou': 29399789}]} input_args_next_step : {29399777: ()} output_args : {29399777: [{'Carton_gris': 29399778, 'environnement': 29399779, 'metal': 29399780, 'kraft': 29399781, 'Carton_brun': 29399782, 'autre_refus': 29399783, 'Teint_Dans_La_Masse': 29399784, 'mal_croppe': 29399785, 'papier': 29399786, 'plastique': 29399787, 'cartonnette': 29399788, 'flou': 29399789}]} args : 29399777 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 : ({'Carton_gris': 29399778, 'environnement': 29399779, 'metal': 29399780, 'kraft': 29399781, 'Carton_brun': 29399782, 'autre_refus': 29399783, 'Teint_Dans_La_Masse': 29399784, 'mal_croppe': 29399785, 'papier': 29399786, 'plastique': 29399787, 'cartonnette': 29399788, 'flou': 29399789},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29399777) 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([29399777]) 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.27542757987976074 time spend to save output : 4.3392181396484375e-05 total time spend for step 3 : 0.2754709720611572 step4:send_mail_cod Sat Dec 13 03:11: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 ! complete output_args for input 2 : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ('0.02734455635811095',)} input_args_next_step : {1399174795: ()} output_args : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ('0.02734455635811095',)} args : 1399174795 depend.output_id : 0 input_args_next_step : {1399174795: ('0.02734455635811095',), 1399174794: ()} output_args : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ('0.02734455635811095',)} args : 1399174794 depend.output_id : 0 input_args_next_step : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ()} output_args : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ('0.02734455635811095',)} args : 1399174793 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 : {29399777: [{'Carton_gris': 29399778, 'environnement': 29399779, 'metal': 29399780, 'kraft': 29399781, 'Carton_brun': 29399782, 'autre_refus': 29399783, 'Teint_Dans_La_Masse': 29399784, 'mal_croppe': 29399785, 'papier': 29399786, 'plastique': 29399787, 'cartonnette': 29399788, 'flou': 29399789}]} input_args_next_step : {1399174795: ('0.02734455635811095',), 1399174794: ('0.02734455635811095',), 1399174793: ('0.02734455635811095',), 29399777: ()} output_args : {29399777: [{'Carton_gris': 29399778, 'environnement': 29399779, 'metal': 29399780, 'kraft': 29399781, 'Carton_brun': 29399782, 'autre_refus': 29399783, 'Teint_Dans_La_Masse': 29399784, 'mal_croppe': 29399785, 'papier': 29399786, 'plastique': 29399787, 'cartonnette': 29399788, 'flou': 29399789}]} args : 29399777 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :4, first value : ('0.02734455635811095',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29399777) 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 (1399174795,1399174794,1399174793) Found this number of photos: 3 ##### Call download_photos : nb_thread : 5 begin to download photo : 1399174793 begin to download photo : 1399174794 begin to download photo : 1399174795 download finish for photo 1399174795 download finish for photo 1399174793 download finish for photo 1399174794 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette293997801765591861/ imagette293997811765591861/ imagette293997831765591861/ imagette293997851765591861/ length of list_filenames : 3 ; length of list_pids : 3 ; length of list_args : 3 results_Auto_P29399777_13-12-2025_03_11_01.pdf 29399780 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=29399780 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293997801765591861 29399781 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=29399781 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293997811765591861 29399783 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=29399783 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293997831765591861 29399785 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=29399785 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293997851765591861 29399787 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=29399787 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399174433: '1765591625_523972_1399171754_aa246b781ad5759115340f5a1e477c02_rle_crop_4068663398_0.png'} change filename to text .imagette293997871765591861/ imagette293997871765591861/1765591625_523972_1399171754_aa246b781ad5759115340f5a1e477c02_rle_crop_4068663398_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/c41c7c4addfb6faf76f4c4ebd805bf8c_72663645.png imagette293997871765591861 29399788 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=29399788 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399174427: '1765591625_523972_1399171721_a5b6b10108e00841a76901768f501566_rle_crop_4068663424_0.png', 1399174429: '1765591625_523972_1399171684_8ffc843af7b82aeb489b1a775c20e163_rle_crop_4068663442_0.png', 1399175589: '1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665506_0.png', 1399175591: '1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665509_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/7b622b2b3aa88fd58245413568ac5a67_4643848.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/4239e5fe4152ccbafad907cad22d7ed4_57204250.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/9020dfacf8889a41b58820627b89605a_74025070.png change filename to text .imagette293997881765591861/ imagette293997881765591861/1765591625_523972_1399171721_a5b6b10108e00841a76901768f501566_rle_crop_4068663424_0.png.png imagette293997881765591861/1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665506_0.png.png imagette293997881765591861/1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665509_0.png.png imagette293997881765591861/1765591625_523972_1399171684_8ffc843af7b82aeb489b1a775c20e163_rle_crop_4068663442_0.png.png imagette293997891765591862/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/a0970e399bc5e3be910f306ed545c223_83221746.png imagette293997881765591861 29399789 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=29399789 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette293997891765591862 29399778 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=29399778 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399174058: '1765591585_523018_1399172992_0c420bdb234264295927e83b27e3f36e_rle_crop_4068661566_0.png', 1399174060: '1765591585_523018_1399172992_0c420bdb234264295927e83b27e3f36e_rle_crop_4068661562_0.png', 1399174426: '1765591625_523972_1399171754_aa246b781ad5759115340f5a1e477c02_rle_crop_4068663390_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/c7f539f2c064d76f02be82c527d23271_43308388.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/8fef030f92d99deab0e113d7ffb6d5ab_1560421.png change filename to text .imagette293997781765591862/ imagette293997781765591862/1765591625_523972_1399171754_aa246b781ad5759115340f5a1e477c02_rle_crop_4068663390_0.png.png imagette293997781765591862/1765591585_523018_1399172992_0c420bdb234264295927e83b27e3f36e_rle_crop_4068661566_0.png.png imagette293997781765591862/1765591585_523018_1399172992_0c420bdb234264295927e83b27e3f36e_rle_crop_4068661562_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/2f88577903e520bc986b67a4bd65067e_13941959.png imagette293997781765591862 29399782 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=29399782 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399174915: '1765591746_531625_1399171786_dc9b3fa85a20e41cfce3eee18e385ea3_rle_crop_4068663549_0.png', 1399175599: '1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665508_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/6f00d517d0947f47632c06113e5a3d80_97013709.png change filename to text .imagette293997821765591862/ imagette293997821765591862/1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665508_0.png.png imagette293997821765591862/1765591746_531625_1399171786_dc9b3fa85a20e41cfce3eee18e385ea3_rle_crop_4068663549_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/8a993f62959e3183f552d1577101e0a1_77100962.png imagette293997821765591862 29399784 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=29399784 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1399174056: '1765591585_523018_1399172137_6f0d04076c9d810c3b36c8bfe9b459e4_rle_crop_4068661584_0.png', 1399174425: '1765591625_523972_1399171754_aa246b781ad5759115340f5a1e477c02_rle_crop_4068663394_0.png', 1399174905: '1765591746_531625_1399171786_dc9b3fa85a20e41cfce3eee18e385ea3_rle_crop_4068663559_0.png', 1399174907: '1765591746_531625_1399171786_dc9b3fa85a20e41cfce3eee18e385ea3_rle_crop_4068663550_0.png', 1399175579: '1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665507_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/8135026306fa743bebb6b31ac766c096_41813024.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/56eaf8e27173bc14c8e24a9d17303bfc_16521706.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/9ad5a5656b132d57343ad499db9c0de6_10785545.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/d51f82c14e008a7cf7fe11d4fbafc7b6_15020582.png change filename to text .imagette293997841765591862/ imagette293997841765591862/1765591585_523018_1399172137_6f0d04076c9d810c3b36c8bfe9b459e4_rle_crop_4068661584_0.png.png imagette293997841765591862/1765591625_523972_1399171754_aa246b781ad5759115340f5a1e477c02_rle_crop_4068663394_0.png.png imagette293997841765591862/1765591826_537441_1399174221_969ffc861052a1070e00ee631542d522_rle_crop_4068665507_0.png.png imagette293997841765591862/1765591746_531625_1399171786_dc9b3fa85a20e41cfce3eee18e385ea3_rle_crop_4068663550_0.png.png imagette293997841765591862/1765591746_531625_1399171786_dc9b3fa85a20e41cfce3eee18e385ea3_rle_crop_4068663559_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/162122bbedd536df2146b638fe9fc424_52568001.png imagette293997841765591862 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29399777 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29399790,29399791,29399792,29399793,29399794,29399795,29399796,29399797,29399798,29399799,29399800,29399801?tags=Carton_gris,environnement,metal,kraft,Carton_brun,autre_refus,Teint_Dans_La_Masse,mal_croppe,papier,plastique,cartonnette,flou your option no_mail is active, we will not send the real mail to your client args[1399174795] : ('0.02734455635811095',) no score found for photo 1399174795 We are sending mail with results at report@fotonower.com args[1399174794] : ('0.02734455635811095',) no score found for photo 1399174794 We are sending mail with results at report@fotonower.com args[1399174793] : ('0.02734455635811095',) no score found for photo 1399174793 We are sending mail with results at report@fotonower.com refus_total : 0.02734455635811095 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=29399777 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_P29399777_13-12-2025_03_11_01.pdf results_Auto_P29399777_13-12-2025_03_11_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29399777_13-12-2025_03_11_01.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','29399777','results_Auto_P29399777_13-12-2025_03_11_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29399777_13-12-2025_03_11_01.pdf','pdf','','0.09','0.02734455635811095') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29399777]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1399174795, 1399174794, 1399174793] map_info['map_portfolio_photo'] : {29399777: [1399174795, 1399174794, 1399174793, 1399174614, 1399174581, 1399174542, 1399174497, 1399174484, 1399174329, 1399174289, 1399174257, 1399174221, 1399174045, 1399174044, 1399174043, 1399174042, 1399173850, 1399173815, 1399173778, 1399173745, 1399173713, 1399173682, 1399172992, 1399172889, 1399172203, 1399172169, 1399172137, 1399171786, 1399171754, 1399171721, 1399171684, 1399171302]} final : False mtd_id 4302 list_pids : [1399174795, 1399174794, 1399174793] 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, '4218179') ('4302', '29399777', '1399174795', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174794', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174793', None, None, None, None, None, '4218179') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '29399777', '1399174795', None, None, None, None, None, '4218179'), ('4302', '29399777', '1399174794', None, None, None, None, None, '4218179'), ('4302', '29399777', '1399174793', None, None, None, None, None, '4218179')] time used for this insertion : 0.014559507369995117 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.3614723682403564 time spend to save output : 0.014713048934936523 total time spend for step 4 : 2.376185417175293 step5:split_time_score Sat Dec 13 03:11:03 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['29399777'] 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 : [('29399777',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29399777) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1399174795: {'path': 'temp/1765591861_1197722_1399174795_ae6b7df5d9d94d00895aeac529a38860.jpg', 'extension': 'jpg'}, 1399174793: {'path': 'temp/1765591861_1197722_1399174793_7781b709c3901f698d1a5bcb74d737c0.jpg', 'extension': 'jpg'}, 1399174794: {'path': 'temp/1765591861_1197722_1399174794_b8ec351d847c471ca0934d787c06f3c6.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 = 29399777; (('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 = 29399777 group by h (('03', 32),) 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=29399777 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 (29399777) 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 (29399777) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 13122025 29399777 Nombre de photos uploadées : 32 / 23040 (0%) 13122025 29399777 Nombre de photos taguées (types de déchets): 0 / 32 (0%) 13122025 29399777 Nombre de photos taguées (volume) : 0 / 32 (0%) [{'photo_id': 1399171302, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/1eff7aa3b38bb526084181cc8281bc9e.jpg', 'username': None, 'uploaded_at': 1765591273, 'text': 'image_13122025_03_00_13_010138m0.jpg 1e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1399171786, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/dc9b3fa85a20e41cfce3eee18e385ea3.jpg', 'username': None, 'uploaded_at': 1765591328, 'text': 'image_13122025_03_00_44_010141m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1399171754, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/aa246b781ad5759115340f5a1e477c02.jpg', 'username': None, 'uploaded_at': 1765591328, 'text': 'image_13122025_03_01_04_010152m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1399171721, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/13/a5b6b10108e00841a76901768f501566.jpg', 'username': None, 'uploaded_at': 1765591328, 'text': 'image_13122025_03_01_13_009123m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 4.5299530029296875e-06 ???????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0014848709106445312 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29399777, '2025-12-13' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-13' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2732453,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.24091243743896484 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= 2732453 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29395767, 'dashboard_result_id': 18343588, '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_P29395767_13-12-2025_00_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29395770, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29395771, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29395772, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29395773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29395774, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29395775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29395776, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29395777, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29395778, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29395779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29395780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29395781, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29396142, 'dashboard_result_id': 18343589, '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_P29396142_13-12-2025_00_46_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29396145, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29396146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29396147, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29396148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29396149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29396150, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29396151, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29396152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29396153, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29396154, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29396155, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29396156, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29396508, 'dashboard_result_id': 18343590, '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_P29396508_13-12-2025_01_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29396514, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29396515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29396516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29396517, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29396518, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29396519, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29396520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29396521, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29396522, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29396523, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29396524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29396525, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29397250, 'dashboard_result_id': 18343591, '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_P29397250_13-12-2025_01_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397252, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397253, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397254, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397255, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397256, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397258, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397259, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397260, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397261, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29397263, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29397563, 'dashboard_result_id': 18343592, '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_P29397563_13-12-2025_02_02_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397569, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397571, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397573, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397574, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397575, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397577, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29397578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397579, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397580, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29397957, 'dashboard_result_id': 18343593, '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_P29397957_13-12-2025_02_18_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29397972, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397973, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397974, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397975, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397978, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397980, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397984, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29398436, 'dashboard_result_id': 18343594, '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_P29398436_13-12-2025_02_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29398462, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29398463, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29398464, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29398465, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29398466, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29398467, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29398468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29398469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29398470, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29398471, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29398472, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29398473, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29398864, 'dashboard_result_id': 18343595, '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_P29398864_13-12-2025_02_47_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29398872, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29398873, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29398874, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29398875, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29398877, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29398878, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29398879, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29398880, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29398881, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29398882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29398883, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29398884, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29399348, 'dashboard_result_id': 18343596, '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_P29399348_13-12-2025_03_03_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29399349, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29399350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29399351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29399352, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29399353, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29399354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29399355, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29399356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29399357, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29399358, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29399359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29399360, 'pht': 3726}}"}, {'dashboat_entry_day': 2732453, 'dashboard_run_id': 2739732, 'mtr_portfolio_id': 29399777, 'dashboard_result_id': 18343597, '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_P29399777_13-12-2025_03_06_31.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29399778, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29399779, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29399780, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29399781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29399782, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29399783, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29399784, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29399785, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29399786, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29399787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29399788, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29399789, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29395767 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': 4217545, 'mtr_portfolio_id': 29395767, 'created_at': datetime.datetime(2025, 12, 13, 0, 32, 59), 'result': '0.05909860523021329', 'result_long': None, 'result_double': None}] Qualite : 0.05909860523021329 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29395767 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29395767_13-12-2025_00_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29395767 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_P29395767_13-12-2025_00_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29395770, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29395771, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29395772, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29395773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29395774, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29395775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29395776, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29395777, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29395778, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29395779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29395780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29395781, 'pht': 3726}}" where mtr_portfolio_id = 29395767 and dashboard_run_id = 2739732 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`=29395767 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343588, 0.05909860523021329, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29395767_13-12-2025_00_33_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29395770, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29395771, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29395772, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29395773, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29395774, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29395775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29395776, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29395777, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29395778, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29395779, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29395780, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29395781, '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 = 29396142 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': 4217582, 'mtr_portfolio_id': 29396142, 'created_at': datetime.datetime(2025, 12, 13, 0, 46, 57), 'result': '0.05462950009267587', 'result_long': None, 'result_double': None}] Qualite : 0.05462950009267587 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29396142 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29396142_13-12-2025_00_46_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29396142 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_P29396142_13-12-2025_00_46_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29396145, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29396146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29396147, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29396148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29396149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29396150, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29396151, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29396152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29396153, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29396154, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29396155, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29396156, 'pht': 3726}}" where mtr_portfolio_id = 29396142 and dashboard_run_id = 2739732 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`=29396142 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343589, 0.05462950009267587, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29396142_13-12-2025_00_46_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29396145, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29396146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29396147, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29396148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29396149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29396150, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29396151, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29396152, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29396153, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29396154, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29396155, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29396156, '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 = 29396508 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': 4217626, 'mtr_portfolio_id': 29396508, 'created_at': datetime.datetime(2025, 12, 13, 1, 32, 59), 'result': '0.057125660119203954', 'result_long': None, 'result_double': None}] Qualite : 0.057125660119203954 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29396508 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29396508_13-12-2025_01_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29396508 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_P29396508_13-12-2025_01_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29396514, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29396515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29396516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29396517, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29396518, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29396519, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29396520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29396521, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29396522, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29396523, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29396524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29396525, 'pht': 3726}}" where mtr_portfolio_id = 29396508 and dashboard_run_id = 2739732 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`=29396508 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343590, 0.057125660119203954, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29396508_13-12-2025_01_33_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29396514, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29396515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29396516, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29396517, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29396518, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29396519, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29396520, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29396521, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29396522, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29396523, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29396524, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29396525, '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 = 29397250 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': 4217754, 'mtr_portfolio_id': 29397250, 'created_at': datetime.datetime(2025, 12, 13, 1, 46, 59), 'result': '0.05056901313580099', 'result_long': None, 'result_double': None}] Qualite : 0.05056901313580099 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29397250 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29397250_13-12-2025_01_46_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29397250 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_P29397250_13-12-2025_01_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397252, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397253, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397254, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397255, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397256, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397258, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397259, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397260, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397261, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29397263, 'pht': 3726}}" where mtr_portfolio_id = 29397250 and dashboard_run_id = 2739732 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`=29397250 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343591, 0.05056901313580099, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29397250_13-12-2025_01_46_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397252, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397253, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397254, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397255, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397256, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397257, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397258, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397259, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397260, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397261, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397262, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29397263, '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 = 29397563 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': 4217793, 'mtr_portfolio_id': 29397563, 'created_at': datetime.datetime(2025, 12, 13, 2, 2, 58), 'result': '0.048218870895430255', 'result_long': None, 'result_double': None}] Qualite : 0.048218870895430255 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29397563 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29397563_13-12-2025_02_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29397563 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_P29397563_13-12-2025_02_02_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397569, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397571, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397573, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397574, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397575, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397577, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29397578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397579, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397580, 'pht': 3726}}" where mtr_portfolio_id = 29397563 and dashboard_run_id = 2739732 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`=29397563 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343592, 0.048218870895430255, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29397563_13-12-2025_02_02_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397569, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397571, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397572, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397573, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397574, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397575, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397576, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397577, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29397578, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397579, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397580, '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 = 29397957 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': 4217869, 'mtr_portfolio_id': 29397957, 'created_at': datetime.datetime(2025, 12, 13, 2, 18, 58), 'result': '0.05096435921704283', 'result_long': None, 'result_double': None}] Qualite : 0.05096435921704283 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29397957 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29397957_13-12-2025_02_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29397957 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_P29397957_13-12-2025_02_18_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29397972, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397973, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397974, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397975, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397978, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397980, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397984, 'pht': 3726}}" where mtr_portfolio_id = 29397957 and dashboard_run_id = 2739732 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`=29397957 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343593, 0.05096435921704283, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29397957_13-12-2025_02_18_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 29397972, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29397973, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29397974, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29397975, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29397976, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29397977, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29397978, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29397980, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29397981, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29397982, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29397983, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29397984, '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 = 29398436 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': 4217956, 'mtr_portfolio_id': 29398436, 'created_at': datetime.datetime(2025, 12, 13, 2, 32, 58), 'result': '0.05770879368335264', 'result_long': None, 'result_double': None}] Qualite : 0.05770879368335264 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29398436 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29398436_13-12-2025_02_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29398436 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_P29398436_13-12-2025_02_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29398462, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29398463, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29398464, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29398465, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29398466, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29398467, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29398468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29398469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29398470, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29398471, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29398472, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29398473, 'pht': 3726}}" where mtr_portfolio_id = 29398436 and dashboard_run_id = 2739734 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`=29398436 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343594, 0.05770879368335264, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29398436_13-12-2025_02_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 29398462, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29398463, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29398464, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29398465, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29398466, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29398467, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29398468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29398469, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29398470, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29398471, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29398472, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29398473, '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 = 29398864 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': 4218009, 'mtr_portfolio_id': 29398864, 'created_at': datetime.datetime(2025, 12, 13, 2, 47), 'result': '0.06129675681675709', 'result_long': None, 'result_double': None}] Qualite : 0.06129675681675709 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29398864 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29398864_13-12-2025_02_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29398864 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_P29398864_13-12-2025_02_47_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29398872, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29398873, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29398874, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29398875, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29398877, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29398878, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29398879, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29398880, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29398881, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29398882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29398883, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29398884, 'pht': 3726}}" where mtr_portfolio_id = 29398864 and dashboard_run_id = 2739734 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`=29398864 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343595, 0.06129675681675709, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29398864_13-12-2025_02_47_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29398872, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29398873, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29398874, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29398875, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29398877, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29398878, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29398879, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29398880, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29398881, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29398882, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29398883, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29398884, '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 = 29399348 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': 4218093, 'mtr_portfolio_id': 29399348, 'created_at': datetime.datetime(2025, 12, 13, 3, 3, 28), 'result': '0.05192255600420118', 'result_long': None, 'result_double': None}] Qualite : 0.05192255600420118 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29399348 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29399348_13-12-2025_03_03_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29399348 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_P29399348_13-12-2025_03_03_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29399349, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29399350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29399351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29399352, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29399353, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29399354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29399355, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29399356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29399357, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29399358, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29399359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29399360, 'pht': 3726}}" where mtr_portfolio_id = 29399348 and dashboard_run_id = 2739734 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`=29399348 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343596, 0.05192255600420118, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29399348_13-12-2025_03_03_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29399349, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29399350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29399351, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29399352, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29399353, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29399354, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29399355, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29399356, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29399357, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29399358, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29399359, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29399360, '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 = 29399777 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': 4218179, 'mtr_portfolio_id': 29399777, 'created_at': datetime.datetime(2025, 12, 13, 3, 11, 1), 'result': '0.02734455635811095', 'result_long': None, 'result_double': None}] Qualite : 0.02734455635811095 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29399777 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29399777_13-12-2025_03_11_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29399777 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_P29399777_13-12-2025_03_11_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29399778, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29399779, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29399780, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29399781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29399782, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29399783, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29399784, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29399785, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29399786, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29399787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29399788, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29399789, 'pht': 3726}}" where mtr_portfolio_id = 29399777 and dashboard_run_id = 2739734 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`=29399777 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18343597, 0.02734455635811095, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29399777_13-12-2025_03_11_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29399778, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29399779, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29399780, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29399781, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29399782, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29399783, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29399784, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29399785, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29399786, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29399787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29399788, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29399789, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29395767,29396142,29396508,29397250,29397563,29397957,29398436,29398864,29399348,29399777) result : ((1399164481,), (1399164513,), (1399164914,), (1399164915,), (1399165057,), (1399165093,), (1399165125,), (1399165157,), (1399165298,), (1399165299,), (1399165300,), (1399165301,), (1399165304,), (1399165306,), (1399165330,), (1399165331,), (1399165332,), (1399165333,), (1399165347,), (1399165348,), (1399165349,), (1399165350,), (1399165352,), (1399165354,), (1399165385,), (1399165393,), (1399165394,), (1399165395,), (1399165398,), (1399165411,), (1399165412,), (1399165413,), (1399165414,), (1399165438,), (1399165439,), (1399165440,), (1399165441,), (1399165444,), (1399165446,), (1399165458,), (1399165459,), (1399165460,), (1399165461,), (1399165463,), (1399165466,), (1399165490,), (1399165491,), (1399165492,), (1399165493,), (1399165507,), (1399165508,), (1399165509,), (1399165510,), (1399165513,), (1399165514,), (1399165538,), (1399165542,), (1399165543,), (1399165544,), (1399165547,), (1399165558,), (1399165559,), (1399165560,), (1399165561,), (1399165589,), (1399165597,), (1399165598,), (1399165599,), (1399165603,), (1399165608,), (1399165626,), (1399165629,), (1399165632,), (1399165646,), (1399165648,), (1399165650,), (1399165651,), (1399165621,), (1399165622,), (1399165623,), (1399165654,), (1399165655,), (1399165657,), (1399165659,), (1399165661,), (1399165663,), (1399165672,), (1399165674,), (1399165677,), (1399165683,), (1399165689,), (1399165692,), (1399165695,), (1399165696,), (1399165697,), (1399165698,), (1399165699,), (1399165700,), (1399165735,), (1399165736,), (1399165737,), (1399165738,), (1399165740,), (1399165741,), (1399165744,), (1399165745,), (1399165746,), (1399165747,), (1399165749,), (1399165752,), (1399165775,), (1399165776,), (1399165777,), (1399165784,), (1399165790,), (1399165807,), (1399165830,), (1399165831,), (1399165832,), (1399165833,), (1399165856,), (1399165857,), (1399165858,), (1399165859,), (1399165862,), (1399165864,), (1399165875,), (1399165877,), (1399165879,), (1399165883,), (1399165901,), (1399165903,), (1399165905,), (1399165909,), (1399165913,), (1399165916,), (1399165926,), (1399165927,), (1399165928,), (1399165929,), (1399165959,), (1399165960,), (1399165961,), (1399165962,), (1399165965,), (1399165968,), (1399165978,), (1399165979,), (1399165980,), (1399165981,), (1399166001,), (1399166002,), (1399166003,), (1399166004,), (1399166006,), (1399166009,), (1399166015,), (1399166016,), (1399166018,), (1399166019,), (1399166021,), (1399166065,), (1399166063,), (1399166064,), (1399166069,), (1399166070,), (1399166071,), (1399166072,), (1399166075,), (1399166077,), (1399166093,), (1399166094,), (1399166095,), (1399166096,), (1399166109,), (1399166110,), (1399166111,), (1399166112,), (1399166114,), (1399166139,), (1399166140,), (1399166141,), (1399166142,), (1399166153,), (1399166155,), (1399166157,), (1399166183,), (1399166189,), (1399166190,), (1399166191,), (1399166194,), (1399166206,), (1399166208,), (1399166210,), (1399166214,), (1399166218,), (1399166222,), (1399166243,), (1399166252,), (1399166254,), (1399166258,), (1399166267,), (1399166268,), (1399166269,), (1399166270,), (1399166272,), (1399166275,), (1399166301,), (1399166302,), (1399166303,), (1399166304,), (1399166321,), (1399166322,), (1399166323,), (1399166324,), (1399166327,), (1399166330,), (1399166367,), (1399166368,), (1399166369,), (1399166372,), (1399166375,), (1399166377,), (1399166383,), (1399166384,), (1399166386,), (1399166392,), (1399166395,), (1399166396,), (1399166400,), (1399166403,), (1399166404,), (1399166417,), (1399166419,), (1399166421,), (1399166423,), (1399166425,), (1399166431,), (1399168468,), (1399168482,), (1399168483,), (1399168484,), (1399168485,), (1399168493,), (1399168494,), (1399168495,), (1399168496,), (1399168521,), (1399168522,), (1399168535,), (1399168537,), (1399168538,), (1399168539,), (1399168541,), (1399168575,), (1399168577,), (1399168597,), (1399168598,), (1399168599,), (1399168600,), (1399168623,), (1399168624,), (1399168625,), (1399168626,), (1399168629,), (1399168632,), (1399168638,), (1399168639,), (1399168656,), (1399168657,), (1399168658,), (1399168659,), (1399168668,), (1399168669,), (1399168670,), (1399168683,), (1399168684,), (1399168685,), (1399168686,), (1399168709,), (1399168710,), (1399168711,), (1399168712,), (1399168713,), (1399168714,), (1399168737,), (1399168739,), (1399168740,), (1399168741,), (1399168748,), (1399168750,), (1399168752,), (1399168754,), (1399168756,), (1399168758,), (1399168780,), (1399168777,), (1399168778,), (1399168779,), (1399168793,), (1399168794,), (1399168818,), (1399168819,), (1399168820,), (1399168821,), (1399168824,), (1399168836,), (1399168838,), (1399168839,), (1399168840,), (1399168860,), (1399168861,), (1399168862,), (1399168863,), (1399168866,), (1399168875,), (1399168876,), (1399168877,), (1399168880,), (1399168883,), (1399168886,), (1399168906,), (1399168907,), (1399168908,), (1399168909,), (1399168917,), (1399168918,), (1399168921,), (1399168924,), (1399168929,), (1399168930,), (1399168931,), (1399168932,), (1399168934,), (1399168937,), (1399168974,), (1399168975,), (1399168976,), (1399168977,), (1399169000,), (1399169003,), (1399169006,), (1399169024,), (1399169026,), (1399169028,), (1399169039,), (1399169050,), (1399169062,), (1399169063,), (1399169064,), (1399169065,), (1399169068,), (1399169070,), (1399169099,), (1399169103,), (1399169104,), (1399169105,), (1399169108,), (1399169123,), (1399169129,), (1399169132,), (1399169133,), (1399169144,), (1399169146,), (1399169148,), (1399169171,), (1399169162,), (1399169164,), (1399169166,), (1399169168,), (1399169189,), (1399169190,), (1399169191,), (1399169192,), (1399169194,), (1399169202,), (1399169203,), (1399169228,), (1399169229,), (1399169230,), (1399169240,), (1399169242,), (1399169244,), (1399169248,), (1399169252,), (1399169278,), (1399169279,), (1399169280,), (1399169281,), (1399169291,), (1399169292,), (1399169293,), (1399169294,), (1399169296,), (1399169331,), (1399169366,), (1399169372,), (1399169374,), (1399169376,), (1399169388,), (1399169390,), (1399169392,), (1399169396,), (1399169400,), (1399169415,), (1399169416,), (1399169417,), (1399169418,), (1399169420,), (1399169423,), (1399169439,), (1399169442,), (1399169443,), (1399169445,), (1399169459,), (1399169461,), (1399169462,), (1399169493,), (1399169484,), (1399169485,), (1399169486,), (1399169487,), (1399169490,), (1399169498,), (1399169499,), (1399169500,), (1399169501,), (1399169504,), (1399169530,), (1399169531,), (1399169550,), (1399169552,), (1399169554,), (1399169558,), (1399169562,), (1399169566,), (1399169574,), (1399169575,), (1399169576,), (1399169577,), (1399169583,), (1399169584,), (1399169585,), (1399169586,), (1399169616,), (1399169617,), (1399169618,), (1399169619,), (1399169635,), (1399169636,), (1399169637,), (1399169638,), (1399169656,), (1399169658,), (1399169659,), (1399169660,), (1399169663,), (1399169681,), (1399169683,), (1399169686,), (1399169688,), (1399169691,), (1399169713,), (1399169714,), (1399169715,), (1399169716,), (1399169727,), (1399169728,), (1399169729,), (1399169730,), (1399169732,), (1399169765,), (1399169766,), (1399169767,), (1399169769,), (1399169772,), (1399169774,), (1399169779,), (1399169782,), (1399169790,), (1399169791,), (1399169792,), (1399169793,), (1399169795,), (1399169816,), (1399169820,), (1399169822,), (1399169823,), (1399169826,), (1399169845,), (1399169842,), (1399169843,), (1399169844,), (1399169870,), (1399169872,), (1399169873,), (1399169876,), (1399169879,), (1399169887,), (1399169888,), (1399169889,), (1399169890,), (1399169918,), (1399169919,), (1399169920,), (1399169921,), (1399169924,), (1399169927,), (1399169941,), (1399169943,), (1399169945,), (1399169949,), (1399169965,), (1399169967,), (1399169969,), (1399169973,), (1399169977,), (1399169993,), (1399169994,), (1399169995,), (1399169996,), (1399169999,), (1399170001,), (1399170037,), (1399170041,), (1399170042,), (1399170062,), (1399170063,), (1399170064,), (1399170065,), (1399170068,), (1399170071,), (1399170098,), (1399170099,), (1399170100,), (1399170101,), (1399170104,), (1399170113,), (1399170114,), (1399170115,), (1399170118,), (1399170120,), (1399170122,), (1399170125,), (1399170137,), (1399170138,), (1399170139,), (1399170140,), (1399170165,), (1399170167,), (1399170169,), (1399170173,), (1399170191,), (1399170193,), (1399170195,), (1399170199,), (1399170203,), (1399170207,), (1399170215,), (1399170216,), (1399170218,), (1399170219,), (1399170257,), (1399170238,), (1399170239,), (1399170247,), (1399170286,), (1399170287,), (1399170288,), (1399170289,), (1399170292,), (1399170295,), (1399170305,), (1399170306,), (1399170307,), (1399170308,), (1399170311,), (1399170324,), (1399170326,), (1399170328,), (1399170365,), (1399170366,), (1399170367,), (1399170368,), (1399170371,), (1399170389,), (1399170390,), (1399170391,), (1399170393,), (1399170396,), (1399170398,), (1399170412,), (1399170414,), (1399170417,), (1399170425,), (1399170426,), (1399170427,), (1399170430,), (1399170445,), (1399170446,), (1399170447,), (1399170448,), (1399170451,), (1399170477,), (1399170482,), (1399170491,), (1399170492,), (1399170493,), (1399170494,), (1399170508,), (1399170509,), (1399170510,), (1399170517,), (1399170520,), (1399170524,), (1399170525,), (1399170526,), (1399170527,), (1399170530,), (1399170533,), (1399170546,), (1399170547,), (1399170548,), (1399170551,), (1399170554,), (1399170556,), (1399170563,), (1399170565,), (1399170566,), (1399170990,), (1399171029,), (1399171065,), (1399171103,), (1399171135,), (1399171153,), (1399171155,), (1399171158,), (1399171186,), (1399171318,), (1399171302,), (1399171684,), (1399171721,), (1399171754,), (1399171786,), (1399172137,), (1399172169,), (1399172203,), (1399172889,), (1399172992,), (1399173682,), (1399173713,), (1399173745,), (1399173778,), (1399173815,), (1399173850,), (1399174042,), (1399174043,), (1399174044,), (1399174045,), (1399174221,), (1399174257,), (1399174289,), (1399174329,), (1399174484,), (1399174497,), (1399174542,), (1399174581,), (1399174614,), (1399174793,), (1399174794,), (1399174795,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'13122025': {'nb_upload': 32, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29399777]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1399174795, 1399174794, 1399174793] map_info['map_portfolio_photo'] : {29399777: [1399174795, 1399174794, 1399174793, 1399174614, 1399174581, 1399174542, 1399174497, 1399174484, 1399174329, 1399174289, 1399174257, 1399174221, 1399174045, 1399174044, 1399174043, 1399174042, 1399173850, 1399173815, 1399173778, 1399173745, 1399173713, 1399173682, 1399172992, 1399172889, 1399172203, 1399172169, 1399172137, 1399171786, 1399171754, 1399171721, 1399171684, 1399171302]} final : True mtd_id 4302 list_pids : [1399174795, 1399174794, 1399174793] Looping around the photos to save general results len do output : 1 /29399777Didn'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, '4218179') ('4302', '29399777', '1399174795', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174794', None, None, None, None, None, '4218179') ('4302', None, None, None, None, None, None, None, '4218179') ('4302', '29399777', '1399174793', None, None, None, None, None, '4218179') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '29399777', 'None', None, None, None, None, '4218179'), ('4302', '29399777', '1399174795', None, None, None, None, None, '4218179'), ('4302', '29399777', '1399174794', None, None, None, None, None, '4218179'), ('4302', '29399777', '1399174793', None, None, None, None, None, '4218179')] time used for this insertion : 0.039713382720947266 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0187256336212158 time spend to save output : 0.03985333442687988 total time spend for step 5 : 1.0585789680480957 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 (4218179) 1.98user 2.40system 0:09.86elapsed 44%CPU (0avgtext+0avgdata 164556maxresident)k 872inputs+4032outputs (32major+66798minor)pagefaults 0swaps