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 : 4192104 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 (3681967) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3681967) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671134 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3681967'] with mtr_portfolio_ids : ['26671134'] and first list_photo_ids : [] new path : /proc/4192104/ Name: python3 Umask: 0002 State: R (running) Tgid: 4192104 Ngid: 0 Pid: 4192104 PPid: 4192103 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4192104 NSpid: 4192104 NSpgid: 4191516 NSsid: 4191516 VmPeak: 1107252 kB VmSize: 1107252 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99216 kB VmRSS: 99216 kB RssAnon: 60176 kB RssFile: 39040 kB RssShmem: 0 kB VmData: 866004 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 544 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: 89 nonvoluntary_ctxt_switches: 140 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4192104', 'Ngid': '0', 'Pid': '4192104', 'PPid': '4192103', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4192104', 'NSpid': '4192104', 'NSpgid': '4191516', 'NSsid': '4191516', 'VmPeak': '1107252 kB', 'VmSize': '1107252 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99216 kB', 'VmRSS': '99216 kB', 'RssAnon': '60176 kB', 'RssFile': '39040 kB', 'RssShmem': '0 kB', 'VmData': '866004 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '544 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': '89', 'nonvoluntary_ctxt_switches': '140'} ('datou_batch_current', '4192104', '1107252', '0', '1107252', '866004', '99216', b'', 'marlene', '3681967') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (26671134) 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 (3681967 ) ) 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 (26671134) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1382719024, 'portfolio_id': 26671134}, {'photo_id': 1382718993, 'portfolio_id': 26671134}, {'photo_id': 1382718962, 'portfolio_id': 26671134}, {'photo_id': 1382718769, 'portfolio_id': 26671134}, {'photo_id': 1382718735, 'portfolio_id': 26671134}, {'photo_id': 1382718707, 'portfolio_id': 26671134}, {'photo_id': 1382718706, 'portfolio_id': 26671134}, {'photo_id': 1382718687, 'portfolio_id': 26671134}, {'photo_id': 1382718658, 'portfolio_id': 26671134}, {'photo_id': 1382718631, 'portfolio_id': 26671134}, {'photo_id': 1382718352, 'portfolio_id': 26671134}, {'photo_id': 1382718295, 'portfolio_id': 26671134}, {'photo_id': 1382718125, 'portfolio_id': 26671134}, {'photo_id': 1382718081, 'portfolio_id': 26671134}, {'photo_id': 1382717896, 'portfolio_id': 26671134}, {'photo_id': 1382717841, 'portfolio_id': 26671134}, {'photo_id': 1382717809, 'portfolio_id': 26671134}, {'photo_id': 1382717775, 'portfolio_id': 26671134}, {'photo_id': 1382717744, 'portfolio_id': 26671134}, {'photo_id': 1382717714, 'portfolio_id': 26671134}, {'photo_id': 1382717346, 'portfolio_id': 26671134}, {'photo_id': 1382717293, 'portfolio_id': 26671134}, {'photo_id': 1382717254, 'portfolio_id': 26671134}, {'photo_id': 1382717203, 'portfolio_id': 26671134}] map_portfolio_id_photo_id: {26671134: [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706, 1382718687, 1382718658, 1382718631, 1382718352, 1382718295, 1382718125, 1382718081, 1382717896, 1382717841, 1382717809, 1382717775, 1382717744, 1382717714, 1382717346, 1382717293, 1382717254, 1382717203]} ##### 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.014983177185058594 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Tue Sep 9 03:06:30 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 (26671134) 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 : 26671134 get user id for portfolio 26671134 get sub ptf for main ptf 26671134, type 3726 and hashtags ['environnement', 'cartonnette', 'Teint_Dans_La_Masse', 'mal_croppe', 'kraft', 'flou', 'plastique', 'Carton_gris', 'autre_refus', 'metal', 'papier', 'Carton_brun'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26671134 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','kraft','flou','plastique','Carton_gris','autre_refus','metal','papier','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26671134 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','kraft','flou','plastique','Carton_gris','autre_refus','metal','papier','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 26671134, 'sub_port_id': 26671145, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975058, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'kraft': {'main_port_id': 26671134, 'sub_port_id': 26671146, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975059, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'Carton_brun': {'main_port_id': 26671134, 'sub_port_id': 26671147, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975060, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'mal_croppe': {'main_port_id': 26671134, 'sub_port_id': 26671148, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975061, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'environnement': {'main_port_id': 26671134, 'sub_port_id': 26671149, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975062, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'flou': {'main_port_id': 26671134, 'sub_port_id': 26671150, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975063, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'plastique': {'main_port_id': 26671134, 'sub_port_id': 26671152, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975064, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'autre_refus': {'main_port_id': 26671134, 'sub_port_id': 26671154, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975065, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 26671134, 'sub_port_id': 26671155, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975066, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'cartonnette': {'main_port_id': 26671134, 'sub_port_id': 26671156, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975067, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'papier': {'main_port_id': 26671134, 'sub_port_id': 26671157, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975068, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}, 'metal': {'main_port_id': 26671134, 'sub_port_id': 26671158, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975069, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26671145 , 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=26671134 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 (26671145) result : ((1382718700,), (1382718701,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671146 , 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=26671134 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 (26671146) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671147 , 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=26671134 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 (26671147) result : ((1382718705,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671148 , 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=26671134 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 (26671148) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671149 , 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=26671134 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 (26671149) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671150 , 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=26671134 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 (26671150) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671152 , 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=26671134 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 (26671152) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671154 , 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=26671134 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 (26671154) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671155 , 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=26671134 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 (26671155) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671156 , 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=26671134 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 (26671156) result : ((1382718702,), (1382718703,), (1382718704,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671157 , 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=26671134 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 (26671157) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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 26671158 , 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=26671134 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 (26671158) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26671134) result : ((1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) 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`=26671134 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','kraft','flou','plastique','Carton_gris','autre_refus','metal','papier','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26671134 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','cartonnette','Teint_Dans_La_Masse','mal_croppe','kraft','flou','plastique','Carton_gris','autre_refus','metal','papier','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 26671134, 'sub_port_id': 26671160, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975070, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'kraft': {'main_port_id': 26671134, 'sub_port_id': 26671161, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975071, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'Carton_brun': {'main_port_id': 26671134, 'sub_port_id': 26671162, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975072, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'mal_croppe': {'main_port_id': 26671134, 'sub_port_id': 26671163, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975073, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'environnement': {'main_port_id': 26671134, 'sub_port_id': 26671164, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975074, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'flou': {'main_port_id': 26671134, 'sub_port_id': 26671165, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975075, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'plastique': {'main_port_id': 26671134, 'sub_port_id': 26671166, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975076, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'autre_refus': {'main_port_id': 26671134, 'sub_port_id': 26671167, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975077, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'Teint_Dans_La_Masse': {'main_port_id': 26671134, 'sub_port_id': 26671168, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975078, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'cartonnette': {'main_port_id': 26671134, 'sub_port_id': 26671169, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975079, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'papier': {'main_port_id': 26671134, 'sub_port_id': 26671170, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975080, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 3, 35), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}, 'metal': {'main_port_id': 26671134, 'sub_port_id': 26671171, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17975081, 'last_updated_at': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_desc': datetime.datetime(2025, 9, 9, 3, 5, 30), 'last_updated_at_asc': datetime.datetime(2025, 9, 9, 3, 3, 35)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671160,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671161,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671146 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671162,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671147 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671163,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671148 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671164,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671149 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671165,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671150 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671166,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671152 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671167,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671154 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671168,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671155 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671169,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671156 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671170,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671157 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26671171,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26671158 lien utilise dans velours : https://marlene.fotonower.com/velours/26671160,26671161,26671162,26671163,26671164,26671165,26671166,26671167,26671168,26671169,26671170,26671171?tags=Carton_gris,kraft,Carton_brun,mal_croppe,environnement,flou,plastique,autre_refus,Teint_Dans_La_Masse,cartonnette,papier,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26671134]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] map_info['map_portfolio_photo'] : {26671134: [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706, 1382718687, 1382718658, 1382718631, 1382718352, 1382718295, 1382718125, 1382718081, 1382717896, 1382717841, 1382717809, 1382717775, 1382717744, 1382717714, 1382717346, 1382717293, 1382717254, 1382717203]} final : False mtd_id 4302 list_pids : [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] Looping around the photos to save general results len do output : 1 /26671134. 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, '3681967') ('4302', '26671134', '1382719024', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718993', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718962', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718769', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718735', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718707', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718706', None, None, None, None, None, '3681967') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26671134', "{'Carton_gris': 26671145, 'kraft': 26671146, 'Carton_brun': 26671147, 'mal_croppe': 26671148, 'environnement': 26671149, 'flou': 26671150, 'plastique': 26671152, 'autre_refus': 26671154, 'Teint_Dans_La_Masse': 26671155, 'cartonnette': 26671156, 'papier': 26671157, 'metal': 26671158}", None, None, None, None, '3681967'), ('4302', '26671134', '1382719024', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718993', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718962', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718769', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718735', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718707', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718706', None, None, None, None, None, '3681967')] time used for this insertion : 0.015812397003173828 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5133910179138184 time spend to save output : 0.01597452163696289 total time spend for step 1 : 1.5293655395507812 step2:final Tue Sep 9 03:06:31 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (26671134) 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 26671134 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1382717346,1382718125,1382717293,1382718081,1382717254,1382717896,1382717841,1382717203,1382717809,1382717775,1382717744,1382717714,1382718352,1382718295,1382718687,1382718658,1382718631,1382718769,1382718735,1382718707,1382718706,1382719024,1382718993,1382718962); 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([26671134]) Inside saveOutput : final : False verbose : True original output for save of step final : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} new output for save of step final : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] map_info['map_portfolio_photo'] : {26671134: [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706, 1382718687, 1382718658, 1382718631, 1382718352, 1382718295, 1382718125, 1382718081, 1382717896, 1382717841, 1382717809, 1382717775, 1382717744, 1382717714, 1382717346, 1382717293, 1382717254, 1382717203]} final : False mtd_id 4302 list_pids : [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] Looping around the photos to save general results len do output : 7 /1382719024.Didn't retrieve data . /1382718993.Didn't retrieve data . /1382718962.Didn't retrieve data . /1382718769.Didn't retrieve data . /1382718735.Didn't retrieve data . /1382718707.Didn't retrieve data . /1382718706.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, '3681967') ('4302', '26671134', '1382719024', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718993', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718962', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718769', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718735', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718707', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718706', None, None, None, None, None, '3681967') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 21 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26671134', '1382719024', '0.057780975031770855', None, None, None, None, '3681967'), ('4302', '26671134', '1382718993', '0.057780975031770855', None, None, None, None, '3681967'), ('4302', '26671134', '1382718962', '0.057780975031770855', None, None, None, None, '3681967'), ('4302', '26671134', '1382718769', '0.057780975031770855', None, None, None, None, '3681967'), ('4302', '26671134', '1382718735', '0.057780975031770855', None, None, None, None, '3681967'), ('4302', '26671134', '1382718707', '0.057780975031770855', None, None, None, None, '3681967'), ('4302', '26671134', '1382718706', '0.057780975031770855', None, None, None, None, '3681967')] time used for this insertion : 0.013756990432739258 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.060312509536743164 time spend to save output : 0.01414346694946289 total time spend for step 2 : 0.07445597648620605 step3:velours_tree Tue Sep 9 03:06:31 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {26671134: [{'Carton_gris': 26671145, 'kraft': 26671146, 'Carton_brun': 26671147, 'mal_croppe': 26671148, 'environnement': 26671149, 'flou': 26671150, 'plastique': 26671152, 'autre_refus': 26671154, 'Teint_Dans_La_Masse': 26671155, 'cartonnette': 26671156, 'papier': 26671157, 'metal': 26671158}]} input_args_next_step : {26671134: ()} output_args : {26671134: [{'Carton_gris': 26671145, 'kraft': 26671146, 'Carton_brun': 26671147, 'mal_croppe': 26671148, 'environnement': 26671149, 'flou': 26671150, 'plastique': 26671152, 'autre_refus': 26671154, 'Teint_Dans_La_Masse': 26671155, 'cartonnette': 26671156, 'papier': 26671157, 'metal': 26671158}]} args : 26671134 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': 26671145, 'kraft': 26671146, 'Carton_brun': 26671147, 'mal_croppe': 26671148, 'environnement': 26671149, 'flou': 26671150, 'plastique': 26671152, 'autre_refus': 26671154, 'Teint_Dans_La_Masse': 26671155, 'cartonnette': 26671156, 'papier': 26671157, 'metal': 26671158},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26671134) 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([26671134]) 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.31945323944091797 time spend to save output : 6.103515625e-05 total time spend for step 3 : 0.31951427459716797 step4:send_mail_cod Tue Sep 9 03:06:32 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 : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} input_args_next_step : {1382719024: ()} output_args : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} args : 1382719024 depend.output_id : 0 input_args_next_step : {1382719024: ('0.057780975031770855',), 1382718993: ()} output_args : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} args : 1382718993 depend.output_id : 0 input_args_next_step : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ()} output_args : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} args : 1382718962 depend.output_id : 0 input_args_next_step : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ()} output_args : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} args : 1382718769 depend.output_id : 0 input_args_next_step : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ()} output_args : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} args : 1382718735 depend.output_id : 0 input_args_next_step : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ()} output_args : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} args : 1382718707 depend.output_id : 0 input_args_next_step : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ()} output_args : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',)} args : 1382718706 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 : {26671134: [{'Carton_gris': 26671145, 'kraft': 26671146, 'Carton_brun': 26671147, 'mal_croppe': 26671148, 'environnement': 26671149, 'flou': 26671150, 'plastique': 26671152, 'autre_refus': 26671154, 'Teint_Dans_La_Masse': 26671155, 'cartonnette': 26671156, 'papier': 26671157, 'metal': 26671158}]} input_args_next_step : {1382719024: ('0.057780975031770855',), 1382718993: ('0.057780975031770855',), 1382718962: ('0.057780975031770855',), 1382718769: ('0.057780975031770855',), 1382718735: ('0.057780975031770855',), 1382718707: ('0.057780975031770855',), 1382718706: ('0.057780975031770855',), 26671134: ()} output_args : {26671134: [{'Carton_gris': 26671145, 'kraft': 26671146, 'Carton_brun': 26671147, 'mal_croppe': 26671148, 'environnement': 26671149, 'flou': 26671150, 'plastique': 26671152, 'autre_refus': 26671154, 'Teint_Dans_La_Masse': 26671155, 'cartonnette': 26671156, 'papier': 26671157, 'metal': 26671158}]} args : 26671134 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :8, first value : ('0.057780975031770855',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26671134) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1382719024,1382718993,1382718962,1382718769,1382718735,1382718707,1382718706) Found this number of photos: 7 ##### Call download_photos : nb_thread : 5 begin to download photo : 1382718706 begin to download photo : 1382718735 begin to download photo : 1382718962 begin to download photo : 1382719024 download finish for photo 1382718706 begin to download photo : 1382718707 download finish for photo 1382718962 begin to download photo : 1382718993 download finish for photo 1382719024 download finish for photo 1382718735 begin to download photo : 1382718769 download finish for photo 1382718707 download finish for photo 1382718993 download finish for photo 1382718769 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette266711461757379992/ imagette266711481757379992/ imagette266711501757379992/ imagette266711521757379992/ imagette266711541757379992/ length of list_filenames : 7 ; length of list_pids : 7 ; length of list_args : 7 results_Auto_P26671134_09-09-2025_03_06_32.pdf 26671146 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671146 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266711461757379992 26671148 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671148 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266711481757379992 26671150 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671150 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266711501757379992 26671152 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671152 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266711521757379992 26671154 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671154 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266711541757379992 26671156 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671156 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1382718702: '1757379865_427750_1382717346_ea589fcdd5b668fd8127ce1f188eda4f_rle_crop_3952019427_0.png', 1382718703: '1757379865_427750_1382717293_add46f3ddd6357c36a7d9f257134c666_rle_crop_3952019441_0.png', 1382718704: '1757379865_427750_1382717254_1099c157a43faa3f871a6ed9dcc966bc_rle_crop_3952019457_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/fc140f08cf6849a9117d97471e0c66f5_29589880.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/843c0b649cbe8a8f270fdc855832cd70_69949430.png change filename to text .imagette266711561757379992/ imagette266711561757379992/1757379865_427750_1382717254_1099c157a43faa3f871a6ed9dcc966bc_rle_crop_3952019457_0.png.png imagette266711561757379992/1757379865_427750_1382717293_add46f3ddd6357c36a7d9f257134c666_rle_crop_3952019441_0.png.png imagette266711561757379992/1757379865_427750_1382717346_ea589fcdd5b668fd8127ce1f188eda4f_rle_crop_3952019427_0.png.png imagette266711581757379992/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/65bd7ccfe729d452a420c14af92e5bdd_16761583.png imagette266711561757379992 26671158 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671158 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266711581757379992 26671145 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671145 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1382718700: '1757379865_427750_1382717293_add46f3ddd6357c36a7d9f257134c666_rle_crop_3952019439_0.png', 1382718701: '1757379865_427750_1382717203_26f2e4ddba527e563b1679e17aeeb562_rle_crop_3952019473_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/d9e0c09c27bec2065ee00dc6c1220990_13002740.png change filename to text .imagette266711451757379992/ imagette266711451757379992/1757379865_427750_1382717203_26f2e4ddba527e563b1679e17aeeb562_rle_crop_3952019473_0.png.png imagette266711451757379992/1757379865_427750_1382717293_add46f3ddd6357c36a7d9f257134c666_rle_crop_3952019439_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/fad46c13ff03924d643c0501c2de7d54_51482462.png imagette266711451757379992 26671147 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671147 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1382718705: '1757379865_427750_1382717254_1099c157a43faa3f871a6ed9dcc966bc_rle_crop_3952019458_0.png'} change filename to text .imagette266711471757379992/ imagette266711471757379992/1757379865_427750_1382717254_1099c157a43faa3f871a6ed9dcc966bc_rle_crop_3952019458_0.png.png imagette266711551757379992/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/60c4b7c5c6156e84d71fd2b82ba89b6a_21444328.png imagette266711471757379992 26671155 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671155 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette266711551757379992 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26671134 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26671160,26671161,26671162,26671163,26671164,26671165,26671166,26671167,26671168,26671169,26671170,26671171?tags=Carton_gris,kraft,Carton_brun,mal_croppe,environnement,flou,plastique,autre_refus,Teint_Dans_La_Masse,cartonnette,papier,metal your option no_mail is active, we will not send the real mail to your client args[1382719024] : ('0.057780975031770855',) no score found for photo 1382719024 We are sending mail with results at report@fotonower.com args[1382718993] : ('0.057780975031770855',) no score found for photo 1382718993 We are sending mail with results at report@fotonower.com args[1382718962] : ('0.057780975031770855',) no score found for photo 1382718962 We are sending mail with results at report@fotonower.com args[1382718769] : ('0.057780975031770855',) no score found for photo 1382718769 We are sending mail with results at report@fotonower.com args[1382718735] : ('0.057780975031770855',) no score found for photo 1382718735 We are sending mail with results at report@fotonower.com args[1382718707] : ('0.057780975031770855',) no score found for photo 1382718707 We are sending mail with results at report@fotonower.com args[1382718706] : ('0.057780975031770855',) no score found for photo 1382718706 We are sending mail with results at report@fotonower.com refus_total : 0.057780975031770855 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671134 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_P26671134_09-09-2025_03_06_32.pdf results_Auto_P26671134_09-09-2025_03_06_32.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26671134_09-09-2025_03_06_32.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','26671134','results_Auto_P26671134_09-09-2025_03_06_32.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26671134_09-09-2025_03_06_32.pdf','pdf','','0.09','0.057780975031770855') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26671134]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] map_info['map_portfolio_photo'] : {26671134: [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706, 1382718687, 1382718658, 1382718631, 1382718352, 1382718295, 1382718125, 1382718081, 1382717896, 1382717841, 1382717809, 1382717775, 1382717744, 1382717714, 1382717346, 1382717293, 1382717254, 1382717203]} final : False mtd_id 4302 list_pids : [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] 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, '3681967') ('4302', '26671134', '1382719024', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718993', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718962', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718769', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718735', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718707', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718706', None, None, None, None, None, '3681967') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 7 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26671134', '1382719024', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718993', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718962', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718769', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718735', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718707', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718706', None, None, None, None, None, '3681967')] time used for this insertion : 0.012751579284667969 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7577176094055176 time spend to save output : 0.012938499450683594 total time spend for step 4 : 1.7706561088562012 step5:split_time_score Tue Sep 9 03:06:33 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 : ['26671134'] 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 : [('26671134',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26671134) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1382719024: {'path': 'temp/1757379992_4192104_1382719024_ff0b4a6886f8a3cc2bb9f3c41bf7e059.jpg', 'extension': 'jpg'}, 1382718706: {'path': 'temp/1757379992_4192104_1382718706_78848b511d5113597092b74f3265af42.jpg', 'extension': 'jpg'}, 1382718707: {'path': 'temp/1757379992_4192104_1382718707_a6b565cb59c3c9f747622b641eb6dcb6.jpg', 'extension': 'jpg'}, 1382718962: {'path': 'temp/1757379992_4192104_1382718962_5f415aaa8165cb28bb1407315dbefc77.jpg', 'extension': 'jpg'}, 1382718993: {'path': 'temp/1757379992_4192104_1382718993_653428737cb9c5f912cf7967d98c6455.jpg', 'extension': 'jpg'}, 1382718735: {'path': 'temp/1757379992_4192104_1382718735_a0d11de5aeaaea35c5ff91c56c75547e.jpg', 'extension': 'jpg'}, 1382718769: {'path': 'temp/1757379992_4192104_1382718769_b7912b32bcea840b8e7462879cc37d1c.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 = 26671134; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 26671134 group by h (('03', 24),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=26671134 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 (26671134) 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 (26671134) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 09092025 26671134 Nombre de photos uploadées : 24 / 23040 (0%) 09092025 26671134 Nombre de photos taguées (types de déchets): 0 / 24 (0%) 09092025 26671134 Nombre de photos taguées (volume) : 0 / 24 (0%) [{'photo_id': 1382717346, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/ea589fcdd5b668fd8127ce1f188eda4f.jpg', 'username': None, 'uploaded_at': 1757379673, 'text': 'image_09092025_03_00_04_010138m0.jpg 1e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1382718125, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/aea80e53aa0209ad8b6a6f9a613e3689.jpg', 'username': None, 'uploaded_at': 1757379778, 'text': 'image_09092025_03_00_04_10138.jpg'}, {'photo_id': 1382717293, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/add46f3ddd6357c36a7d9f257134c666.jpg', 'username': None, 'uploaded_at': 1757379673, 'text': 'image_09092025_03_00_14_010135m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1382718081, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/9/abf0edab0897f62483f72434150fa9ff.jpg', 'username': None, 'uploaded_at': 1757379778, 'text': 'image_09092025_03_00_14_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ???????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0011970996856689453 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26671134, '2025-09-09' ) 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-09-09' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2253579,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2050647735595703 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= 2253579 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26665951, 'dashboard_result_id': 14921830, '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_P26665951_09-09-2025_00_18_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26665956, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26665957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26665958, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26665959, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26665960, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26665961, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26665962, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26665963, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26665964, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26665965, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26665966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26665967, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26666470, 'dashboard_result_id': 14921831, '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_P26666470_09-09-2025_00_34_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26666477, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26666478, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26666479, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26666480, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26666481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26666482, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26666483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26666484, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26666485, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26666486, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26666487, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26666488, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26666997, 'dashboard_result_id': 14921832, '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_P26666997_09-09-2025_00_48_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26667000, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26667001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26667002, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26667003, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26667004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26667005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26667006, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26667007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26667008, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26667009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26667010, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26667011, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26667314, 'dashboard_result_id': 14921833, '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_P26667314_09-09-2025_01_33_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26667321, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26667322, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26667323, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26667324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26667325, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26667326, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26667327, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26667328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26667329, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26667330, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26667331, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26667332, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26668399, 'dashboard_result_id': 14921834, '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_P26668399_09-09-2025_01_48_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26668401, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26668402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26668403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26668404, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26668405, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26668406, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26668407, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26668408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26668409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26668410, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26668411, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26668412, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26668763, 'dashboard_result_id': 14921835, '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_P26668763_09-09-2025_02_02_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26668767, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26668768, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26668769, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26668770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26668771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26668772, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26668773, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26668774, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26668775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26668776, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26668777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26668778, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26669124, 'dashboard_result_id': 14921836, '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_P26669124_09-09-2025_02_19_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26669142, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26669143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26669144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26669145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26669146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26669147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26669148, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26669149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26669150, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26669151, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26669152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26669153, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26669820, 'dashboard_result_id': 14921837, '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_P26669820_09-09-2025_02_33_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26669828, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26669829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26669830, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26669831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26669832, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26669833, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26669834, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26669835, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26669836, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26669837, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26669838, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26669839, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26670286, 'dashboard_result_id': 14921838, '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_P26670286_09-09-2025_02_48_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26670290, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26670291, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26670292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26670293, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26670294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26670295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26670296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26670297, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26670298, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26670299, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26670300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26670301, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26670744, 'dashboard_result_id': 14921839, '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_P26670744_09-09-2025_03_04_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26670763, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26670764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26670765, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26670766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26670767, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26670768, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26670769, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26670770, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26670771, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26670772, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26670773, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26670774, 'pht': 3726}}"}, {'dashboat_entry_day': 2253579, 'dashboard_run_id': 2261661, 'mtr_portfolio_id': 26671134, 'dashboard_result_id': 14921840, '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_P26671134_09-09-2025_03_05_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26671145, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26671146, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26671147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26671148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26671149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26671150, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26671152, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26671154, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26671155, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26671156, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26671157, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26671158, '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 = 26665951 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': 3681317, 'mtr_portfolio_id': 26665951, 'created_at': datetime.datetime(2025, 9, 9, 0, 18, 57), 'result': '0.046662394749032415', 'result_long': None, 'result_double': None}] Qualite : 0.046662394749032415 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26665951 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26665951_09-09-2025_00_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26665951 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_P26665951_09-09-2025_00_18_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26665956, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26665957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26665958, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26665959, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26665960, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26665961, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26665962, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26665963, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26665964, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26665965, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26665966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26665967, 'pht': 3726}}" where mtr_portfolio_id = 26665951 and dashboard_run_id = 2261661 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`=26665951 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921830, 0.046662394749032415, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26665951_09-09-2025_00_18_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26665956, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26665957, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26665958, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26665959, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26665960, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26665961, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26665962, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26665963, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26665964, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26665965, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26665966, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26665967, '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 = 26666470 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': 3681360, 'mtr_portfolio_id': 26666470, 'created_at': datetime.datetime(2025, 9, 9, 0, 34, 59), 'result': '0.054882241324818885', 'result_long': None, 'result_double': None}] Qualite : 0.054882241324818885 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26666470 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26666470_09-09-2025_00_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26666470 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_P26666470_09-09-2025_00_34_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26666477, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26666478, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26666479, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26666480, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26666481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26666482, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26666483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26666484, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26666485, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26666486, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26666487, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26666488, 'pht': 3726}}" where mtr_portfolio_id = 26666470 and dashboard_run_id = 2261661 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`=26666470 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921831, 0.054882241324818885, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26666470_09-09-2025_00_34_59.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26666477, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26666478, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26666479, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26666480, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26666481, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26666482, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26666483, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26666484, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26666485, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26666486, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26666487, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26666488, '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 = 26666997 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': 3681419, 'mtr_portfolio_id': 26666997, 'created_at': datetime.datetime(2025, 9, 9, 0, 48, 58), 'result': '0.061625099150971356', 'result_long': None, 'result_double': None}] Qualite : 0.061625099150971356 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26666997 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26666997_09-09-2025_00_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26666997 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_P26666997_09-09-2025_00_48_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26667000, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26667001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26667002, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26667003, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26667004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26667005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26667006, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26667007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26667008, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26667009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26667010, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26667011, 'pht': 3726}}" where mtr_portfolio_id = 26666997 and dashboard_run_id = 2261661 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`=26666997 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921832, 0.061625099150971356, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26666997_09-09-2025_00_48_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26667000, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26667001, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26667002, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26667003, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26667004, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26667005, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26667006, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26667007, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26667008, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26667009, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26667010, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26667011, '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 = 26667314 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': 3681455, 'mtr_portfolio_id': 26667314, 'created_at': datetime.datetime(2025, 9, 9, 1, 33), 'result': '0.07097795704242905', 'result_long': None, 'result_double': None}] Qualite : 0.07097795704242905 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26667314 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26667314_09-09-2025_01_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26667314 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_P26667314_09-09-2025_01_33_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26667321, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26667322, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26667323, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26667324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26667325, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26667326, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26667327, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26667328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26667329, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26667330, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26667331, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26667332, 'pht': 3726}}" where mtr_portfolio_id = 26667314 and dashboard_run_id = 2261661 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`=26667314 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921833, 0.07097795704242905, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26667314_09-09-2025_01_33_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26667321, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26667322, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26667323, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26667324, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26667325, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26667326, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26667327, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26667328, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26667329, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26667330, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26667331, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26667332, '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 = 26668399 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': 3681594, 'mtr_portfolio_id': 26668399, 'created_at': datetime.datetime(2025, 9, 9, 1, 48, 57), 'result': '0.04110695882135456', 'result_long': None, 'result_double': None}] Qualite : 0.04110695882135456 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26668399 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26668399_09-09-2025_01_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26668399 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_P26668399_09-09-2025_01_48_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26668401, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26668402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26668403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26668404, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26668405, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26668406, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26668407, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26668408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26668409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26668410, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26668411, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26668412, 'pht': 3726}}" where mtr_portfolio_id = 26668399 and dashboard_run_id = 2261661 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`=26668399 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921834, 0.04110695882135456, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26668399_09-09-2025_01_48_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26668401, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26668402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26668403, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26668404, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26668405, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26668406, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26668407, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26668408, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26668409, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26668410, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26668411, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26668412, '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 = 26668763 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': 3681635, 'mtr_portfolio_id': 26668763, 'created_at': datetime.datetime(2025, 9, 9, 2, 2, 57), 'result': '0.028900682519440953', 'result_long': None, 'result_double': None}] Qualite : 0.028900682519440953 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26668763 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26668763_09-09-2025_02_02_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26668763 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_P26668763_09-09-2025_02_02_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26668767, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26668768, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26668769, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26668770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26668771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26668772, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26668773, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26668774, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26668775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26668776, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26668777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26668778, 'pht': 3726}}" where mtr_portfolio_id = 26668763 and dashboard_run_id = 2261661 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`=26668763 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921835, 0.028900682519440953, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26668763_09-09-2025_02_02_57.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26668767, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26668768, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26668769, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26668770, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26668771, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26668772, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26668773, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26668774, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26668775, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26668776, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26668777, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26668778, '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 = 26669124 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': 3681698, 'mtr_portfolio_id': 26669124, 'created_at': datetime.datetime(2025, 9, 9, 2, 19, 1), 'result': '0.039077998133629235', 'result_long': None, 'result_double': None}] Qualite : 0.039077998133629235 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26669124 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26669124_09-09-2025_02_19_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26669124 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_P26669124_09-09-2025_02_19_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26669142, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26669143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26669144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26669145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26669146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26669147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26669148, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26669149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26669150, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26669151, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26669152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26669153, 'pht': 3726}}" where mtr_portfolio_id = 26669124 and dashboard_run_id = 2261661 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`=26669124 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921836, 0.039077998133629235, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26669124_09-09-2025_02_19_02.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26669142, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26669143, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26669144, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26669145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26669146, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26669147, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26669148, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26669149, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26669150, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26669151, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26669152, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26669153, '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 = 26669820 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': 3681756, 'mtr_portfolio_id': 26669820, 'created_at': datetime.datetime(2025, 9, 9, 2, 33, 27), 'result': '0.03782897775463108', 'result_long': None, 'result_double': None}] Qualite : 0.03782897775463108 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26669820 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26669820_09-09-2025_02_33_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26669820 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_P26669820_09-09-2025_02_33_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26669828, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26669829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26669830, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26669831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26669832, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26669833, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26669834, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26669835, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26669836, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26669837, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26669838, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26669839, 'pht': 3726}}" where mtr_portfolio_id = 26669820 and dashboard_run_id = 2261663 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`=26669820 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921837, 0.03782897775463108, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26669820_09-09-2025_02_33_28.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26669828, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26669829, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26669830, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26669831, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26669832, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26669833, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26669834, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26669835, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26669836, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26669837, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26669838, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26669839, '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 = 26670286 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': 3681808, 'mtr_portfolio_id': 26670286, 'created_at': datetime.datetime(2025, 9, 9, 2, 48, 58), 'result': '0.04562831883154974', 'result_long': None, 'result_double': None}] Qualite : 0.04562831883154974 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26670286 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26670286_09-09-2025_02_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26670286 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_P26670286_09-09-2025_02_48_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26670290, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26670291, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26670292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26670293, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26670294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26670295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26670296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26670297, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26670298, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26670299, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26670300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26670301, 'pht': 3726}}" where mtr_portfolio_id = 26670286 and dashboard_run_id = 2261663 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`=26670286 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921838, 0.04562831883154974, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26670286_09-09-2025_02_48_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26670290, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26670291, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26670292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26670293, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26670294, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26670295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26670296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26670297, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26670298, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26670299, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26670300, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26670301, '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 = 26670744 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': 3681875, 'mtr_portfolio_id': 26670744, 'created_at': datetime.datetime(2025, 9, 9, 3, 4, 57), 'result': '0.0625638514028179', 'result_long': None, 'result_double': None}] Qualite : 0.0625638514028179 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26670744 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26670744_09-09-2025_03_04_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26670744 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_P26670744_09-09-2025_03_04_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26670763, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26670764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26670765, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26670766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26670767, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26670768, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26670769, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26670770, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26670771, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26670772, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26670773, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26670774, 'pht': 3726}}" where mtr_portfolio_id = 26670744 and dashboard_run_id = 2261663 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`=26670744 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921839, 0.0625638514028179, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26670744_09-09-2025_03_04_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26670763, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26670764, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26670765, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26670766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26670767, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26670768, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26670769, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26670770, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26670771, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26670772, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26670773, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26670774, '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 = 26671134 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': 3681967, 'mtr_portfolio_id': 26671134, 'created_at': datetime.datetime(2025, 9, 9, 3, 6, 31), 'result': '0.057780975031770855', 'result_long': None, 'result_double': None}] Qualite : 0.057780975031770855 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26671134 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26671134_09-09-2025_03_06_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26671134 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_P26671134_09-09-2025_03_06_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26671145, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26671146, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26671147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26671148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26671149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26671150, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26671152, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26671154, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26671155, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26671156, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26671157, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26671158, 'pht': 3726}}" where mtr_portfolio_id = 26671134 and dashboard_run_id = 2261663 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`=26671134 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (14921840, 0.057780975031770855, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26671134_09-09-2025_03_06_32.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26671145, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26671146, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26671147, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26671148, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26671149, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26671150, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26671152, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26671154, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26671155, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26671156, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26671157, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26671158, '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 (26665951,26666470,26666997,26667314,26668399,26668763,26669124,26669820,26670286,26670744,26671134) result : ((1382694087,), (1382694183,), (1382694245,), (1382694319,), (1382694895,), (1382694983,), (1382695070,), (1382695164,), (1382695818,), (1382695895,), (1382695984,), (1382696065,), (1382696130,), (1382696190,), (1382696400,), (1382696407,), (1382696438,), (1382696470,), (1382696837,), (1382696868,), (1382696928,), (1382696966,), (1382696999,), (1382697040,), (1382697100,), (1382697146,), (1382697174,), (1382697194,), (1382697215,), (1382697218,), (1382697224,), (1382697271,), (1382697272,), (1382697291,), (1382697326,), (1382697385,), (1382697470,), (1382697558,), (1382697652,), (1382698439,), (1382698441,), (1382698443,), (1382698446,), (1382698451,), (1382698455,), (1382698698,), (1382698753,), (1382698793,), (1382698825,), (1382698855,), (1382698894,), (1382698911,), (1382698928,), (1382698938,), (1382698948,), (1382698964,), (1382699012,), (1382699014,), (1382699017,), (1382699021,), (1382699030,), (1382699038,), (1382699054,), (1382699056,), (1382699058,), (1382699060,), (1382699061,), (1382699073,), (1382699077,), (1382699081,), (1382699083,), (1382699089,), (1382699095,), (1382699099,), (1382699104,), (1382699110,), (1382699281,), (1382699199,), (1382699230,), (1382699263,), (1382699321,), (1382699322,), (1382699324,), (1382699328,), (1382699395,), (1382699396,), (1382699398,), (1382699403,), (1382699429,), (1382699433,), (1382699438,), (1382699441,), (1382699466,), (1382699467,), (1382699468,), (1382699473,), (1382699477,), (1382699484,), (1382699612,), (1382699647,), (1382699675,), (1382699722,), (1382700012,), (1382700045,), (1382700074,), (1382700103,), (1382700433,), (1382700465,), (1382700502,), (1382700533,), (1382700741,), (1382700750,), (1382700754,), (1382700756,), (1382700958,), (1382700969,), (1382700971,), (1382700974,), (1382700978,), (1382700981,), (1382701248,), (1382701333,), (1382701237,), (1382701240,), (1382701241,), (1382701244,), (1382701310,), (1382701311,), (1382701313,), (1382701318,), (1382701321,), (1382701324,), (1382701330,), (1382701341,), (1382701347,), (1382701362,), (1382701364,), (1382701366,), (1382701369,), (1382701375,), (1382701408,), (1382701411,), (1382701412,), (1382701416,), (1382701419,), (1382701439,), (1382701441,), (1382701449,), (1382701453,), (1382701463,), (1382701520,), (1382701522,), (1382701525,), (1382701530,), (1382701549,), (1382701552,), (1382701555,), (1382701589,), (1382701591,), (1382701592,), (1382701595,), (1382701616,), (1382701617,), (1382701619,), (1382701623,), (1382701626,), (1382701631,), (1382701641,), (1382701642,), (1382701643,), (1382701645,), (1382701651,), (1382701663,), (1382701668,), (1382701673,), (1382701677,), (1382701680,), (1382701685,), (1382701689,), (1382701690,), (1382701692,), (1382701694,), (1382701696,), (1382701707,), (1382701710,), (1382701714,), (1382701716,), (1382701718,), (1382701720,), (1382701734,), (1382701741,), (1382701744,), (1382701747,), (1382701749,), (1382701751,), (1382701762,), (1382701769,), (1382701773,), (1382701777,), (1382701784,), (1382701755,), (1382701758,), (1382701791,), (1382701794,), (1382701798,), (1382701802,), (1382701805,), (1382701808,), (1382701828,), (1382701830,), (1382701832,), (1382701835,), (1382701841,), (1382701854,), (1382701856,), (1382701908,), (1382701922,), (1382701925,), (1382701929,), (1382701933,), (1382701960,), (1382701962,), (1382701966,), (1382701971,), (1382701975,), (1382702002,), (1382702004,), (1382702005,), (1382702007,), (1382702013,), (1382702035,), (1382702062,), (1382702067,), (1382702072,), (1382702076,), (1382702080,), (1382702087,), (1382702090,), (1382702092,), (1382702097,), (1382702101,), (1382702115,), (1382702119,), (1382702123,), (1382702126,), (1382702156,), (1382702160,), (1382702162,), (1382702165,), (1382702185,), (1382702187,), (1382702189,), (1382702192,), (1382702195,), (1382702218,), (1382702219,), (1382702230,), (1382702237,), (1382702241,), (1382702246,), (1382706399,), (1382706429,), (1382706431,), (1382706513,), (1382706515,), (1382706516,), (1382706519,), (1382706522,), (1382706544,), (1382706545,), (1382706548,), (1382706552,), (1382706575,), (1382706580,), (1382706585,), (1382706589,), (1382706595,), (1382706609,), (1382706615,), (1382706619,), (1382706636,), (1382706637,), (1382706638,), (1382706640,), (1382706645,), (1382706672,), (1382706674,), (1382706676,), (1382706680,), (1382706685,), (1382706700,), (1382706703,), (1382706706,), (1382706708,), (1382706735,), (1382706765,), (1382706769,), (1382706774,), (1382706805,), (1382706808,), (1382706810,), (1382706813,), (1382706872,), (1382706874,), (1382706876,), (1382706880,), (1382706885,), (1382706914,), (1382706915,), (1382706917,), (1382706920,), (1382706923,), (1382706940,), (1382706941,), (1382706943,), (1382706946,), (1382706980,), (1382706963,), (1382706965,), (1382706968,), (1382706971,), (1382706976,), (1382706990,), (1382706992,), (1382706995,), (1382706999,), (1382707003,), (1382707006,), (1382707022,), (1382707028,), (1382707029,), (1382707109,), (1382707112,), (1382707116,), (1382707120,), (1382707124,), (1382707146,), (1382707147,), (1382707148,), (1382707150,), (1382707155,), (1382707174,), (1382707397,), (1382707425,), (1382707452,), (1382707483,), (1382707513,), (1382707747,), (1382707773,), (1382707885,), (1382707887,), (1382707888,), (1382708041,), (1382708071,), (1382708103,), (1382708139,), (1382708321,), (1382708324,), (1382708327,), (1382708343,), (1382708345,), (1382708348,), (1382708372,), (1382708375,), (1382708378,), (1382708389,), (1382708419,), (1382708421,), (1382708423,), (1382708745,), (1382708775,), (1382708807,), (1382708837,), (1382708869,), (1382709572,), (1382709404,), (1382709461,), (1382709516,), (1382709816,), (1382709853,), (1382709878,), (1382710151,), (1382710173,), (1382710205,), (1382710216,), (1382710238,), (1382710240,), (1382710248,), (1382710250,), (1382710251,), (1382710254,), (1382710257,), (1382710261,), (1382710266,), (1382710391,), (1382710422,), (1382710454,), (1382710493,), (1382710527,), (1382710561,), (1382710684,), (1382710715,), (1382711170,), (1382711231,), (1382711643,), (1382711682,), (1382711742,), (1382711773,), (1382712106,), (1382712136,), (1382712141,), (1382712162,), (1382712216,), (1382712277,), (1382712279,), (1382712282,), (1382712286,), (1382712317,), (1382712333,), (1382712337,), (1382712342,), (1382712347,), (1382712352,), (1382712568,), (1382712599,), (1382712630,), (1382712663,), (1382712694,), (1382712729,), (1382712836,), (1382712861,), (1382712863,), (1382712865,), (1382712931,), (1382712965,), (1382712974,), (1382712986,), (1382713010,), (1382713049,), (1382713052,), (1382713058,), (1382713062,), (1382713064,), (1382713066,), (1382713103,), (1382713269,), (1382713304,), (1382713423,), (1382713077,), (1382713087,), (1382713094,), (1382713099,), (1382713102,), (1382713125,), (1382713159,), (1382713190,), (1382713231,), (1382713511,), (1382713541,), (1382713571,), (1382713878,), (1382713908,), (1382713938,), (1382713942,), (1382713946,), (1382713975,), (1382713977,), (1382713979,), (1382713982,), (1382713990,), (1382714291,), (1382714323,), (1382714353,), (1382714477,), (1382714478,), (1382714479,), (1382714481,), (1382714500,), (1382714501,), (1382714505,), (1382714510,), (1382714514,), (1382714517,), (1382714522,), (1382714532,), (1382714544,), (1382714549,), (1382714559,), (1382714561,), (1382714563,), (1382714566,), (1382714570,), (1382714598,), (1382714600,), (1382714602,), (1382714605,), (1382714632,), (1382714634,), (1382714637,), (1382714641,), (1382714673,), (1382714676,), (1382714679,), (1382714683,), (1382714686,), (1382714704,), (1382714707,), (1382714710,), (1382714744,), (1382714745,), (1382714746,), (1382714749,), (1382714804,), (1382714802,), (1382714803,), (1382714827,), (1382714830,), (1382714886,), (1382714887,), (1382714888,), (1382714892,), (1382714896,), (1382714924,), (1382714926,), (1382714928,), (1382714931,), (1382714935,), (1382714941,), (1382714965,), (1382714970,), (1382714975,), (1382714981,), (1382714985,), (1382714989,), (1382715003,), (1382715006,), (1382715007,), (1382715008,), (1382715013,), (1382715017,), (1382715027,), (1382715030,), (1382715034,), (1382715037,), (1382715047,), (1382715060,), (1382715074,), (1382715112,), (1382715115,), (1382715117,), (1382715120,), (1382715142,), (1382715144,), (1382715147,), (1382715150,), (1382715190,), (1382715192,), (1382715215,), (1382715218,), (1382715222,), (1382715228,), (1382715257,), (1382715263,), (1382715276,), (1382715299,), (1382715300,), (1382715301,), (1382715305,), (1382715333,), (1382715336,), (1382715338,), (1382715341,), (1382715346,), (1382715349,), (1382715363,), (1382715368,), (1382715373,), (1382715379,), (1382715383,), (1382715388,), (1382715393,), (1382715395,), (1382715414,), (1382715398,), (1382715401,), (1382715405,), (1382715408,), (1382715411,), (1382715449,), (1382715451,), (1382715453,), (1382715455,), (1382715459,), (1382715463,), (1382715485,), (1382715487,), (1382715488,), (1382715500,), (1382715513,), (1382715530,), (1382715533,), (1382715535,), (1382715567,), (1382715568,), (1382715569,), (1382715571,), (1382715591,), (1382715595,), (1382715600,), (1382715619,), (1382715620,), (1382715621,), (1382715633,), (1382715636,), (1382715639,), (1382715642,), (1382715649,), (1382715650,), (1382715659,), (1382715661,), (1382715663,), (1382715666,), (1382715681,), (1382715684,), (1382715689,), (1382715696,), (1382715702,), (1382715711,), (1382715713,), (1382715715,), (1382715728,), (1382715730,), (1382715742,), (1382715807,), (1382715810,), (1382715813,), (1382715815,), (1382716517,), (1382716576,), (1382716637,), (1382716691,), (1382716752,), (1382716895,), (1382716947,), (1382717004,), (1382717059,), (1382717386,), (1382718157,), (1382717203,), (1382717254,), (1382717293,), (1382717346,), (1382717714,), (1382717744,), (1382717775,), (1382717809,), (1382717841,), (1382717896,), (1382718081,), (1382718125,), (1382718295,), (1382718352,), (1382718631,), (1382718658,), (1382718687,), (1382718706,), (1382718707,), (1382718735,), (1382718769,), (1382718962,), (1382718993,), (1382719024,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'09092025': {'nb_upload': 24, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26671134]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] map_info['map_portfolio_photo'] : {26671134: [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706, 1382718687, 1382718658, 1382718631, 1382718352, 1382718295, 1382718125, 1382718081, 1382717896, 1382717841, 1382717809, 1382717775, 1382717744, 1382717714, 1382717346, 1382717293, 1382717254, 1382717203]} final : True mtd_id 4302 list_pids : [1382719024, 1382718993, 1382718962, 1382718769, 1382718735, 1382718707, 1382718706] Looping around the photos to save general results len do output : 1 /26671134Didn'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, '3681967') ('4302', '26671134', '1382719024', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718993', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718962', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718769', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718735', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718707', None, None, None, None, None, '3681967') ('4302', None, None, None, None, None, None, None, '3681967') ('4302', '26671134', '1382718706', None, None, None, None, None, '3681967') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26671134', 'None', None, None, None, None, '3681967'), ('4302', '26671134', '1382719024', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718993', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718962', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718769', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718735', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718707', None, None, None, None, None, '3681967'), ('4302', '26671134', '1382718706', None, None, None, None, None, '3681967')] time used for this insertion : 0.01632213592529297 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.9263005256652832 time spend to save output : 0.016506671905517578 total time spend for step 5 : 0.9428071975708008 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 (3681967) 2.01user 2.33system 0:08.68elapsed 50%CPU (0avgtext+0avgdata 159832maxresident)k 1024inputs+5000outputs (57major+64178minor)pagefaults 0swaps