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 : 748663 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 (3716758) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3716758) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821430 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3716758'] with mtr_portfolio_ids : ['26821430'] and first list_photo_ids : [] new path : /proc/748663/ Name: python3 Umask: 0002 State: R (running) Tgid: 748663 Ngid: 0 Pid: 748663 PPid: 748662 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 748663 NSpid: 748663 NSpgid: 746534 NSsid: 746534 VmPeak: 1107252 kB VmSize: 1107252 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97880 kB VmRSS: 97880 kB RssAnon: 60164 kB RssFile: 37716 kB RssShmem: 0 kB VmData: 866004 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 592 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: 53 nonvoluntary_ctxt_switches: 88 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '748663', 'Ngid': '0', 'Pid': '748663', 'PPid': '748662', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '748663', 'NSpid': '748663', 'NSpgid': '746534', 'NSsid': '746534', 'VmPeak': '1107252 kB', 'VmSize': '1107252 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97880 kB', 'VmRSS': '97880 kB', 'RssAnon': '60164 kB', 'RssFile': '37716 kB', 'RssShmem': '0 kB', 'VmData': '866004 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '592 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': '53', 'nonvoluntary_ctxt_switches': '88'} ('datou_batch_current', '748663', '1107252', '0', '1107252', '866004', '97880', b'', 'marlene', '3716758') 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 (26821430) 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 (3716758 ) ) 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 (26821430) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1383605285, 'portfolio_id': 26821430}, {'photo_id': 1383605083, 'portfolio_id': 26821430}, {'photo_id': 1383605081, 'portfolio_id': 26821430}, {'photo_id': 1383605079, 'portfolio_id': 26821430}, {'photo_id': 1383605044, 'portfolio_id': 26821430}, {'photo_id': 1383605040, 'portfolio_id': 26821430}, {'photo_id': 1383605037, 'portfolio_id': 26821430}, {'photo_id': 1383605018, 'portfolio_id': 26821430}, {'photo_id': 1383604997, 'portfolio_id': 26821430}, {'photo_id': 1383604986, 'portfolio_id': 26821430}, {'photo_id': 1383604981, 'portfolio_id': 26821430}, {'photo_id': 1383604977, 'portfolio_id': 26821430}, {'photo_id': 1383604974, 'portfolio_id': 26821430}, {'photo_id': 1383604972, 'portfolio_id': 26821430}, {'photo_id': 1383604950, 'portfolio_id': 26821430}, {'photo_id': 1383604946, 'portfolio_id': 26821430}, {'photo_id': 1383604939, 'portfolio_id': 26821430}, {'photo_id': 1383604914, 'portfolio_id': 26821430}, {'photo_id': 1383604909, 'portfolio_id': 26821430}, {'photo_id': 1383604905, 'portfolio_id': 26821430}, {'photo_id': 1383604900, 'portfolio_id': 26821430}, {'photo_id': 1383604880, 'portfolio_id': 26821430}, {'photo_id': 1383604876, 'portfolio_id': 26821430}, {'photo_id': 1383604872, 'portfolio_id': 26821430}, {'photo_id': 1383604868, 'portfolio_id': 26821430}, {'photo_id': 1383604867, 'portfolio_id': 26821430}, {'photo_id': 1383604858, 'portfolio_id': 26821430}, {'photo_id': 1383604854, 'portfolio_id': 26821430}, {'photo_id': 1383604849, 'portfolio_id': 26821430}, {'photo_id': 1383604844, 'portfolio_id': 26821430}, {'photo_id': 1383604841, 'portfolio_id': 26821430}, {'photo_id': 1383604840, 'portfolio_id': 26821430}, {'photo_id': 1383604819, 'portfolio_id': 26821430}, {'photo_id': 1383604816, 'portfolio_id': 26821430}, {'photo_id': 1383604813, 'portfolio_id': 26821430}, {'photo_id': 1383604784, 'portfolio_id': 26821430}, {'photo_id': 1383604779, 'portfolio_id': 26821430}] map_portfolio_id_photo_id: {26821430: [1383605285, 1383605083, 1383605081, 1383605079, 1383605044, 1383605040, 1383605037, 1383605018, 1383604997, 1383604986, 1383604981, 1383604977, 1383604974, 1383604972, 1383604950, 1383604946, 1383604939, 1383604914, 1383604909, 1383604905, 1383604900, 1383604880, 1383604876, 1383604872, 1383604868, 1383604867, 1383604858, 1383604854, 1383604849, 1383604844, 1383604841, 1383604840, 1383604819, 1383604816, 1383604813, 1383604784, 1383604779]} ##### 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.015166282653808594 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Sat Sep 13 04:14:58 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 (26821430) 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 : 26821430 get user id for portfolio 26821430 get sub ptf for main ptf 26821430, type 3726 and hashtags ['metal', 'papier', 'mal_croppe', 'environnement', 'cartonnette', 'Teint_Dans_La_Masse', 'plastique', 'autre_refus', 'flou', 'kraft', 'Carton_brun', 'Carton_gris'] 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`=26821430 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','mal_croppe','environnement','cartonnette','Teint_Dans_La_Masse','plastique','autre_refus','flou','kraft','Carton_brun','Carton_gris')) 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`=26821430 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','mal_croppe','environnement','cartonnette','Teint_Dans_La_Masse','plastique','autre_refus','flou','kraft','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 26821430, 'sub_port_id': 26821458, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083350, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'cartonnette': {'main_port_id': 26821430, 'sub_port_id': 26821459, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083351, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'environnement': {'main_port_id': 26821430, 'sub_port_id': 26821460, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083352, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'Carton_gris': {'main_port_id': 26821430, 'sub_port_id': 26821461, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083353, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'autre_refus': {'main_port_id': 26821430, 'sub_port_id': 26821462, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083354, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'mal_croppe': {'main_port_id': 26821430, 'sub_port_id': 26821463, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083355, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'Carton_brun': {'main_port_id': 26821430, 'sub_port_id': 26821464, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083356, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'metal': {'main_port_id': 26821430, 'sub_port_id': 26821465, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083357, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'papier': {'main_port_id': 26821430, 'sub_port_id': 26821466, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083358, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'plastique': {'main_port_id': 26821430, 'sub_port_id': 26821467, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083359, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'kraft': {'main_port_id': 26821430, 'sub_port_id': 26821468, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083360, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}, 'flou': {'main_port_id': 26821430, 'sub_port_id': 26821469, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083361, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821458 , 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=26821430 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 (26821458) result : ((1383604994,), (1383604995,), (1383605194,), (1383605280,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821459 , 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=26821430 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 (26821459) result : ((1383605024,), (1383605025,), (1383605026,), (1383605027,), (1383605028,), (1383605196,), (1383605197,), (1383605198,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821460 , 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=26821430 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 (26821460) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821461 , 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=26821430 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 (26821461) result : ((1383605188,), (1383605189,), (1383605281,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821462 , 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=26821430 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 (26821462) result : ((1383604999,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821463 , 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=26821430 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 (26821463) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821464 , 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=26821430 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 (26821464) result : ((1383604966,), (1383605031,), (1383605148,), (1383605199,), (1383605200,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821465 , 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=26821430 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 (26821465) result : ((1383604967,), (1383604968,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821466 , 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=26821430 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 (26821466) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821467 , 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=26821430 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 (26821467) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821468 , 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=26821430 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 (26821468) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 26821469 , 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=26821430 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 (26821469) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (26821430) result : ((1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) 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 (1383604900) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=26821430 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','mal_croppe','environnement','cartonnette','Teint_Dans_La_Masse','plastique','autre_refus','flou','kraft','Carton_brun','Carton_gris')) 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`=26821430 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','mal_croppe','environnement','cartonnette','Teint_Dans_La_Masse','plastique','autre_refus','flou','kraft','Carton_brun','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 26821430, 'sub_port_id': 26821471, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083362, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'cartonnette': {'main_port_id': 26821430, 'sub_port_id': 26821472, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083363, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'environnement': {'main_port_id': 26821430, 'sub_port_id': 26821473, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083364, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'Carton_gris': {'main_port_id': 26821430, 'sub_port_id': 26821474, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083365, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'autre_refus': {'main_port_id': 26821430, 'sub_port_id': 26821475, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083366, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'mal_croppe': {'main_port_id': 26821430, 'sub_port_id': 26821476, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083367, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'Carton_brun': {'main_port_id': 26821430, 'sub_port_id': 26821477, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083368, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'metal': {'main_port_id': 26821430, 'sub_port_id': 26821478, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083369, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'papier': {'main_port_id': 26821430, 'sub_port_id': 26821479, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083370, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'plastique': {'main_port_id': 26821430, 'sub_port_id': 26821480, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083371, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'kraft': {'main_port_id': 26821430, 'sub_port_id': 26821481, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083372, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 3, 33), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}, 'flou': {'main_port_id': 26821430, 'sub_port_id': 26821482, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18083373, 'last_updated_at': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_desc': datetime.datetime(2025, 9, 13, 4, 10, 58), 'last_updated_at_asc': datetime.datetime(2025, 9, 13, 4, 3, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821471,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821458 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821472,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821459 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821473,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821460 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821474,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821461 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821475,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821462 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821476,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821463 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821477,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821464 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821478,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821465 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821479,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821466 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821480,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821467 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821481,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821468 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 26821482,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 26821469 lien utilise dans velours : https://marlene.fotonower.com/velours/26821471,26821472,26821473,26821474,26821475,26821476,26821477,26821478,26821479,26821480,26821481,26821482?tags=Teint_Dans_La_Masse,cartonnette,environnement,Carton_gris,autre_refus,mal_croppe,Carton_brun,metal,papier,plastique,kraft,flou After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26821430]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1383605285] map_info['map_portfolio_photo'] : {26821430: [1383605285, 1383605083, 1383605081, 1383605079, 1383605044, 1383605040, 1383605037, 1383605018, 1383604997, 1383604986, 1383604981, 1383604977, 1383604974, 1383604972, 1383604950, 1383604946, 1383604939, 1383604914, 1383604909, 1383604905, 1383604900, 1383604880, 1383604876, 1383604872, 1383604868, 1383604867, 1383604858, 1383604854, 1383604849, 1383604844, 1383604841, 1383604840, 1383604819, 1383604816, 1383604813, 1383604784, 1383604779]} final : False mtd_id 4302 list_pids : [1383605285] Looping around the photos to save general results len do output : 1 /26821430. 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, '3716758') ('4302', '26821430', '1383605285', None, None, None, None, None, '3716758') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26821430', "{'Teint_Dans_La_Masse': 26821458, 'cartonnette': 26821459, 'environnement': 26821460, 'Carton_gris': 26821461, 'autre_refus': 26821462, 'mal_croppe': 26821463, 'Carton_brun': 26821464, 'metal': 26821465, 'papier': 26821466, 'plastique': 26821467, 'kraft': 26821468, 'flou': 26821469}", None, None, None, None, '3716758'), ('4302', '26821430', '1383605285', None, None, None, None, None, '3716758')] time used for this insertion : 0.012985706329345703 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.450329065322876 time spend to save output : 0.013190746307373047 total time spend for step 1 : 0.463519811630249 step2:final Sat Sep 13 04:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26821430) 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 26821430 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1383604784,1383604779,1383604819,1383604868,1383604816,1383604867,1383604813,1383604858,1383604854,1383604849,1383604844,1383604841,1383604840,1383604880,1383604876,1383604872,1383604914,1383604909,1383604900,1383604905,1383605018,1383604950,1383604946,1383604997,1383604986,1383604939,1383604981,1383604977,1383604974,1383604972,1383605044,1383605040,1383605037,1383605083,1383605081,1383605079,1383605285); 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([26821430]) Inside saveOutput : final : False verbose : True original output for save of step final : {1383605285: ('0.05393677727982674',)} new output for save of step final : {1383605285: ('0.05393677727982674',)} [1383605285] map_info['map_portfolio_photo'] : {26821430: [1383605285, 1383605083, 1383605081, 1383605079, 1383605044, 1383605040, 1383605037, 1383605018, 1383604997, 1383604986, 1383604981, 1383604977, 1383604974, 1383604972, 1383604950, 1383604946, 1383604939, 1383604914, 1383604909, 1383604905, 1383604900, 1383604880, 1383604876, 1383604872, 1383604868, 1383604867, 1383604858, 1383604854, 1383604849, 1383604844, 1383604841, 1383604840, 1383604819, 1383604816, 1383604813, 1383604784, 1383604779]} final : False mtd_id 4302 list_pids : [1383605285] Looping around the photos to save general results len do output : 1 /1383605285.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, '3716758') ('4302', '26821430', '1383605285', None, None, None, None, None, '3716758') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26821430', '1383605285', '0.05393677727982674', None, None, None, None, '3716758')] time used for this insertion : 0.011878252029418945 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.1238560676574707 time spend to save output : 0.012090921401977539 total time spend for step 2 : 0.13594698905944824 step3:velours_tree Sat Sep 13 04:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {26821430: [{'Teint_Dans_La_Masse': 26821458, 'cartonnette': 26821459, 'environnement': 26821460, 'Carton_gris': 26821461, 'autre_refus': 26821462, 'mal_croppe': 26821463, 'Carton_brun': 26821464, 'metal': 26821465, 'papier': 26821466, 'plastique': 26821467, 'kraft': 26821468, 'flou': 26821469}]} input_args_next_step : {26821430: ()} output_args : {26821430: [{'Teint_Dans_La_Masse': 26821458, 'cartonnette': 26821459, 'environnement': 26821460, 'Carton_gris': 26821461, 'autre_refus': 26821462, 'mal_croppe': 26821463, 'Carton_brun': 26821464, 'metal': 26821465, 'papier': 26821466, 'plastique': 26821467, 'kraft': 26821468, 'flou': 26821469}]} args : 26821430 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 : ({'Teint_Dans_La_Masse': 26821458, 'cartonnette': 26821459, 'environnement': 26821460, 'Carton_gris': 26821461, 'autre_refus': 26821462, 'mal_croppe': 26821463, 'Carton_brun': 26821464, 'metal': 26821465, 'papier': 26821466, 'plastique': 26821467, 'kraft': 26821468, 'flou': 26821469},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26821430) 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([26821430]) 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.2665245532989502 time spend to save output : 4.9114227294921875e-05 total time spend for step 3 : 0.2665736675262451 step4:send_mail_cod Sat Sep 13 04:14:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1383605285: ('0.05393677727982674',)} input_args_next_step : {1383605285: ()} output_args : {1383605285: ('0.05393677727982674',)} args : 1383605285 depend.output_id : 0 complete output_args for input 3 : {26821430: [{'Teint_Dans_La_Masse': 26821458, 'cartonnette': 26821459, 'environnement': 26821460, 'Carton_gris': 26821461, 'autre_refus': 26821462, 'mal_croppe': 26821463, 'Carton_brun': 26821464, 'metal': 26821465, 'papier': 26821466, 'plastique': 26821467, 'kraft': 26821468, 'flou': 26821469}]} input_args_next_step : {1383605285: ('0.05393677727982674',), 26821430: ()} output_args : {26821430: [{'Teint_Dans_La_Masse': 26821458, 'cartonnette': 26821459, 'environnement': 26821460, 'Carton_gris': 26821461, 'autre_refus': 26821462, 'mal_croppe': 26821463, 'Carton_brun': 26821464, 'metal': 26821465, 'papier': 26821466, 'plastique': 26821467, 'kraft': 26821468, 'flou': 26821469}]} args : 26821430 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :2, first value : ('0.05393677727982674',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26821430) 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 (1383605285) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1383605285 download finish for photo 1383605285 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P26821430_13-09-2025_04_14_59.pdf 26821459 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=26821459 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383605024: '1757729246_41862_1383604867_e95bfc361997e51fbc7215017d044d47_rle_crop_3957931297_0.png', 1383605025: '1757729246_41862_1383604858_fcfc559c3c361d82181120dc77f75134_rle_crop_3957931302_0.png', 1383605026: '1757729246_41862_1383604854_46a1d5686fff77cc82a2f1cbefce57b5_rle_crop_3957931314_0.png', 1383605027: '1757729246_41862_1383604816_997e0ece1b8fd355a84c37f9999a9e38_rle_crop_3957931328_0.png', 1383605028: '1757729246_41862_1383604813_79b571bcb5e35a2576529a154542ff0b_rle_crop_3957931333_0.png', 1383605196: '1757729486_55716_1383604977_0b1890d98e58a194d21c1424ed995d47_rle_crop_3957932126_0.png', 1383605197: '1757729486_55716_1383604974_92fcacef1865eb059c791a89a8328cbe_rle_crop_3957932137_0.png', 1383605198: '1757729486_55716_1383604972_9e7df751b2c11489bbb2aa866caf294b_rle_crop_3957932150_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/438c725cac0f8fdbeef6799fb88fea10_67499566.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/e32365f6047baa58f1eb3cdee4e9968d_38737459.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/6c0c1834a2829c3588efeefb19ec8093_33089452.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/438c725cac0f8fdbeef6799fb88fea10_27474648.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/e32365f6047baa58f1eb3cdee4e9968d_93315211.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/3591d9c8be3e271a0d22ce7ab27aa988_8926779.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/0919d7e46ebbc14f327e2b70583780db_68152979.png change filename to text .imagette268214591757729699/ imagette268214591757729699/1757729246_41862_1383604867_e95bfc361997e51fbc7215017d044d47_rle_crop_3957931297_0.png.png imagette268214591757729699/1757729486_55716_1383604977_0b1890d98e58a194d21c1424ed995d47_rle_crop_3957932126_0.png.png imagette268214591757729699/1757729246_41862_1383604858_fcfc559c3c361d82181120dc77f75134_rle_crop_3957931302_0.png.png imagette268214591757729699/1757729246_41862_1383604813_79b571bcb5e35a2576529a154542ff0b_rle_crop_3957931333_0.png.png imagette268214591757729699/1757729246_41862_1383604854_46a1d5686fff77cc82a2f1cbefce57b5_rle_crop_3957931314_0.png.png imagette268214591757729699/1757729486_55716_1383604974_92fcacef1865eb059c791a89a8328cbe_rle_crop_3957932137_0.png.png imagette268214591757729699/1757729246_41862_1383604816_997e0ece1b8fd355a84c37f9999a9e38_rle_crop_3957931328_0.png.png imagette268214591757729699/1757729486_55716_1383604972_9e7df751b2c11489bbb2aa866caf294b_rle_crop_3957932150_0.png.png wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/8fa98b48dd3cc6c26c0bc72fde22d894_60576994.png imagette268214591757729699 26821462 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=26821462 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383604999: '1757729227_40113_1383604876_fc0ebac1f0eaa6d5159dcea324b6fd95_rle_crop_3957931176_0.png'} change filename to text .imagette268214621757729700/ imagette268214621757729700/1757729227_40113_1383604876_fc0ebac1f0eaa6d5159dcea324b6fd95_rle_crop_3957931176_0.png.png imagette268214631757729700/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/771bd77eac9af679ea264e5675bd4748_729537.png imagette268214621757729700 26821463 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=26821463 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268214631757729700 26821465 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=26821465 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383604967: '1757729187_36819_1383604849_5ff12068e3b8188b0614a1004b1e7eba_rle_crop_3957931055_0.png', 1383604968: '1757729187_36819_1383604841_e4e1110ce1fc8611c9f1f83a56dc29fc_rle_crop_3957931066_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/bb38cc0e21cea0595723b46db4903d9a_3382696.png change filename to text .imagette268214651757729700/ imagette268214651757729700/1757729187_36819_1383604841_e4e1110ce1fc8611c9f1f83a56dc29fc_rle_crop_3957931066_0.png.png imagette268214651757729700/1757729187_36819_1383604849_5ff12068e3b8188b0614a1004b1e7eba_rle_crop_3957931055_0.png.png imagette268214671757729700/ imagette268214681757729700/ imagette268214691757729700/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/832430f67af4a391f49bd3581fd075a1_92571955.png imagette268214651757729700 26821467 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=26821467 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268214671757729700 26821468 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=26821468 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268214681757729700 26821469 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=26821469 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette268214691757729700 26821458 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=26821458 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383604994: '1757729227_40113_1383604876_fc0ebac1f0eaa6d5159dcea324b6fd95_rle_crop_3957931177_0.png', 1383604995: '1757729227_40113_1383604876_fc0ebac1f0eaa6d5159dcea324b6fd95_rle_crop_3957931182_0.png', 1383605194: '1757729486_55716_1383604972_9e7df751b2c11489bbb2aa866caf294b_rle_crop_3957932149_0.png', 1383605280: '1757729607_61819_1383604914_97ab0bb35d92b37335736994685ec344_rle_crop_3957932325_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/76fcd4f7b519118e284dac46c72d8774_5870850.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/7387162463329e1bbbeefec37661569d_32220000.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/7a1af6a41c1453ac7d0a1028d9479af5_4548008.png change filename to text .imagette268214581757729700/ imagette268214581757729700/1757729607_61819_1383604914_97ab0bb35d92b37335736994685ec344_rle_crop_3957932325_0.png.png imagette268214581757729700/1757729227_40113_1383604876_fc0ebac1f0eaa6d5159dcea324b6fd95_rle_crop_3957931182_0.png.png imagette268214581757729700/1757729227_40113_1383604876_fc0ebac1f0eaa6d5159dcea324b6fd95_rle_crop_3957931177_0.png.png imagette268214581757729700/1757729486_55716_1383604972_9e7df751b2c11489bbb2aa866caf294b_rle_crop_3957932149_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/c9236043a6e0331aa65a47b5a61f7974_46637623.png imagette268214581757729700 26821461 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=26821461 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383605188: '1757729466_53359_1383604986_c682275b7ad16074ecfd10b8a8431209_rle_crop_3957931959_0.png', 1383605189: '1757729466_53359_1383604939_004dead9fe8478d11c981717aed877c4_rle_crop_3957932100_0.png', 1383605281: '1757729607_61819_1383604914_97ab0bb35d92b37335736994685ec344_rle_crop_3957932324_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/5b6908b0988bca7ee176522fe25be697_92186639.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/5b6908b0988bca7ee176522fe25be697_54395523.png change filename to text .imagette268214611757729700/ imagette268214611757729700/1757729466_53359_1383604939_004dead9fe8478d11c981717aed877c4_rle_crop_3957932100_0.png.png imagette268214611757729700/1757729607_61819_1383604914_97ab0bb35d92b37335736994685ec344_rle_crop_3957932324_0.png.png imagette268214611757729700/1757729466_53359_1383604986_c682275b7ad16074ecfd10b8a8431209_rle_crop_3957931959_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/0c580622df3b66391cc3e5a62676c965_44866087.png imagette268214611757729700 26821464 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=26821464 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1383604966: '1757729187_36819_1383604844_45aeaa373df47c2e3d284e8fb913ad12_rle_crop_3957931060_0.png', 1383605031: '1757729246_41862_1383604854_46a1d5686fff77cc82a2f1cbefce57b5_rle_crop_3957931317_0.png', 1383605148: '1757729425_52569_1383605040_2a98c509d9b6617c86f6f98f7ae4bd41_rle_crop_3957931623_0.png', 1383605199: '1757729486_55716_1383605044_2ba459514a103121924972673ea5f7ed_rle_crop_3957932111_0.png', 1383605200: '1757729486_55716_1383604972_9e7df751b2c11489bbb2aa866caf294b_rle_crop_3957932152_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/a3e40201253c2bca1a61c4a322c46ea3_75299058.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/c0a80f0c832120a5c0f461ed6ec01fb8_49302310.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/5c08d8a3ea98ef8b0da005dd9ec0709f_54471689.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/d49c9d167c44a55b3b61a90521e5737f_69325148.png change filename to text .imagette268214641757729700/ imagette268214641757729700/1757729425_52569_1383605040_2a98c509d9b6617c86f6f98f7ae4bd41_rle_crop_3957931623_0.png.png imagette268214641757729700/1757729246_41862_1383604854_46a1d5686fff77cc82a2f1cbefce57b5_rle_crop_3957931317_0.png.png imagette268214641757729700/1757729486_55716_1383604972_9e7df751b2c11489bbb2aa866caf294b_rle_crop_3957932152_0.png.png imagette268214641757729700/1757729187_36819_1383604844_45aeaa373df47c2e3d284e8fb913ad12_rle_crop_3957931060_0.png.png imagette268214641757729700/1757729486_55716_1383605044_2ba459514a103121924972673ea5f7ed_rle_crop_3957932111_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/e9c13d1b733b83bcf5b8580d56c1a9b7_19248640.png imagette268214641757729700 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=26821430 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/26821471,26821472,26821473,26821474,26821475,26821476,26821477,26821478,26821479,26821480,26821481,26821482?tags=Teint_Dans_La_Masse,cartonnette,environnement,Carton_gris,autre_refus,mal_croppe,Carton_brun,metal,papier,plastique,kraft,flou your option no_mail is active, we will not send the real mail to your client args[1383605285] : ('0.05393677727982674',) no score found for photo 1383605285 We are sending mail with results at report@fotonower.com refus_total : 0.05393677727982674 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=26821430 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_P26821430_13-09-2025_04_14_59.pdf results_Auto_P26821430_13-09-2025_04_14_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26821430_13-09-2025_04_14_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','26821430','results_Auto_P26821430_13-09-2025_04_14_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26821430_13-09-2025_04_14_59.pdf','pdf','','0.08','0.05393677727982674') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26821430]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1383605285] map_info['map_portfolio_photo'] : {26821430: [1383605285, 1383605083, 1383605081, 1383605079, 1383605044, 1383605040, 1383605037, 1383605018, 1383604997, 1383604986, 1383604981, 1383604977, 1383604974, 1383604972, 1383604950, 1383604946, 1383604939, 1383604914, 1383604909, 1383604905, 1383604900, 1383604880, 1383604876, 1383604872, 1383604868, 1383604867, 1383604858, 1383604854, 1383604849, 1383604844, 1383604841, 1383604840, 1383604819, 1383604816, 1383604813, 1383604784, 1383604779]} final : False mtd_id 4302 list_pids : [1383605285] 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, '3716758') ('4302', '26821430', '1383605285', None, None, None, None, None, '3716758') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '26821430', '1383605285', None, None, None, None, None, '3716758')] time used for this insertion : 0.015797853469848633 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.4579834938049316 time spend to save output : 0.01594090461730957 total time spend for step 4 : 2.473924398422241 step5:split_time_score Sat Sep 13 04:15:02 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['26821430'] 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 : [('26821430',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (26821430) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1383605285: {'path': 'temp/1757729699_748663_1383605285_18a1a4727b2143bfb34906c0664ed0d5.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 = 26821430; (('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 = 26821430 group by h (('04', 37),) 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=26821430 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 (26821430) 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 (26821430) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 13092025 26821430 Nombre de photos uploadées : 37 / 23040 (0%) 13092025 26821430 Nombre de photos taguées (types de déchets): 0 / 37 (0%) 13092025 26821430 Nombre de photos taguées (volume) : 0 / 37 (0%) [{'photo_id': 1383604784, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/49d08fc15996dba751e8a94f68cacdf6.jpg', 'username': None, 'uploaded_at': 1757728868, 'text': 'image_13092025_04_00_04_010141m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1383604779, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/cefff6be10990aa180d4987cf5722c18.jpg', 'username': None, 'uploaded_at': 1757728868, 'text': 'image_13092025_04_00_14_010134m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1383604819, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/6908f7d123178990d2bb40041cd4e969.jpg', 'username': None, 'uploaded_at': 1757728928, 'text': 'image_13092025_04_00_44_010135m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1383604868, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/9/13/9476b4f36ec5238f1e7fdaf7e098d8bd.jpg', 'username': None, 'uploaded_at': 1757729027, 'text': 'image_13092025_04_00_44_010135m0.jpg 4e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 4.5299530029296875e-06 ????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003841876983642578 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 26821430, '2025-09-13' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-09-13' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2280961,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21616029739379883 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= 2280961 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26815062, 'dashboard_result_id': 15122800, '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_P26815062_13-09-2025_00_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815100, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815103, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815109, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815111, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26815697, 'dashboard_result_id': 15122801, '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_P26815697_13-09-2025_00_37_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815705, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815706, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815711, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815715, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26816243, 'dashboard_result_id': 15122802, '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_P26816243_13-09-2025_00_48_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816289, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816292, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816293, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816296, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816297, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816300, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26816834, 'dashboard_result_id': 15122803, '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_P26816834_13-09-2025_01_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816847, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816848, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816852, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816854, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816855, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816856, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26817728, 'dashboard_result_id': 15122804, '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_P26817728_13-09-2025_01_48_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26817732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817735, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817740, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817742, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26818070, 'dashboard_result_id': 15122805, '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_P26818070_13-09-2025_02_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818079, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818080, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818085, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818087, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26818468, 'dashboard_result_id': 15122806, '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_P26818468_13-09-2025_02_18_32.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818473, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818479, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818482, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26818596, 'dashboard_result_id': 15122807, '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_P26818596_13-09-2025_02_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818600, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818602, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818603, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818604, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818605, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818606, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818607, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818608, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818609, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818610, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26818977, 'dashboard_result_id': 15122808, '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_P26818977_13-09-2025_02_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818983, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818984, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818985, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818986, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818988, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818990, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818991, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818992, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818993, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818994, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26819383, 'dashboard_result_id': 15122809, '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_P26819383_13-09-2025_03_02_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26819389, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26819390, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26819391, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26819392, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26819393, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26819394, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26819395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26819396, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26819397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26819398, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26819399, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26819400, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26819752, 'dashboard_result_id': 15122810, '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_P26819752_13-09-2025_03_18_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26819767, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26819769, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26819770, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26819771, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26819772, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26819773, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26819774, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26819775, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26819776, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26819777, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26819778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26819779, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26820248, 'dashboard_result_id': 15122811, '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_P26820248_13-09-2025_03_34_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26820260, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26820261, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26820262, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26820263, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26820264, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26820265, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26820266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26820267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26820268, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26820269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26820270, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26820271, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26820736, 'dashboard_result_id': 15122812, '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_P26820736_13-09-2025_03_49_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26820742, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26820743, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26820744, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26820745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26820746, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26820747, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26820748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26820749, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26820750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26820751, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26820752, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26820753, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26821097, 'dashboard_result_id': 15122813, '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_P26821097_13-09-2025_04_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26821106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26821107, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26821108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26821109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26821110, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26821111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26821112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26821113, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26821114, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26821115, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26821116, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26821117, 'pht': 3726}}"}, {'dashboat_entry_day': 2280961, 'dashboard_run_id': 2289297, 'mtr_portfolio_id': 26821430, 'dashboard_result_id': 15122814, '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_P26821430_13-09-2025_04_10_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26821458, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26821459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26821460, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26821461, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26821462, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26821463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26821464, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26821465, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26821466, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26821467, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26821468, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26821469, '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 = 26815062 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': 3715693, 'mtr_portfolio_id': 26815062, 'created_at': datetime.datetime(2025, 9, 13, 0, 18, 58), 'result': '0.0474983149780897', 'result_long': None, 'result_double': None}] Qualite : 0.0474983149780897 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26815062 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815062_13-09-2025_00_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26815062 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_P26815062_13-09-2025_00_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815100, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815103, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815109, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815111, 'pht': 3726}}" where mtr_portfolio_id = 26815062 and dashboard_run_id = 2289297 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`=26815062 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122800, 0.0474983149780897, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815062_13-09-2025_00_18_58.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815100, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815101, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815102, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815103, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815106, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815107, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815109, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815110, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815111, '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 = 26815697 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': 3715751, 'mtr_portfolio_id': 26815697, 'created_at': datetime.datetime(2025, 9, 13, 0, 37, 29), 'result': '0.059643097243093766', 'result_long': None, 'result_double': None}] Qualite : 0.059643097243093766 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26815697 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815697_13-09-2025_00_37_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26815697 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_P26815697_13-09-2025_00_37_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815705, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815706, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815711, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815715, 'pht': 3726}}" where mtr_portfolio_id = 26815697 and dashboard_run_id = 2289297 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`=26815697 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122801, 0.059643097243093766, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26815697_13-09-2025_00_37_29.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26815704, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26815705, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26815706, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26815707, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26815708, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26815709, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26815710, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26815711, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26815712, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26815713, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26815714, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26815715, '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 = 26816243 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': 3715826, 'mtr_portfolio_id': 26816243, 'created_at': datetime.datetime(2025, 9, 13, 0, 48, 29), 'result': '0.05248491001381296', 'result_long': None, 'result_double': None}] Qualite : 0.05248491001381296 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26816243 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816243_13-09-2025_00_48_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26816243 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_P26816243_13-09-2025_00_48_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816289, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816292, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816293, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816296, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816297, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816300, 'pht': 3726}}" where mtr_portfolio_id = 26816243 and dashboard_run_id = 2289297 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`=26816243 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122802, 0.05248491001381296, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816243_13-09-2025_00_48_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816289, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816290, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816291, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816292, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816293, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816295, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816296, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816297, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816299, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816300, '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 = 26816834 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': 3715914, 'mtr_portfolio_id': 26816834, 'created_at': datetime.datetime(2025, 9, 13, 1, 34, 58), 'result': '0.03442522857592694', 'result_long': None, 'result_double': None}] Qualite : 0.03442522857592694 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26816834 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816834_13-09-2025_01_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26816834 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_P26816834_13-09-2025_01_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816847, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816848, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816852, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816854, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816855, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816856, 'pht': 3726}}" where mtr_portfolio_id = 26816834 and dashboard_run_id = 2289297 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`=26816834 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122803, 0.03442522857592694, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26816834_13-09-2025_01_34_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26816845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26816846, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26816847, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26816848, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26816849, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26816850, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26816851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26816852, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26816853, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26816854, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26816855, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26816856, '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 = 26817728 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': 3716095, 'mtr_portfolio_id': 26817728, 'created_at': datetime.datetime(2025, 9, 13, 1, 48, 56), 'result': '0.05199660081697772', 'result_long': None, 'result_double': None}] Qualite : 0.05199660081697772 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26817728 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26817728_13-09-2025_01_48_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26817728 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_P26817728_13-09-2025_01_48_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26817732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817735, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817740, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817742, 'pht': 3726}}" where mtr_portfolio_id = 26817728 and dashboard_run_id = 2289297 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`=26817728 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122804, 0.05199660081697772, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26817728_13-09-2025_01_48_57.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26817731, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26817732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26817733, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26817734, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26817735, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26817736, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26817737, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26817738, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26817739, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26817740, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26817741, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26817742, '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 = 26818070 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': 3716131, 'mtr_portfolio_id': 26818070, 'created_at': datetime.datetime(2025, 9, 13, 2, 11, 1), 'result': '0.03376596674172699', 'result_long': None, 'result_double': None}] Qualite : 0.03376596674172699 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26818070 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818070_13-09-2025_02_11_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26818070 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_P26818070_13-09-2025_02_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818079, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818080, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818085, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818087, 'pht': 3726}}" where mtr_portfolio_id = 26818070 and dashboard_run_id = 2289297 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`=26818070 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122805, 0.03376596674172699, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818070_13-09-2025_02_11_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818076, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818078, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818079, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818080, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818081, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818082, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818083, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818084, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818085, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818086, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818087, '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 = 26818468 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': 3716197, 'mtr_portfolio_id': 26818468, 'created_at': datetime.datetime(2025, 9, 13, 2, 18, 32), 'result': '0.052508868215203564', 'result_long': None, 'result_double': None}] Qualite : 0.052508868215203564 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26818468 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818468_13-09-2025_02_18_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26818468 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_P26818468_13-09-2025_02_18_32.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818473, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818479, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818482, 'pht': 3726}}" where mtr_portfolio_id = 26818468 and dashboard_run_id = 2289297 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`=26818468 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122806, 0.052508868215203564, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818468_13-09-2025_02_18_32.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818471, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818472, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818473, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818474, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818475, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818476, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818477, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818478, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818479, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818480, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818481, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818482, '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 = 26818596 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': 3716208, 'mtr_portfolio_id': 26818596, 'created_at': datetime.datetime(2025, 9, 13, 2, 33), 'result': '0.028334228718550618', 'result_long': None, 'result_double': None}] Qualite : 0.028334228718550618 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26818596 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818596_13-09-2025_02_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26818596 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_P26818596_13-09-2025_02_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818600, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818602, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818603, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818604, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818605, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818606, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818607, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818608, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818609, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818610, 'pht': 3726}}" where mtr_portfolio_id = 26818596 and dashboard_run_id = 2289297 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`=26818596 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122807, 0.028334228718550618, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818596_13-09-2025_02_33_01.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818600, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818601, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818602, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818603, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818604, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818605, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818606, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26818607, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818608, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818609, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818610, '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 = 26818977 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': 3716262, 'mtr_portfolio_id': 26818977, 'created_at': datetime.datetime(2025, 9, 13, 2, 48, 59), 'result': '0.025541722276294653', 'result_long': None, 'result_double': None}] Qualite : 0.025541722276294653 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26818977 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818977_13-09-2025_02_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26818977 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_P26818977_13-09-2025_02_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818983, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818984, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818985, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818986, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818988, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818990, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818991, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818992, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818993, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818994, 'pht': 3726}}" where mtr_portfolio_id = 26818977 and dashboard_run_id = 2289297 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`=26818977 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122808, 0.025541722276294653, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26818977_13-09-2025_02_48_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26818983, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26818984, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26818985, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26818986, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26818987, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26818988, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26818989, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26818990, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26818991, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26818992, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26818993, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26818994, '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 = 26819383 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': 3716323, 'mtr_portfolio_id': 26819383, 'created_at': datetime.datetime(2025, 9, 13, 3, 2, 57), 'result': '0.025197836256206453', 'result_long': None, 'result_double': None}] Qualite : 0.025197836256206453 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26819383 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26819383_13-09-2025_03_02_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26819383 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_P26819383_13-09-2025_03_02_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26819389, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26819390, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26819391, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26819392, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26819393, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26819394, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26819395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26819396, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26819397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26819398, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26819399, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26819400, 'pht': 3726}}" where mtr_portfolio_id = 26819383 and dashboard_run_id = 2289297 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`=26819383 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122809, 0.025197836256206453, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26819383_13-09-2025_03_02_57.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26819389, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26819390, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26819391, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26819392, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26819393, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26819394, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26819395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26819396, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26819397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26819398, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26819399, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26819400, '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 = 26819752 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': 3716411, 'mtr_portfolio_id': 26819752, 'created_at': datetime.datetime(2025, 9, 13, 3, 18, 58), 'result': '0.03987081257666597', 'result_long': None, 'result_double': None}] Qualite : 0.03987081257666597 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26819752 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26819752_13-09-2025_03_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26819752 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_P26819752_13-09-2025_03_18_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26819767, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26819769, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26819770, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26819771, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26819772, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26819773, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26819774, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26819775, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26819776, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26819777, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26819778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26819779, 'pht': 3726}}" where mtr_portfolio_id = 26819752 and dashboard_run_id = 2289297 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`=26819752 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122810, 0.03987081257666597, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26819752_13-09-2025_03_18_58.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 26819767, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26819769, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26819770, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26819771, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26819772, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26819773, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26819774, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26819775, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26819776, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26819777, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26819778, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26819779, '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 = 26820248 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': 3716499, 'mtr_portfolio_id': 26820248, 'created_at': datetime.datetime(2025, 9, 13, 3, 34, 29), 'result': '0.04030242214201249', 'result_long': None, 'result_double': None}] Qualite : 0.04030242214201249 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26820248 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26820248_13-09-2025_03_34_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26820248 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_P26820248_13-09-2025_03_34_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26820260, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26820261, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26820262, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26820263, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26820264, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26820265, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26820266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26820267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26820268, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26820269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26820270, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26820271, 'pht': 3726}}" where mtr_portfolio_id = 26820248 and dashboard_run_id = 2289301 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`=26820248 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122811, 0.04030242214201249, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26820248_13-09-2025_03_34_30.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 26820260, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26820261, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26820262, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26820263, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26820264, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26820265, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26820266, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26820267, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26820268, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26820269, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26820270, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26820271, '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 = 26820736 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': 3716597, 'mtr_portfolio_id': 26820736, 'created_at': datetime.datetime(2025, 9, 13, 3, 49), 'result': '0.06618158285540313', 'result_long': None, 'result_double': None}] Qualite : 0.06618158285540313 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26820736 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26820736_13-09-2025_03_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26820736 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_P26820736_13-09-2025_03_49_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26820742, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26820743, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26820744, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26820745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26820746, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26820747, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26820748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26820749, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26820750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26820751, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26820752, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26820753, 'pht': 3726}}" where mtr_portfolio_id = 26820736 and dashboard_run_id = 2289301 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`=26820736 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122812, 0.06618158285540313, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26820736_13-09-2025_03_49_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 26820742, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26820743, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26820744, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26820745, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26820746, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26820747, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26820748, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26820749, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26820750, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26820751, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26820752, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26820753, '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 = 26821097 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': 3716661, 'mtr_portfolio_id': 26821097, 'created_at': datetime.datetime(2025, 9, 13, 4, 3), 'result': '0.05112262526407042', 'result_long': None, 'result_double': None}] Qualite : 0.05112262526407042 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26821097 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26821097_13-09-2025_04_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26821097 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_P26821097_13-09-2025_04_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26821106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26821107, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26821108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26821109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26821110, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26821111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26821112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26821113, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26821114, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26821115, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26821116, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26821117, 'pht': 3726}}" where mtr_portfolio_id = 26821097 and dashboard_run_id = 2289301 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`=26821097 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122813, 0.05112262526407042, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26821097_13-09-2025_04_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26821106, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26821107, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26821108, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26821109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26821110, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26821111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26821112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26821113, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26821114, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26821115, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26821116, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26821117, '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 = 26821430 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': 3716758, 'mtr_portfolio_id': 26821430, 'created_at': datetime.datetime(2025, 9, 13, 4, 14, 59), 'result': '0.05393677727982674', 'result_long': None, 'result_double': None}] Qualite : 0.05393677727982674 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 26821430 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26821430_13-09-2025_04_14_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 26821430 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_P26821430_13-09-2025_04_14_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26821458, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26821459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26821460, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26821461, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26821462, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26821463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26821464, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26821465, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26821466, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26821467, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26821468, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26821469, 'pht': 3726}}" where mtr_portfolio_id = 26821430 and dashboard_run_id = 2289301 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`=26821430 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15122814, 0.05393677727982674, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P26821430_13-09-2025_04_14_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 26821458, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 26821459, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 26821460, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 26821461, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 26821462, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 26821463, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 26821464, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 26821465, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 26821466, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 26821467, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 26821468, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 26821469, '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 (26815062,26815697,26816243,26816834,26817728,26818070,26818468,26818596,26818977,26819383,26819752,26820248,26820736,26821097,26821430) result : ((1383587771,), (1383587822,), (1383587863,), (1383587889,), (1383588188,), (1383588190,), (1383588192,), (1383588306,), (1383588310,), (1383588315,), (1383588319,), (1383588331,), (1383588334,), (1383588342,), (1383588343,), (1383588344,), (1383588355,), (1383588370,), (1383588399,), (1383588401,), (1383588402,), (1383588403,), (1383588408,), (1383588440,), (1383588442,), (1383588445,), (1383588448,), (1383588474,), (1383588476,), (1383588482,), (1383588495,), (1383588504,), (1383588508,), (1383588534,), (1383588624,), (1383588625,), (1383588626,), (1383588649,), (1383588651,), (1383588652,), (1383588654,), (1383588658,), (1383588662,), (1383588677,), (1383588679,), (1383588681,), (1383588685,), (1383588697,), (1383588984,), (1383589009,), (1383589034,), (1383589408,), (1383589436,), (1383589468,), (1383589492,), (1383589515,), (1383589818,), (1383589840,), (1383589867,), (1383589895,), (1383589923,), (1383589952,), (1383590051,), (1383590078,), (1383590095,), (1383590099,), (1383590101,), (1383590104,), (1383590108,), (1383590146,), (1383590177,), (1383590201,), (1383590505,), (1383590631,), (1383590460,), (1383590484,), (1383590500,), (1383590502,), (1383590601,), (1383590602,), (1383590604,), (1383590607,), (1383590611,), (1383590615,), (1383590623,), (1383590627,), (1383590630,), (1383590644,), (1383590646,), (1383590649,), (1383590653,), (1383590665,), (1383590666,), (1383590667,), (1383590669,), (1383590672,), (1383590939,), (1383590969,), (1383590998,), (1383591026,), (1383591350,), (1383591378,), (1383591403,), (1383591428,), (1383591738,), (1383591763,), (1383591787,), (1383591816,), (1383592143,), (1383592144,), (1383592147,), (1383592150,), (1383592154,), (1383592157,), (1383592173,), (1383592175,), (1383592181,), (1383592183,), (1383592185,), (1383592188,), (1383592463,), (1383592486,), (1383592529,), (1383592543,), (1383592546,), (1383592730,), (1383592755,), (1383592779,), (1383592808,), (1383592838,), (1383593135,), (1383593166,), (1383593193,), (1383593223,), (1383593315,), (1383593444,), (1383593539,), (1383593580,), (1383593624,), (1383593628,), (1383593633,), (1383593637,), (1383593774,), (1383593786,), (1383593789,), (1383593816,), (1383593826,), (1383593855,), (1383593856,), (1383593858,), (1383593860,), (1383593863,), (1383593901,), (1383593905,), (1383593930,), (1383593933,), (1383593949,), (1383593958,), (1383593994,), (1383593995,), (1383594031,), (1383594057,), (1383593889,), (1383593891,), (1383593893,), (1383593897,), (1383593989,), (1383593990,), (1383593991,), (1383593992,), (1383594008,), (1383594024,), (1383594027,), (1383594029,), (1383594030,), (1383594042,), (1383594044,), (1383594047,), (1383594051,), (1383594054,), (1383594073,), (1383594074,), (1383594075,), (1383594077,), (1383594362,), (1383594391,), (1383594416,), (1383594441,), (1383594469,), (1383594763,), (1383594787,), (1383594815,), (1383594842,), (1383594873,), (1383594901,), (1383595009,), (1383595035,), (1383595064,), (1383595066,), (1383595146,), (1383595180,), (1383595227,), (1383595282,), (1383595683,), (1383595710,), (1383595734,), (1383595763,), (1383595791,), (1383595822,), (1383596075,), (1383596100,), (1383596125,), (1383596140,), (1383596392,), (1383596424,), (1383596447,), (1383596490,), (1383596835,), (1383596865,), (1383596892,), (1383596919,), (1383597180,), (1383597203,), (1383597231,), (1383597258,), (1383597284,), (1383597303,), (1383597346,), (1383597362,), (1383597367,), (1383597377,), (1383597380,), (1383597382,), (1383597386,), (1383597392,), (1383597394,), (1383597409,), (1383597410,), (1383597411,), (1383597414,), (1383597417,), (1383597421,), (1383597447,), (1383597494,), (1383597443,), (1383597445,), (1383597465,), (1383597466,), (1383597469,), (1383597472,), (1383597475,), (1383597478,), (1383597498,), (1383597499,), (1383597500,), (1383597502,), (1383597506,), (1383597510,), (1383597525,), (1383597527,), (1383597528,), (1383597529,), (1383597559,), (1383597564,), (1383597565,), (1383597597,), (1383597599,), (1383597600,), (1383597603,), (1383597608,), (1383597612,), (1383597640,), (1383597646,), (1383597666,), (1383597667,), (1383597668,), (1383597670,), (1383597673,), (1383597676,), (1383597698,), (1383597707,), (1383597795,), (1383597798,), (1383597801,), (1383597805,), (1383597809,), (1383597823,), (1383597824,), (1383597825,), (1383597848,), (1383597851,), (1383597855,), (1383597859,), (1383597868,), (1383597873,), (1383597881,), (1383597888,), (1383599233,), (1383599263,), (1383599230,), (1383599232,), (1383599250,), (1383599251,), (1383599252,), (1383599255,), (1383599258,), (1383599274,), (1383599300,), (1383599301,), (1383599302,), (1383599341,), (1383599343,), (1383599344,), (1383599356,), (1383599357,), (1383599358,), (1383599365,), (1383599375,), (1383599381,), (1383599412,), (1383599415,), (1383599416,), (1383599439,), (1383599441,), (1383599442,), (1383599443,), (1383599474,), (1383599476,), (1383599478,), (1383599510,), (1383599511,), (1383599512,), (1383599513,), (1383599542,), (1383599548,), (1383599549,), (1383599577,), (1383599578,), (1383599579,), (1383599585,), (1383599589,), (1383599592,), (1383599611,), (1383599639,), (1383599643,), (1383599645,), (1383599647,), (1383599649,), (1383599653,), (1383599671,), (1383599673,), (1383599675,), (1383599676,), (1383599680,), (1383599714,), (1383599779,), (1383599710,), (1383599712,), (1383599713,), (1383599728,), (1383599729,), (1383599734,), (1383599742,), (1383599747,), (1383599766,), (1383599788,), (1383599790,), (1383599792,), (1383599795,), (1383599799,), (1383599804,), (1383599816,), (1383599819,), (1383599824,), (1383599827,), (1383599845,), (1383599847,), (1383599849,), (1383599852,), (1383599870,), (1383600103,), (1383600502,), (1383600563,), (1383600565,), (1383600591,), (1383600593,), (1383600594,), (1383600620,), (1383600657,), (1383600661,), (1383600679,), (1383600687,), (1383600690,), (1383600697,), (1383600698,), (1383600702,), (1383600704,), (1383600707,), (1383600723,), (1383600724,), (1383600725,), (1383600727,), (1383600729,), (1383600752,), (1383600812,), (1383600750,), (1383600751,), (1383600779,), (1383600780,), (1383600782,), (1383600786,), (1383600790,), (1383600797,), (1383600808,), (1383600811,), (1383600815,), (1383600816,), (1383600818,), (1383600822,), (1383600826,), (1383600866,), (1383600868,), (1383600870,), (1383600874,), (1383600878,), (1383600882,), (1383600903,), (1383600904,), (1383600905,), (1383600907,), (1383600965,), (1383600967,), (1383600968,), (1383600971,), (1383600975,), (1383600980,), (1383601003,), (1383601004,), (1383601005,), (1383601014,), (1383601028,), (1383601050,), (1383601051,), (1383601053,), (1383601056,), (1383601058,), (1383601061,), (1383601077,), (1383601078,), (1383601079,), (1383601080,), (1383601081,), (1383601086,), (1383601089,), (1383601092,), (1383601096,), (1383601108,), (1383601110,), (1383601113,), (1383601117,), (1383601122,), (1383601125,), (1383601146,), (1383601149,), (1383601151,), (1383601153,), (1383601157,), (1383601161,), (1383601175,), (1383601176,), (1383601178,), (1383601182,), (1383601186,), (1383601188,), (1383601199,), (1383601201,), (1383601204,), (1383601211,), (1383601213,), (1383601214,), (1383601216,), (1383601220,), (1383601224,), (1383601228,), (1383601238,), (1383601240,), (1383601241,), (1383601243,), (1383601267,), (1383601268,), (1383601269,), (1383601272,), (1383601278,), (1383601282,), (1383601313,), (1383601309,), (1383601310,), (1383601311,), (1383601362,), (1383601373,), (1383601374,), (1383601376,), (1383601378,), (1383601381,), (1383601393,), (1383601394,), (1383601396,), (1383601400,), (1383601404,), (1383601408,), (1383601421,), (1383601422,), (1383601425,), (1383601431,), (1383601433,), (1383601439,), (1383601442,), (1383601445,), (1383601450,), (1383601468,), (1383601476,), (1383601477,), (1383601479,), (1383601483,), (1383601487,), (1383601505,), (1383601507,), (1383601508,), (1383601510,), (1383601513,), (1383601532,), (1383601533,), (1383601576,), (1383601578,), (1383601580,), (1383601600,), (1383601602,), (1383601603,), (1383601605,), (1383601609,), (1383601644,), (1383601648,), (1383601649,), (1383601651,), (1383601654,), (1383601658,), (1383601710,), (1383601711,), (1383601712,), (1383601715,), (1383601720,), (1383601739,), (1383601748,), (1383601753,), (1383601768,), (1383601809,), (1383601811,), (1383601813,), (1383601817,), (1383601822,), (1383601825,), (1383601837,), (1383601839,), (1383601841,), (1383601862,), (1383601863,), (1383601864,), (1383601866,), (1383601903,), (1383601985,), (1383601900,), (1383601902,), (1383601929,), (1383601930,), (1383601932,), (1383601936,), (1383601940,), (1383601945,), (1383601982,), (1383601989,), (1383601992,), (1383601993,), (1383601996,), (1383601999,), (1383602003,), (1383602022,), (1383602023,), (1383602025,), (1383602028,), (1383602055,), (1383602056,), (1383602057,), (1383602059,), (1383602063,), (1383602114,), (1383602115,), (1383602116,), (1383602119,), (1383602145,), (1383602152,), (1383602153,), (1383602155,), (1383602159,), (1383602173,), (1383602174,), (1383602175,), (1383602177,), (1383602198,), (1383602200,), (1383602202,), (1383602206,), (1383602211,), (1383602215,), (1383602226,), (1383602227,), (1383602228,), (1383602231,), (1383602236,), (1383602260,), (1383602262,), (1383602265,), (1383602269,), (1383602271,), (1383602303,), (1383602322,), (1383602328,), (1383602333,), (1383602338,), (1383602344,), (1383602370,), (1383602374,), (1383602375,), (1383602377,), (1383602382,), (1383602386,), (1383602390,), (1383602393,), (1383602397,), (1383602407,), (1383602412,), (1383602416,), (1383602420,), (1383602424,), (1383602431,), (1383602432,), (1383602433,), (1383602434,), (1383602435,), (1383602436,), (1383602439,), (1383602446,), (1383602475,), (1383602459,), (1383602469,), (1383602471,), (1383602504,), (1383602506,), (1383602507,), (1383602509,), (1383602514,), (1383602563,), (1383602564,), (1383602565,), (1383602586,), (1383602588,), (1383602590,), (1383602612,), (1383602614,), (1383602618,), (1383602624,), (1383602628,), (1383602669,), (1383602678,), (1383602682,), (1383602685,), (1383602688,), (1383602697,), (1383602699,), (1383602701,), (1383602725,), (1383602726,), (1383602729,), (1383602750,), (1383602751,), (1383602783,), (1383602785,), (1383602786,), (1383602789,), (1383602792,), (1383602830,), (1383602832,), (1383602833,), (1383602836,), (1383602841,), (1383602860,), (1383602862,), (1383602919,), (1383602920,), (1383602943,), (1383602945,), (1383602947,), (1383602951,), (1383602967,), (1383602968,), (1383602969,), (1383603010,), (1383603090,), (1383602999,), (1383603001,), (1383603002,), (1383603004,), (1383603007,), (1383603035,), (1383603040,), (1383603043,), (1383603047,), (1383603051,), (1383603055,), (1383603087,), (1383603088,), (1383603092,), (1383603095,), (1383603103,), (1383603106,), (1383603110,), (1383603114,), (1383603126,), (1383603128,), (1383603131,), (1383603136,), (1383603140,), (1383603156,), (1383603202,), (1383603204,), (1383603312,), (1383603341,), (1383603343,), (1383603344,), (1383603352,), (1383603356,), (1383603359,), (1383603374,), (1383603376,), (1383603378,), (1383603381,), (1383603385,), (1383603413,), (1383603414,), (1383603415,), (1383603418,), (1383603472,), (1383603474,), (1383603478,), (1383603483,), (1383603492,), (1383603505,), (1383603546,), (1383603548,), (1383603549,), (1383603550,), (1383603554,), (1383603571,), (1383603574,), (1383603575,), (1383603577,), (1383603708,), (1383603707,), (1383603736,), (1383603739,), (1383603743,), (1383603748,), (1383603751,), (1383603767,), (1383603768,), (1383603769,), (1383603770,), (1383603803,), (1383603806,), (1383603808,), (1383603812,), (1383603817,), (1383603832,), (1383603833,), (1383603834,), (1383603839,), (1383603844,), (1383603849,), (1383603864,), (1383603865,), (1383603870,), (1383603872,), (1383603874,), (1383603876,), (1383603879,), (1383603884,), (1383603901,), (1383603903,), (1383603905,), (1383603954,), (1383603964,), (1383603965,), (1383603970,), (1383604027,), (1383604029,), (1383604030,), (1383604032,), (1383604035,), (1383604038,), (1383604069,), (1383604071,), (1383604072,), (1383604074,), (1383604117,), (1383604118,), (1383604120,), (1383604126,), (1383604130,), (1383604136,), (1383604142,), (1383604144,), (1383604147,), (1383604150,), (1383604153,), (1383604158,), (1383604176,), (1383604177,), (1383604178,), (1383604180,), (1383604236,), (1383604269,), (1383604219,), (1383604222,), (1383604225,), (1383604229,), (1383604232,), (1383604249,), (1383604250,), (1383604253,), (1383604257,), (1383604260,), (1383604263,), (1383604282,), (1383604284,), (1383604285,), (1383604287,), (1383604310,), (1383604312,), (1383604313,), (1383604315,), (1383604320,), (1383604324,), (1383604346,), (1383604347,), (1383604348,), (1383604349,), (1383604407,), (1383604409,), (1383604410,), (1383604449,), (1383604451,), (1383604452,), (1383604453,), (1383604457,), (1383604519,), (1383604521,), (1383604523,), (1383604546,), (1383604548,), (1383604550,), (1383604552,), (1383604557,), (1383604571,), (1383604572,), (1383604631,), (1383604633,), (1383604681,), (1383604696,), (1383604707,), (1383604710,), (1383604724,), (1383604725,), (1383604727,), (1383604728,), (1383604786,), (1383604779,), (1383604784,), (1383604813,), (1383604816,), (1383604819,), (1383604840,), (1383604841,), (1383604844,), (1383604849,), (1383604854,), (1383604858,), (1383604867,), (1383604868,), (1383604872,), (1383604876,), (1383604880,), (1383604900,), (1383604905,), (1383604909,), (1383604914,), (1383604939,), (1383604946,), (1383604950,), (1383604972,), (1383604974,), (1383604977,), (1383604981,), (1383604986,), (1383604997,), (1383605018,), (1383605037,), (1383605040,), (1383605044,), (1383605079,), (1383605081,), (1383605083,), (1383605285,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'13092025': {'nb_upload': 37, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([26821430]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1383605285] map_info['map_portfolio_photo'] : {26821430: [1383605285, 1383605083, 1383605081, 1383605079, 1383605044, 1383605040, 1383605037, 1383605018, 1383604997, 1383604986, 1383604981, 1383604977, 1383604974, 1383604972, 1383604950, 1383604946, 1383604939, 1383604914, 1383604909, 1383604905, 1383604900, 1383604880, 1383604876, 1383604872, 1383604868, 1383604867, 1383604858, 1383604854, 1383604849, 1383604844, 1383604841, 1383604840, 1383604819, 1383604816, 1383604813, 1383604784, 1383604779]} final : True mtd_id 4302 list_pids : [1383605285] Looping around the photos to save general results len do output : 1 /26821430Didn'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, '3716758') ('4302', '26821430', '1383605285', None, None, None, None, None, '3716758') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '26821430', 'None', None, None, None, None, '3716758'), ('4302', '26821430', '1383605285', None, None, None, None, None, '3716758')] time used for this insertion : 0.012988805770874023 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.1308434009552002 time spend to save output : 0.013128995895385742 total time spend for step 5 : 1.143972396850586 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 (3716758) 1.76user 2.50system 0:07.33elapsed 58%CPU (0avgtext+0avgdata 154964maxresident)k 168inputs+3688outputs (4major+62061minor)pagefaults 0swaps