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 : 507335 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 (3457107) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3457107) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715907 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3457107'] with mtr_portfolio_ids : ['25715907'] and first list_photo_ids : [] new path : /proc/507335/ Name: python3 Umask: 0002 State: R (running) Tgid: 507335 Ngid: 0 Pid: 507335 PPid: 507334 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 507335 NSpid: 507335 NSpgid: 505582 NSsid: 505582 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99524 kB VmRSS: 99524 kB RssAnon: 59816 kB RssFile: 39708 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 588 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: 50 nonvoluntary_ctxt_switches: 92 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '507335', 'Ngid': '0', 'Pid': '507335', 'PPid': '507334', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '507335', 'NSpid': '507335', 'NSpgid': '505582', 'NSsid': '505582', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99524 kB', 'VmRSS': '99524 kB', 'RssAnon': '59816 kB', 'RssFile': '39708 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '588 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': '50', 'nonvoluntary_ctxt_switches': '92'} ('datou_batch_current', '507335', '1106868', '0', '1106868', '865620', '99524', b'', 'marlene', '3457107') 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 (25715907) 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 (3457107 ) ) 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 (25715907) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1375431231, 'portfolio_id': 25715907}, {'photo_id': 1375431195, 'portfolio_id': 25715907}, {'photo_id': 1375431194, 'portfolio_id': 25715907}, {'photo_id': 1375431193, 'portfolio_id': 25715907}, {'photo_id': 1375431015, 'portfolio_id': 25715907}, {'photo_id': 1375431013, 'portfolio_id': 25715907}, {'photo_id': 1375431011, 'portfolio_id': 25715907}, {'photo_id': 1375430932, 'portfolio_id': 25715907}, {'photo_id': 1375430928, 'portfolio_id': 25715907}, {'photo_id': 1375430925, 'portfolio_id': 25715907}, {'photo_id': 1375430860, 'portfolio_id': 25715907}, {'photo_id': 1375430858, 'portfolio_id': 25715907}, {'photo_id': 1375430844, 'portfolio_id': 25715907}, {'photo_id': 1375430840, 'portfolio_id': 25715907}, {'photo_id': 1375430835, 'portfolio_id': 25715907}, {'photo_id': 1375430832, 'portfolio_id': 25715907}, {'photo_id': 1375430824, 'portfolio_id': 25715907}, {'photo_id': 1375430800, 'portfolio_id': 25715907}, {'photo_id': 1375430798, 'portfolio_id': 25715907}, {'photo_id': 1375430796, 'portfolio_id': 25715907}, {'photo_id': 1375430794, 'portfolio_id': 25715907}, {'photo_id': 1375430702, 'portfolio_id': 25715907}, {'photo_id': 1375430658, 'portfolio_id': 25715907}, {'photo_id': 1375430656, 'portfolio_id': 25715907}, {'photo_id': 1375430654, 'portfolio_id': 25715907}, {'photo_id': 1375430628, 'portfolio_id': 25715907}, {'photo_id': 1375430625, 'portfolio_id': 25715907}, {'photo_id': 1375430622, 'portfolio_id': 25715907}, {'photo_id': 1375430600, 'portfolio_id': 25715907}, {'photo_id': 1375430597, 'portfolio_id': 25715907}, {'photo_id': 1375430595, 'portfolio_id': 25715907}, {'photo_id': 1375430593, 'portfolio_id': 25715907}, {'photo_id': 1375430591, 'portfolio_id': 25715907}, {'photo_id': 1375430302, 'portfolio_id': 25715907}, {'photo_id': 1375430278, 'portfolio_id': 25715907}, {'photo_id': 1375430250, 'portfolio_id': 25715907}, {'photo_id': 1375429995, 'portfolio_id': 25715907}, {'photo_id': 1375429993, 'portfolio_id': 25715907}, {'photo_id': 1375429988, 'portfolio_id': 25715907}, {'photo_id': 1375429894, 'portfolio_id': 25715907}, {'photo_id': 1375429892, 'portfolio_id': 25715907}, {'photo_id': 1375429890, 'portfolio_id': 25715907}, {'photo_id': 1375429888, 'portfolio_id': 25715907}, {'photo_id': 1375429885, 'portfolio_id': 25715907}, {'photo_id': 1375429842, 'portfolio_id': 25715907}, {'photo_id': 1375429714, 'portfolio_id': 25715907}, {'photo_id': 1375429711, 'portfolio_id': 25715907}, {'photo_id': 1375429708, 'portfolio_id': 25715907}, {'photo_id': 1375429705, 'portfolio_id': 25715907}, {'photo_id': 1375429703, 'portfolio_id': 25715907}, {'photo_id': 1375429696, 'portfolio_id': 25715907}, {'photo_id': 1375429613, 'portfolio_id': 25715907}, {'photo_id': 1375429609, 'portfolio_id': 25715907}] map_portfolio_id_photo_id: {25715907: [1375431231, 1375431195, 1375431194, 1375431193, 1375431015, 1375431013, 1375431011, 1375430932, 1375430928, 1375430925, 1375430860, 1375430858, 1375430844, 1375430840, 1375430835, 1375430832, 1375430824, 1375430800, 1375430798, 1375430796, 1375430794, 1375430702, 1375430658, 1375430656, 1375430654, 1375430628, 1375430625, 1375430622, 1375430600, 1375430597, 1375430595, 1375430593, 1375430591, 1375430302, 1375430278, 1375430250, 1375429995, 1375429993, 1375429988, 1375429894, 1375429892, 1375429890, 1375429888, 1375429885, 1375429842, 1375429714, 1375429711, 1375429708, 1375429705, 1375429703, 1375429696, 1375429613, 1375429609]} ##### 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.01506352424621582 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Aug 6 08:32:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25715907) 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 : 25715907 get user id for portfolio 25715907 get sub ptf for main ptf 25715907, type 3726 and hashtags ['cartonnette', 'metal', 'autre_refus', 'flou', 'Carton_gris', 'Teint_Dans_La_Masse', 'papier', 'environnement', 'mal_croppe', 'plastique', 'kraft', 'Carton_brun'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25715907 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','metal','autre_refus','flou','Carton_gris','Teint_Dans_La_Masse','papier','environnement','mal_croppe','plastique','kraft','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25715907 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','metal','autre_refus','flou','Carton_gris','Teint_Dans_La_Masse','papier','environnement','mal_croppe','plastique','kraft','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25715907, 'sub_port_id': 25715955, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335763, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'Carton_brun': {'main_port_id': 25715907, 'sub_port_id': 25715956, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335764, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'autre_refus': {'main_port_id': 25715907, 'sub_port_id': 25715957, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335765, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'environnement': {'main_port_id': 25715907, 'sub_port_id': 25715958, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335766, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'kraft': {'main_port_id': 25715907, 'sub_port_id': 25715959, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335767, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'Carton_gris': {'main_port_id': 25715907, 'sub_port_id': 25715960, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335768, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'flou': {'main_port_id': 25715907, 'sub_port_id': 25715961, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335769, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'plastique': {'main_port_id': 25715907, 'sub_port_id': 25715962, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335770, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 25715907, 'sub_port_id': 25715963, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335771, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'mal_croppe': {'main_port_id': 25715907, 'sub_port_id': 25715964, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335772, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'metal': {'main_port_id': 25715907, 'sub_port_id': 25715965, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335773, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}, 'cartonnette': {'main_port_id': 25715907, 'sub_port_id': 25715966, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335774, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25715955 , 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=25715907 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 (25715955) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715956 , 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=25715907 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 (25715956) result : ((1375430753,), (1375430821,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715957 , 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=25715907 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 (25715957) result : ((1375431176,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715958 , 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=25715907 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 (25715958) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715959 , 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=25715907 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 (25715959) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715960 , 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=25715907 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 (25715960) result : ((1375430682,), (1375430820,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715961 , 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=25715907 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 (25715961) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715962 , 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=25715907 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 (25715962) result : ((1375430754,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715963 , 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=25715907 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 (25715963) result : ((1375430681,), (1375430752,), (1375430854,), (1375430855,), (1375431173,), (1375431174,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715964 , 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=25715907 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 (25715964) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715965 , 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=25715907 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 (25715965) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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 25715966 , 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=25715907 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 (25715966) result : ((1375430688,), (1375430692,), (1375430696,), (1375430699,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25715907) result : ((1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) 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 (1375430800,1375430600) 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`=25715907 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','metal','autre_refus','flou','Carton_gris','Teint_Dans_La_Masse','papier','environnement','mal_croppe','plastique','kraft','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25715907 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','metal','autre_refus','flou','Carton_gris','Teint_Dans_La_Masse','papier','environnement','mal_croppe','plastique','kraft','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25715907, 'sub_port_id': 25715967, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335775, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'Carton_brun': {'main_port_id': 25715907, 'sub_port_id': 25715968, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335776, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'autre_refus': {'main_port_id': 25715907, 'sub_port_id': 25715969, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335777, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'environnement': {'main_port_id': 25715907, 'sub_port_id': 25715970, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335778, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'kraft': {'main_port_id': 25715907, 'sub_port_id': 25715971, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335779, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'Carton_gris': {'main_port_id': 25715907, 'sub_port_id': 25715972, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335780, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'flou': {'main_port_id': 25715907, 'sub_port_id': 25715973, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335781, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'plastique': {'main_port_id': 25715907, 'sub_port_id': 25715974, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335782, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 25715907, 'sub_port_id': 25715975, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335783, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'mal_croppe': {'main_port_id': 25715907, 'sub_port_id': 25715976, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335784, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'metal': {'main_port_id': 25715907, 'sub_port_id': 25715977, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335785, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 17, 31), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}, 'cartonnette': {'main_port_id': 25715907, 'sub_port_id': 25715978, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17335786, 'last_updated_at': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_desc': datetime.datetime(2025, 8, 6, 8, 30, 58), 'last_updated_at_asc': datetime.datetime(2025, 8, 6, 8, 17, 31)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715967,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715955 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715968,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715956 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715969,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715957 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715970,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715958 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715971,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715959 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715972,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715960 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715973,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715961 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715974,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715962 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715975,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715963 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715976,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715964 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715977,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715965 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25715978,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25715966 lien utilise dans velours : https://www.fotonower.com/velours/25715967,25715968,25715969,25715970,25715971,25715972,25715973,25715974,25715975,25715976,25715977,25715978?tags=papier,Carton_brun,autre_refus,environnement,kraft,Carton_gris,flou,plastique,Teint_Dans_La_Masse,mal_croppe,metal,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25715907]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1375431231] map_info['map_portfolio_photo'] : {25715907: [1375431231, 1375431195, 1375431194, 1375431193, 1375431015, 1375431013, 1375431011, 1375430932, 1375430928, 1375430925, 1375430860, 1375430858, 1375430844, 1375430840, 1375430835, 1375430832, 1375430824, 1375430800, 1375430798, 1375430796, 1375430794, 1375430702, 1375430658, 1375430656, 1375430654, 1375430628, 1375430625, 1375430622, 1375430600, 1375430597, 1375430595, 1375430593, 1375430591, 1375430302, 1375430278, 1375430250, 1375429995, 1375429993, 1375429988, 1375429894, 1375429892, 1375429890, 1375429888, 1375429885, 1375429842, 1375429714, 1375429711, 1375429708, 1375429705, 1375429703, 1375429696, 1375429613, 1375429609]} final : False mtd_id 4302 list_pids : [1375431231] Looping around the photos to save general results len do output : 1 /25715907. 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, '3457107') ('4302', '25715907', '1375431231', None, None, None, None, None, '3457107') 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, '25715907', "{'papier': 25715955, 'Carton_brun': 25715956, 'autre_refus': 25715957, 'environnement': 25715958, 'kraft': 25715959, 'Carton_gris': 25715960, 'flou': 25715961, 'plastique': 25715962, 'Teint_Dans_La_Masse': 25715963, 'mal_croppe': 25715964, 'metal': 25715965, 'cartonnette': 25715966}", None, None, None, None, '3457107'), ('4302', '25715907', '1375431231', None, None, None, None, None, '3457107')] time used for this insertion : 0.01360630989074707 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.42061495780944824 time spend to save output : 0.013843774795532227 total time spend for step 1 : 0.43445873260498047 step2:final Wed Aug 6 08:32:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (25715907) 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 25715907 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1375429613,1375429609,1375429714,1375429711,1375429708,1375429705,1375429696,1375429703,1375429894,1375429892,1375429890,1375429888,1375429885,1375429842,1375429995,1375429993,1375429988,1375430302,1375430278,1375430250,1375430600,1375430597,1375430595,1375430593,1375430591,1375430628,1375430625,1375430622,1375430658,1375430656,1375430654,1375430702,1375430800,1375430798,1375430796,1375430794,1375430844,1375430840,1375430835,1375430832,1375430860,1375430824,1375430858,1375430932,1375430928,1375430925,1375431015,1375431013,1375431011,1375431195,1375431194,1375431193,1375431231); 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([25715907]) Inside saveOutput : final : False verbose : True original output for save of step final : {1375431231: ('0.034866962245711265',)} new output for save of step final : {1375431231: ('0.034866962245711265',)} [1375431231] map_info['map_portfolio_photo'] : {25715907: [1375431231, 1375431195, 1375431194, 1375431193, 1375431015, 1375431013, 1375431011, 1375430932, 1375430928, 1375430925, 1375430860, 1375430858, 1375430844, 1375430840, 1375430835, 1375430832, 1375430824, 1375430800, 1375430798, 1375430796, 1375430794, 1375430702, 1375430658, 1375430656, 1375430654, 1375430628, 1375430625, 1375430622, 1375430600, 1375430597, 1375430595, 1375430593, 1375430591, 1375430302, 1375430278, 1375430250, 1375429995, 1375429993, 1375429988, 1375429894, 1375429892, 1375429890, 1375429888, 1375429885, 1375429842, 1375429714, 1375429711, 1375429708, 1375429705, 1375429703, 1375429696, 1375429613, 1375429609]} final : False mtd_id 4302 list_pids : [1375431231] Looping around the photos to save general results len do output : 1 /1375431231.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, '3457107') ('4302', '25715907', '1375431231', None, None, None, None, None, '3457107') 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', '25715907', '1375431231', '0.034866962245711265', None, None, None, None, '3457107')] time used for this insertion : 0.012958288192749023 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.11302924156188965 time spend to save output : 0.013133049011230469 total time spend for step 2 : 0.12616229057312012 step3:velours_tree Wed Aug 6 08:32: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 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 : {25715907: [{'papier': 25715955, 'Carton_brun': 25715956, 'autre_refus': 25715957, 'environnement': 25715958, 'kraft': 25715959, 'Carton_gris': 25715960, 'flou': 25715961, 'plastique': 25715962, 'Teint_Dans_La_Masse': 25715963, 'mal_croppe': 25715964, 'metal': 25715965, 'cartonnette': 25715966}]} input_args_next_step : {25715907: ()} output_args : {25715907: [{'papier': 25715955, 'Carton_brun': 25715956, 'autre_refus': 25715957, 'environnement': 25715958, 'kraft': 25715959, 'Carton_gris': 25715960, 'flou': 25715961, 'plastique': 25715962, 'Teint_Dans_La_Masse': 25715963, 'mal_croppe': 25715964, 'metal': 25715965, 'cartonnette': 25715966}]} args : 25715907 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'papier': 25715955, 'Carton_brun': 25715956, 'autre_refus': 25715957, 'environnement': 25715958, 'kraft': 25715959, 'Carton_gris': 25715960, 'flou': 25715961, 'plastique': 25715962, 'Teint_Dans_La_Masse': 25715963, 'mal_croppe': 25715964, 'metal': 25715965, 'cartonnette': 25715966},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25715907) 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([25715907]) 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.317213773727417 time spend to save output : 5.125999450683594e-05 total time spend for step 3 : 0.31726503372192383 step4:send_mail_cod Wed Aug 6 08:32: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 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 : {1375431231: ('0.034866962245711265',)} input_args_next_step : {1375431231: ()} output_args : {1375431231: ('0.034866962245711265',)} args : 1375431231 depend.output_id : 0 complete output_args for input 3 : {25715907: [{'papier': 25715955, 'Carton_brun': 25715956, 'autre_refus': 25715957, 'environnement': 25715958, 'kraft': 25715959, 'Carton_gris': 25715960, 'flou': 25715961, 'plastique': 25715962, 'Teint_Dans_La_Masse': 25715963, 'mal_croppe': 25715964, 'metal': 25715965, 'cartonnette': 25715966}]} input_args_next_step : {1375431231: ('0.034866962245711265',), 25715907: ()} output_args : {25715907: [{'papier': 25715955, 'Carton_brun': 25715956, 'autre_refus': 25715957, 'environnement': 25715958, 'kraft': 25715959, 'Carton_gris': 25715960, 'flou': 25715961, 'plastique': 25715962, 'Teint_Dans_La_Masse': 25715963, 'mal_croppe': 25715964, 'metal': 25715965, 'cartonnette': 25715966}]} args : 25715907 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.034866962245711265',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25715907) 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 (1375431231) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1375431231 download finish for photo 1375431231 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_P25715907_06-08-2025_08_32_58.pdf 25715957 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=25715957 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375431176: '1754461765_1686367_1375430654_0c0c2f85ba5467337aab6828cb63c688_rle_crop_3904509905_0.png'} change filename to text .imagette257159571754461978/ imagette257159571754461978/1754461765_1686367_1375430654_0c0c2f85ba5467337aab6828cb63c688_rle_crop_3904509905_0.png.png imagette257159591754461978/ imagette257159611754461978/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/5ad5b92d401dd17be1ab35e904c2101b_94022529.png imagette257159571754461978 25715959 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=25715959 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette257159591754461978 25715961 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=25715961 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette257159611754461978 25715962 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=25715962 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375430754: '1754461467_1673811_1375430250_b59556a4bf8a659b22cfd0905df8d821_rle_crop_3904507590_0.png'} change filename to text .imagette257159621754461978/ imagette257159621754461978/1754461467_1673811_1375430250_b59556a4bf8a659b22cfd0905df8d821_rle_crop_3904507590_0.png.png imagette257159641754461978/ imagette257159651754461978/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/fcafe0887eda9506ae7ebda3aca5946f_27581712.png imagette257159621754461978 25715964 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=25715964 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette257159641754461978 25715965 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=25715965 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette257159651754461978 25715966 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=25715966 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375430688: '1754461405_1671854_1375429711_2625324ae94c8860e04f04144785a849_rle_crop_3904507419_0.png', 1375430692: '1754461405_1671854_1375429708_0dacf656ebdebc786af226627cd2f16e_rle_crop_3904507433_0.png', 1375430696: '1754461405_1671854_1375429708_0dacf656ebdebc786af226627cd2f16e_rle_crop_3904507437_0.png', 1375430699: '1754461405_1671854_1375429696_9b4a1ae7c1af1cea6f8b087bcb8a056b_rle_crop_3904507478_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/ba419935a5516664c42a4e1e51121f69_86166036.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/a92ae373ae9b8310c48c40539e6e8369_70419740.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/6b02688e62e765247296b92b84aebf80_43674950.png change filename to text .imagette257159661754461978/ imagette257159661754461978/1754461405_1671854_1375429708_0dacf656ebdebc786af226627cd2f16e_rle_crop_3904507437_0.png.png imagette257159661754461978/1754461405_1671854_1375429711_2625324ae94c8860e04f04144785a849_rle_crop_3904507419_0.png.png imagette257159661754461978/1754461405_1671854_1375429696_9b4a1ae7c1af1cea6f8b087bcb8a056b_rle_crop_3904507478_0.png.png imagette257159661754461978/1754461405_1671854_1375429708_0dacf656ebdebc786af226627cd2f16e_rle_crop_3904507433_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/d2b5ecbedaface98ab3b423d85a5f0a6_60533743.png imagette257159661754461978 25715956 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=25715956 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375430753: '1754461467_1673811_1375430250_b59556a4bf8a659b22cfd0905df8d821_rle_crop_3904507595_0.png', 1375430821: '1754461525_1677500_1375430302_07fc78dfb11937a71ac90118649c45e6_rle_crop_3904508241_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/4b5b1385da6091ed41df087feab76002_9557588.png change filename to text .imagette257159561754461978/ imagette257159561754461978/1754461467_1673811_1375430250_b59556a4bf8a659b22cfd0905df8d821_rle_crop_3904507595_0.png.png imagette257159561754461978/1754461525_1677500_1375430302_07fc78dfb11937a71ac90118649c45e6_rle_crop_3904508241_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/462444d948ca472673009972b9755d2b_98341487.png imagette257159561754461978 25715960 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=25715960 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375430682: '1754461405_1671854_1375429705_cda1f39ff7140eae3f0b7ecff9f1ec4b_rle_crop_3904507449_0.png', 1375430820: '1754461525_1677500_1375430302_07fc78dfb11937a71ac90118649c45e6_rle_crop_3904508235_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/c2bb6c0595b3d6eaef944ce44e121574_584043.png change filename to text .imagette257159601754461979/ imagette257159601754461979/1754461405_1671854_1375429705_cda1f39ff7140eae3f0b7ecff9f1ec4b_rle_crop_3904507449_0.png.png imagette257159601754461979/1754461525_1677500_1375430302_07fc78dfb11937a71ac90118649c45e6_rle_crop_3904508235_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/86ba1c596fd35c28a33dd84d4065562e_21509450.png imagette257159601754461979 25715963 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=25715963 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1375430681: '1754461405_1671854_1375429703_749b66bcbeadd3366d3c6bf7326df689_rle_crop_3904507465_0.png', 1375430752: '1754461467_1673811_1375430250_b59556a4bf8a659b22cfd0905df8d821_rle_crop_3904507592_0.png', 1375430854: '1754461587_1680169_1375430625_25824af3a4e93db4aa004155a614b6eb_rle_crop_3904508569_0.png', 1375430855: '1754461587_1680169_1375430622_7660143512ee1ca02df7084cfddbd8d4_rle_crop_3904508590_0.png', 1375431173: '1754461765_1686367_1375430656_d502e73f7caab97cdae285fe196fa07c_rle_crop_3904509892_0.png', 1375431174: '1754461765_1686367_1375430654_0c0c2f85ba5467337aab6828cb63c688_rle_crop_3904509909_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/596cb4c88ed3d6b7f57e9ff83106b960_16583678.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/5d7794abb3d3be9418e7d12184f913f9_80345908.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/b0379b212accc2089baeffa03d33c784_11491634.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/955fee03701fb0b3bb09790bf1d54cfd_75078974.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/63810730a6c6371080d0fb484b534665_45233759.png change filename to text .imagette257159631754461979/ imagette257159631754461979/1754461765_1686367_1375430654_0c0c2f85ba5467337aab6828cb63c688_rle_crop_3904509909_0.png.png imagette257159631754461979/1754461765_1686367_1375430656_d502e73f7caab97cdae285fe196fa07c_rle_crop_3904509892_0.png.png imagette257159631754461979/1754461587_1680169_1375430625_25824af3a4e93db4aa004155a614b6eb_rle_crop_3904508569_0.png.png imagette257159631754461979/1754461467_1673811_1375430250_b59556a4bf8a659b22cfd0905df8d821_rle_crop_3904507592_0.png.png imagette257159631754461979/1754461587_1680169_1375430622_7660143512ee1ca02df7084cfddbd8d4_rle_crop_3904508590_0.png.png imagette257159631754461979/1754461405_1671854_1375429703_749b66bcbeadd3366d3c6bf7326df689_rle_crop_3904507465_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/e3f543ade19995b3cbff0a1e5e25c8cb_73376294.png imagette257159631754461979 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25715907 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25715967,25715968,25715969,25715970,25715971,25715972,25715973,25715974,25715975,25715976,25715977,25715978?tags=papier,Carton_brun,autre_refus,environnement,kraft,Carton_gris,flou,plastique,Teint_Dans_La_Masse,mal_croppe,metal,cartonnette your option no_mail is active, we will not send the real mail to your client args[1375431231] : ('0.034866962245711265',) no score found for photo 1375431231 We are sending mail with results at report@fotonower.com refus_total : 0.034866962245711265 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=25715907 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_P25715907_06-08-2025_08_32_58.pdf results_Auto_P25715907_06-08-2025_08_32_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25715907_06-08-2025_08_32_58.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','25715907','results_Auto_P25715907_06-08-2025_08_32_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25715907_06-08-2025_08_32_58.pdf','pdf','','0.08','0.034866962245711265') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25715907]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1375431231] map_info['map_portfolio_photo'] : {25715907: [1375431231, 1375431195, 1375431194, 1375431193, 1375431015, 1375431013, 1375431011, 1375430932, 1375430928, 1375430925, 1375430860, 1375430858, 1375430844, 1375430840, 1375430835, 1375430832, 1375430824, 1375430800, 1375430798, 1375430796, 1375430794, 1375430702, 1375430658, 1375430656, 1375430654, 1375430628, 1375430625, 1375430622, 1375430600, 1375430597, 1375430595, 1375430593, 1375430591, 1375430302, 1375430278, 1375430250, 1375429995, 1375429993, 1375429988, 1375429894, 1375429892, 1375429890, 1375429888, 1375429885, 1375429842, 1375429714, 1375429711, 1375429708, 1375429705, 1375429703, 1375429696, 1375429613, 1375429609]} final : False mtd_id 4302 list_pids : [1375431231] 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, '3457107') ('4302', '25715907', '1375431231', None, None, None, None, None, '3457107') 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', '25715907', '1375431231', None, None, None, None, None, '3457107')] time used for this insertion : 0.011794328689575195 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.9435381889343262 time spend to save output : 0.011953353881835938 total time spend for step 4 : 1.955491542816162 step5:split_time_score Wed Aug 6 08:33:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['25715907'] 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 : [('25715907',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25715907) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1375431231: {'path': 'temp/1754461978_507335_1375431231_b52bd77b1f428ce404427379d4cf3a08.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 = 25715907; (('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 = 25715907 group by h (('08', 53),) 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=25715907 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 (25715907) 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 (25715907) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 06082025 25715907 Nombre de photos uploadées : 53 / 23040 (0%) 06082025 25715907 Nombre de photos taguées (types de déchets): 0 / 53 (0%) 06082025 25715907 Nombre de photos taguées (volume) : 0 / 53 (0%) [{'photo_id': 1375429613, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/6127e40ea00e05f6b6b2828ae2c5fde7.jpg', 'username': None, 'uploaded_at': 1754460967, 'text': 'image_06082025_08_15_35_10136.jpg'}, {'photo_id': 1375429609, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/b7bc06b141715f15b40285a6608efc82.jpg', 'username': None, 'uploaded_at': 1754460967, 'text': 'image_06082025_08_15_44_9123.jpg'}, {'photo_id': 1375429714, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/072a68daba48150c9b806d3bd7728ad5.jpg', 'username': None, 'uploaded_at': 1754461037, 'text': 'image_06082025_08_15_54_10135.jpg'}, {'photo_id': 1375429711, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/6/2625324ae94c8860e04f04144785a849.jpg', 'username': None, 'uploaded_at': 1754461037, 'text': 'image_06082025_08_16_04_010168m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 1.2159347534179688e-05 ????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.003386259078979492 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 25715907, '2025-08-06' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-08-06' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2070025,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20326519012451172 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= 2070025 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25707608, 'dashboard_result_id': 13646490, '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_P25707608_06-08-2025_06_23_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707610, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707611, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707612, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707613, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707614, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707615, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707616, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707617, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707618, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25707619, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707620, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707621, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25707669, 'dashboard_result_id': 13646491, '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_P25707669_06-08-2025_06_23_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25707670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707671, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707672, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707674, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707676, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707677, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707678, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707679, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707680, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707681, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25707918, 'dashboard_result_id': 13646492, '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_P25707918_06-08-2025_06_23_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707924, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707925, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707927, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707929, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707931, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707932, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707933, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25707934, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707935, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25708197, 'dashboard_result_id': 13646493, '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_P25708197_06-08-2025_06_24_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708198, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708199, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708200, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708201, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708202, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708203, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708205, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708206, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708207, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708209, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25708353, 'dashboard_result_id': 13646494, '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_P25708353_06-08-2025_06_25_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25708356, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708357, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708359, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708360, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708361, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708362, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708363, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708364, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708365, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708366, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708367, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25708783, 'dashboard_result_id': 13646495, '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_P25708783_06-08-2025_06_25_40.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25708784, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708785, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708786, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708788, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708789, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708790, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708791, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708792, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708793, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708794, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708795, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25708897, 'dashboard_result_id': 13646496, '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_P25708897_06-08-2025_06_26_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708899, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708900, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708903, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708904, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708905, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708906, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708907, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708908, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708909, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708910, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25709121, 'dashboard_result_id': 13646497, '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_P25709121_06-08-2025_06_26_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709125, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709126, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709128, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709129, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709131, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709132, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709133, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709134, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709135, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709136, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25709573, 'dashboard_result_id': 13646498, '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_P25709573_06-08-2025_06_27_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709610, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709611, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709612, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709613, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709614, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709615, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709619, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709620, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709621, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25709782, 'dashboard_result_id': 13646499, '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_P25709782_06-08-2025_06_28_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709789, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709790, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709791, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709792, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709793, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709795, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709796, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709797, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709798, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709799, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709800, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25710076, 'dashboard_result_id': 13646500, '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_P25710076_06-08-2025_05_46_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710086, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710087, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710088, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710089, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710090, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710091, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710092, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710093, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710095, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710096, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25710464, 'dashboard_result_id': 13646501, '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_P25710464_06-08-2025_06_05_33.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710477, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710478, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710479, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710480, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710481, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710482, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710483, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710485, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710486, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710488, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25710893, 'dashboard_result_id': 13646502, '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_P25710893_06-08-2025_06_19_33.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710899, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710900, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710902, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710904, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710906, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710907, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710908, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710909, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710910, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25711330, 'dashboard_result_id': 13646503, '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_P25711330_06-08-2025_06_32_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25711336, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25711337, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25711338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25711339, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25711340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25711341, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25711342, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25711343, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25711344, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25711345, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25711346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25711347, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25711683, 'dashboard_result_id': 13646504, '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_P25711683_06-08-2025_06_50_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25711718, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25711719, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25711720, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25711721, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25711722, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25711723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25711724, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25711725, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25711726, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25711727, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25711728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25711729, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25712215, 'dashboard_result_id': 13646505, '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_P25712215_06-08-2025_07_02_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25712224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25712225, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25712226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25712227, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25712228, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25712229, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25712230, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25712231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25712232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25712233, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25712234, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25712235, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25712594, 'dashboard_result_id': 13646506, '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_P25712594_06-08-2025_07_19_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25712645, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25712646, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25712647, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25712648, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25712649, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25712650, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25712651, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25712652, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25712653, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25712654, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25712655, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25712656, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25713396, 'dashboard_result_id': 13646507, '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_P25713396_06-08-2025_07_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25713439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25713440, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25713441, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25713442, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25713443, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25713444, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25713445, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25713446, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25713447, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25713448, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25713449, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25713450, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25714071, 'dashboard_result_id': 13646508, '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_P25714071_06-08-2025_07_48_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25714115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25714116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25714117, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25714118, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25714119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25714120, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25714121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25714122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25714123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25714124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25714125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25714126, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25714815, 'dashboard_result_id': 13646509, '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_P25714815_06-08-2025_08_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25714849, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25714850, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25714851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25714852, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25714853, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25714854, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25714855, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25714856, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25714857, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25714858, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25714859, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25714860, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25715250, 'dashboard_result_id': 13646510, '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_P25715250_06-08-2025_08_16_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25715310, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25715311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25715312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25715313, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25715314, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25715315, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25715316, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25715317, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25715318, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25715319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25715320, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25715321, 'pht': 3726}}"}, {'dashboat_entry_day': 2070025, 'dashboard_run_id': 2079697, 'mtr_portfolio_id': 25715907, 'dashboard_result_id': 13646511, '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_P25715907_06-08-2025_08_30_59.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25715955, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25715956, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25715957, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25715958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25715959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25715960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25715961, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25715962, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25715963, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25715964, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25715965, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25715966, '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 = 25707608 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': 3455289, 'mtr_portfolio_id': 25707608, 'created_at': datetime.datetime(2025, 8, 6, 6, 22, 59), 'result': '0.050787517835168584', 'result_long': None, 'result_double': None}] Qualite : 0.050787517835168584 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25707608 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25707608_06-08-2025_06_23_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25707608 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_P25707608_06-08-2025_06_23_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707610, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707611, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707612, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707613, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707614, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707615, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707616, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707617, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707618, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25707619, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707620, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707621, 'pht': 3726}}" where mtr_portfolio_id = 25707608 and dashboard_run_id = 2079697 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`=25707608 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646490, 0.050787517835168584, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25707608_06-08-2025_06_23_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707610, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707611, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707612, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707613, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707614, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707615, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707616, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707617, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707618, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25707619, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707620, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707621, '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 = 25707669 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': 3455290, 'mtr_portfolio_id': 25707669, 'created_at': datetime.datetime(2025, 8, 6, 6, 23, 29), 'result': '0.02685943572006947', 'result_long': None, 'result_double': None}] Qualite : 0.02685943572006947 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25707669 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25707669_06-08-2025_06_23_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25707669 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_P25707669_06-08-2025_06_23_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25707670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707671, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707672, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707674, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707676, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707677, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707678, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707679, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707680, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707681, 'pht': 3726}}" where mtr_portfolio_id = 25707669 and dashboard_run_id = 2079697 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`=25707669 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646491, 0.02685943572006947, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25707669_06-08-2025_06_23_30.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25707670, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707671, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707672, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707673, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707674, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707675, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707676, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707677, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707678, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707679, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707680, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707681, '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 = 25707918 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': 3455291, 'mtr_portfolio_id': 25707918, 'created_at': datetime.datetime(2025, 8, 6, 6, 23, 58), 'result': '0.04620891798256984', 'result_long': None, 'result_double': None}] Qualite : 0.04620891798256984 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25707918 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25707918_06-08-2025_06_23_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25707918 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_P25707918_06-08-2025_06_23_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707924, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707925, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707927, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707929, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707931, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707932, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707933, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25707934, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707935, 'pht': 3726}}" where mtr_portfolio_id = 25707918 and dashboard_run_id = 2079697 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`=25707918 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646492, 0.04620891798256984, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25707918_06-08-2025_06_23_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25707924, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25707925, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25707926, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25707927, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25707928, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25707929, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25707930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25707931, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25707932, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25707933, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25707934, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25707935, '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 = 25708197 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': 3455292, 'mtr_portfolio_id': 25708197, 'created_at': datetime.datetime(2025, 8, 6, 6, 24, 28), 'result': '0.04622451488263083', 'result_long': None, 'result_double': None}] Qualite : 0.04622451488263083 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25708197 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708197_06-08-2025_06_24_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25708197 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_P25708197_06-08-2025_06_24_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708198, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708199, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708200, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708201, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708202, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708203, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708205, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708206, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708207, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708209, 'pht': 3726}}" where mtr_portfolio_id = 25708197 and dashboard_run_id = 2079697 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`=25708197 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646493, 0.04622451488263083, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708197_06-08-2025_06_24_29.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708198, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708199, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708200, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708201, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708202, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708203, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708204, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708205, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708206, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708207, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708208, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708209, '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 = 25708353 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': 3455293, 'mtr_portfolio_id': 25708353, 'created_at': datetime.datetime(2025, 8, 6, 6, 25, 29), 'result': '0.09549046288043225', 'result_long': None, 'result_double': None}] Qualite : 0.09549046288043225 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25708353 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708353_06-08-2025_06_25_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25708353 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_P25708353_06-08-2025_06_25_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25708356, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708357, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708359, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708360, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708361, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708362, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708363, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708364, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708365, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708366, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708367, 'pht': 3726}}" where mtr_portfolio_id = 25708353 and dashboard_run_id = 2079697 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`=25708353 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646494, 0.09549046288043225, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708353_06-08-2025_06_25_29.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25708356, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708357, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708358, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708359, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708360, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708361, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708362, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708363, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708364, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708365, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708366, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708367, '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 = 25708783 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': 3455294, 'mtr_portfolio_id': 25708783, 'created_at': datetime.datetime(2025, 8, 6, 6, 25, 40), 'result': '0.05635375285911138', 'result_long': None, 'result_double': None}] Qualite : 0.05635375285911138 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25708783 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708783_06-08-2025_06_25_40.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25708783 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_P25708783_06-08-2025_06_25_40.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25708784, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708785, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708786, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708788, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708789, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708790, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708791, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708792, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708793, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708794, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708795, 'pht': 3726}}" where mtr_portfolio_id = 25708783 and dashboard_run_id = 2079697 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`=25708783 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646495, 0.05635375285911138, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708783_06-08-2025_06_25_40.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 25708784, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708785, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708786, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708787, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708788, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708789, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708790, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708791, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708792, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708793, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708794, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708795, '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 = 25708897 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': 3455295, 'mtr_portfolio_id': 25708897, 'created_at': datetime.datetime(2025, 8, 6, 6, 25, 59), 'result': '0.07306548600055757', 'result_long': None, 'result_double': None}] Qualite : 0.07306548600055757 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25708897 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708897_06-08-2025_06_26_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25708897 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_P25708897_06-08-2025_06_26_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708899, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708900, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708903, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708904, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708905, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708906, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708907, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708908, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708909, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708910, 'pht': 3726}}" where mtr_portfolio_id = 25708897 and dashboard_run_id = 2079697 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`=25708897 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646496, 0.07306548600055757, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25708897_06-08-2025_06_26_00.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25708899, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25708900, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25708901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25708902, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25708903, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25708904, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25708905, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25708906, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25708907, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25708908, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25708909, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25708910, '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 = 25709121 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': 3455296, 'mtr_portfolio_id': 25709121, 'created_at': datetime.datetime(2025, 8, 6, 6, 26, 30), 'result': '0.04325448622399456', 'result_long': None, 'result_double': None}] Qualite : 0.04325448622399456 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25709121 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25709121_06-08-2025_06_26_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25709121 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_P25709121_06-08-2025_06_26_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709125, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709126, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709128, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709129, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709131, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709132, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709133, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709134, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709135, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709136, 'pht': 3726}}" where mtr_portfolio_id = 25709121 and dashboard_run_id = 2079697 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`=25709121 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646497, 0.04325448622399456, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25709121_06-08-2025_06_26_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709125, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709126, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709127, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709128, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709129, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709130, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709131, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709132, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709133, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709134, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709135, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709136, '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 = 25709573 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': 3455297, 'mtr_portfolio_id': 25709573, 'created_at': datetime.datetime(2025, 8, 6, 6, 27, 28), 'result': '0.06704801428958249', 'result_long': None, 'result_double': None}] Qualite : 0.06704801428958249 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25709573 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25709573_06-08-2025_06_27_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25709573 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_P25709573_06-08-2025_06_27_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709610, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709611, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709612, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709613, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709614, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709615, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709619, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709620, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709621, 'pht': 3726}}" where mtr_portfolio_id = 25709573 and dashboard_run_id = 2079697 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`=25709573 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646498, 0.06704801428958249, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25709573_06-08-2025_06_27_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709610, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709611, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709612, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709613, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709614, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709615, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709616, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709618, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709619, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709620, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709621, '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 = 25709782 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': 3455298, 'mtr_portfolio_id': 25709782, 'created_at': datetime.datetime(2025, 8, 6, 6, 28), 'result': '0.04670482387469812', 'result_long': None, 'result_double': None}] Qualite : 0.04670482387469812 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25709782 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25709782_06-08-2025_06_28_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25709782 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_P25709782_06-08-2025_06_28_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709789, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709790, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709791, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709792, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709793, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709795, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709796, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709797, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709798, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709799, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709800, 'pht': 3726}}" where mtr_portfolio_id = 25709782 and dashboard_run_id = 2079697 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`=25709782 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646499, 0.04670482387469812, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25709782_06-08-2025_06_28_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25709789, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25709790, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25709791, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25709792, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25709793, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25709794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25709795, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25709796, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25709797, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25709798, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25709799, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25709800, '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 = 25710076 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': 3455196, 'mtr_portfolio_id': 25710076, 'created_at': datetime.datetime(2025, 8, 6, 5, 46, 30), 'result': '0.03586826282498846', 'result_long': None, 'result_double': None}] Qualite : 0.03586826282498846 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25710076 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25710076_06-08-2025_05_46_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25710076 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_P25710076_06-08-2025_05_46_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710086, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710087, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710088, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710089, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710090, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710091, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710092, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710093, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710095, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710096, 'pht': 3726}}" where mtr_portfolio_id = 25710076 and dashboard_run_id = 2079697 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`=25710076 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646500, 0.03586826282498846, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25710076_06-08-2025_05_46_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710085, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710086, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710087, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710088, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710089, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710090, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710091, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710092, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710093, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710094, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710095, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710096, '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 = 25710464 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': 3455457, 'mtr_portfolio_id': 25710464, 'created_at': datetime.datetime(2025, 8, 6, 6, 5, 33), 'result': '0.050811390278679223', 'result_long': None, 'result_double': None}] Qualite : 0.050811390278679223 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25710464 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25710464_06-08-2025_06_05_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25710464 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_P25710464_06-08-2025_06_05_33.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710477, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710478, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710479, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710480, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710481, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710482, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710483, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710485, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710486, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710488, 'pht': 3726}}" where mtr_portfolio_id = 25710464 and dashboard_run_id = 2079697 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`=25710464 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646501, 0.050811390278679223, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25710464_06-08-2025_06_05_33.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710477, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710478, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710479, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710480, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710481, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710482, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710483, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710484, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710485, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710486, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710487, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710488, '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 = 25710893 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': 3455586, 'mtr_portfolio_id': 25710893, 'created_at': datetime.datetime(2025, 8, 6, 6, 19, 33), 'result': '0.04874408168590121', 'result_long': None, 'result_double': None}] Qualite : 0.04874408168590121 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25710893 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25710893_06-08-2025_06_19_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25710893 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_P25710893_06-08-2025_06_19_33.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710899, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710900, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710902, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710904, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710906, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710907, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710908, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710909, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710910, 'pht': 3726}}" where mtr_portfolio_id = 25710893 and dashboard_run_id = 2079697 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`=25710893 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646502, 0.04874408168590121, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25710893_06-08-2025_06_19_33.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25710899, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25710900, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25710901, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25710902, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25710903, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25710904, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25710905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25710906, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25710907, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25710908, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25710909, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25710910, '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 = 25711330 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': 3455681, 'mtr_portfolio_id': 25711330, 'created_at': datetime.datetime(2025, 8, 6, 6, 32, 58), 'result': '0.09693509256942304', 'result_long': None, 'result_double': None}] Qualite : 0.09693509256942304 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25711330 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25711330_06-08-2025_06_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25711330 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_P25711330_06-08-2025_06_32_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25711336, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25711337, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25711338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25711339, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25711340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25711341, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25711342, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25711343, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25711344, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25711345, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25711346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25711347, 'pht': 3726}}" where mtr_portfolio_id = 25711330 and dashboard_run_id = 2079697 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`=25711330 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646503, 0.09693509256942304, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25711330_06-08-2025_06_32_58.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25711336, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25711337, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25711338, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25711339, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25711340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25711341, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25711342, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25711343, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25711344, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25711345, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25711346, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25711347, '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 = 25711683 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': 3455772, 'mtr_portfolio_id': 25711683, 'created_at': datetime.datetime(2025, 8, 6, 6, 50, 58), 'result': '0.058971582990684765', 'result_long': None, 'result_double': None}] Qualite : 0.058971582990684765 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25711683 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25711683_06-08-2025_06_50_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25711683 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_P25711683_06-08-2025_06_50_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25711718, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25711719, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25711720, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25711721, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25711722, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25711723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25711724, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25711725, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25711726, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25711727, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25711728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25711729, 'pht': 3726}}" where mtr_portfolio_id = 25711683 and dashboard_run_id = 2079697 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`=25711683 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646504, 0.058971582990684765, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25711683_06-08-2025_06_50_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25711718, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25711719, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25711720, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25711721, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25711722, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25711723, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25711724, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25711725, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25711726, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25711727, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25711728, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25711729, '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 = 25712215 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': 3455933, 'mtr_portfolio_id': 25712215, 'created_at': datetime.datetime(2025, 8, 6, 7, 2, 59), 'result': '0.05825423519183255', 'result_long': None, 'result_double': None}] Qualite : 0.05825423519183255 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25712215 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25712215_06-08-2025_07_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25712215 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_P25712215_06-08-2025_07_02_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25712224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25712225, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25712226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25712227, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25712228, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25712229, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25712230, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25712231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25712232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25712233, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25712234, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25712235, 'pht': 3726}}" where mtr_portfolio_id = 25712215 and dashboard_run_id = 2079697 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`=25712215 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646505, 0.05825423519183255, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25712215_06-08-2025_07_02_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25712224, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25712225, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25712226, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25712227, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25712228, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25712229, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25712230, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25712231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25712232, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25712233, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25712234, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25712235, '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 = 25712594 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': 3456065, 'mtr_portfolio_id': 25712594, 'created_at': datetime.datetime(2025, 8, 6, 7, 19), 'result': '0.038903970752075814', 'result_long': None, 'result_double': None}] Qualite : 0.038903970752075814 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25712594 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25712594_06-08-2025_07_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25712594 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_P25712594_06-08-2025_07_19_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25712645, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25712646, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25712647, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25712648, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25712649, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25712650, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25712651, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25712652, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25712653, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25712654, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25712655, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25712656, 'pht': 3726}}" where mtr_portfolio_id = 25712594 and dashboard_run_id = 2079697 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`=25712594 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646506, 0.038903970752075814, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25712594_06-08-2025_07_19_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 25712645, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25712646, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25712647, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25712648, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25712649, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25712650, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25712651, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25712652, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25712653, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25712654, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25712655, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25712656, '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 = 25713396 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': 3456321, 'mtr_portfolio_id': 25713396, 'created_at': datetime.datetime(2025, 8, 6, 7, 32, 59), 'result': '0.03518729164891487', 'result_long': None, 'result_double': None}] Qualite : 0.03518729164891487 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25713396 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25713396_06-08-2025_07_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25713396 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_P25713396_06-08-2025_07_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25713439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25713440, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25713441, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25713442, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25713443, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25713444, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25713445, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25713446, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25713447, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25713448, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25713449, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25713450, 'pht': 3726}}" where mtr_portfolio_id = 25713396 and dashboard_run_id = 2079697 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`=25713396 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646507, 0.03518729164891487, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25713396_06-08-2025_07_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25713439, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25713440, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25713441, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25713442, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25713443, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25713444, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25713445, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25713446, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25713447, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25713448, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25713449, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25713450, '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 = 25714071 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': 3456516, 'mtr_portfolio_id': 25714071, 'created_at': datetime.datetime(2025, 8, 6, 7, 48, 57), 'result': '0.08508265590742552', 'result_long': None, 'result_double': None}] Qualite : 0.08508265590742552 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25714071 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25714071_06-08-2025_07_48_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25714071 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_P25714071_06-08-2025_07_48_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25714115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25714116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25714117, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25714118, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25714119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25714120, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25714121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25714122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25714123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25714124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25714125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25714126, 'pht': 3726}}" where mtr_portfolio_id = 25714071 and dashboard_run_id = 2079697 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`=25714071 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646508, 0.08508265590742552, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25714071_06-08-2025_07_48_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25714115, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25714116, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25714117, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25714118, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25714119, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25714120, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25714121, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25714122, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25714123, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25714124, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25714125, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25714126, '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 = 25714815 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': 3456732, 'mtr_portfolio_id': 25714815, 'created_at': datetime.datetime(2025, 8, 6, 8, 2, 59), 'result': '0.05166897657385468', 'result_long': None, 'result_double': None}] Qualite : 0.05166897657385468 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25714815 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25714815_06-08-2025_08_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25714815 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_P25714815_06-08-2025_08_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25714849, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25714850, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25714851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25714852, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25714853, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25714854, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25714855, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25714856, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25714857, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25714858, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25714859, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25714860, 'pht': 3726}}" where mtr_portfolio_id = 25714815 and dashboard_run_id = 2079699 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`=25714815 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646509, 0.05166897657385468, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25714815_06-08-2025_08_03_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25714849, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25714850, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25714851, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25714852, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25714853, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25714854, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25714855, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25714856, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25714857, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25714858, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25714859, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25714860, '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 = 25715250 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': 3456909, 'mtr_portfolio_id': 25715250, 'created_at': datetime.datetime(2025, 8, 6, 8, 16, 56), 'result': '0.02547778533747747', 'result_long': None, 'result_double': None}] Qualite : 0.02547778533747747 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25715250 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25715250_06-08-2025_08_16_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25715250 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_P25715250_06-08-2025_08_16_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25715310, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25715311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25715312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25715313, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25715314, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25715315, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25715316, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25715317, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25715318, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25715319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25715320, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25715321, 'pht': 3726}}" where mtr_portfolio_id = 25715250 and dashboard_run_id = 2079699 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`=25715250 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646510, 0.02547778533747747, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25715250_06-08-2025_08_16_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25715310, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25715311, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25715312, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25715313, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25715314, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25715315, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25715316, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25715317, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25715318, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25715319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25715320, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25715321, '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 = 25715907 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': 3457107, 'mtr_portfolio_id': 25715907, 'created_at': datetime.datetime(2025, 8, 6, 8, 32, 58), 'result': '0.034866962245711265', 'result_long': None, 'result_double': None}] Qualite : 0.034866962245711265 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25715907 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25715907_06-08-2025_08_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25715907 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_P25715907_06-08-2025_08_32_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25715955, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25715956, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25715957, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25715958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25715959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25715960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25715961, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25715962, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25715963, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25715964, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25715965, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25715966, 'pht': 3726}}" where mtr_portfolio_id = 25715907 and dashboard_run_id = 2079699 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`=25715907 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13646511, 0.034866962245711265, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25715907_06-08-2025_08_32_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25715955, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25715956, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25715957, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25715958, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25715959, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25715960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25715961, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25715962, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25715963, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25715964, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25715965, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25715966, '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 (25707608,25707669,25707918,25708197,25708353,25708783,25708897,25709121,25709573,25709782,25710076,25710464,25710893,25711330,25711683,25712215,25712594,25713396,25714071,25714815,25715250,25715907) result : ((1375399408,), (1375399410,), (1375399412,), (1375399415,), (1375399490,), (1375399510,), (1375399530,), (1375399577,), (1375399600,), (1375399610,), (1375399612,), (1375399614,), (1375399638,), (1375399633,), (1375399635,), (1375399654,), (1375399714,), (1375399749,), (1375399763,), (1375399785,), (1375399817,), (1375399822,), (1375399924,), (1375400767,), (1375400766,), (1375400802,), (1375400817,), (1375400884,), (1375401725,), (1375401753,), (1375401754,), (1375401765,), (1375401845,), (1375401843,), (1375401892,), (1375401929,), (1375401966,), (1375402077,), (1375402078,), (1375402147,), (1375402149,), (1375402172,), (1375402293,), (1375402292,), (1375402328,), (1375402329,), (1375402349,), (1375402377,), (1375402378,), (1375402379,), (1375402446,), (1375402447,), (1375402517,), (1375402587,), (1375405062,), (1375405063,), (1375405104,), (1375405105,), (1375405142,), (1375405188,), (1375405219,), (1375405221,), (1375405364,), (1375405363,), (1375405420,), (1375405422,), (1375405424,), (1375405426,), (1375405489,), (1375405551,), (1375405575,), (1375405591,), (1375405637,), (1375405640,), (1375405686,), (1375406723,), (1375406802,), (1375406829,), (1375407905,), (1375407922,), (1375407945,), (1375408219,), (1375408221,), (1375408251,), (1375408320,), (1375408321,), (1375408323,), (1375410226,), (1375410176,), (1375411525,), (1375411548,), (1375411552,), (1375411588,), (1375411590,), (1375411604,), (1375411605,), (1375411607,), (1375411608,), (1375411612,), (1375411631,), (1375411632,), (1375411633,), (1375411636,), (1375411654,), (1375411684,), (1375411714,), (1375411734,), (1375411735,), (1375411751,), (1375411752,), (1375411753,), (1375411771,), (1375411779,), (1375411780,), (1375411781,), (1375411782,), (1375411784,), (1375411786,), (1375411791,), (1375411801,), (1375411797,), (1375411799,), (1375411823,), (1375411825,), (1375411827,), (1375411829,), (1375411832,), (1375411846,), (1375411847,), (1375411848,), (1375411850,), (1375411858,), (1375411859,), (1375411860,), (1375411861,), (1375411881,), (1375411882,), (1375411883,), (1375411885,), (1375411911,), (1375411912,), (1375411913,), (1375411915,), (1375411917,), (1375411937,), (1375411938,), (1375411939,), (1375411953,), (1375412006,), (1375412009,), (1375412012,), (1375412017,), (1375412021,), (1375412023,), (1375412031,), (1375412034,), (1375412037,), (1375412040,), (1375412041,), (1375412042,), (1375412044,), (1375412056,), (1375412057,), (1375412058,), (1375412069,), (1375412070,), (1375412071,), (1375412074,), (1375412077,), (1375412091,), (1375412092,), (1375412093,), (1375412096,), (1375412103,), (1375412141,), (1375412142,), (1375412143,), (1375412144,), (1375412145,), (1375412157,), (1375412160,), (1375412161,), (1375412197,), (1375412180,), (1375412185,), (1375412189,), (1375412193,), (1375412208,), (1375412210,), (1375412212,), (1375412215,), (1375412217,), (1375412219,), (1375412226,), (1375412227,), (1375412228,), (1375412240,), (1375412241,), (1375412242,), (1375412244,), (1375412254,), (1375412255,), (1375412256,), (1375412258,), (1375412260,), (1375412264,), (1375412266,), (1375412268,), (1375412270,), (1375412273,), (1375412277,), (1375412290,), (1375412292,), (1375412294,), (1375412323,), (1375412324,), (1375412325,), (1375412327,), (1375412342,), (1375412343,), (1375412344,), (1375412346,), (1375412364,), (1375412365,), (1375412366,), (1375412415,), (1375412416,), (1375412417,), (1375412419,), (1375412436,), (1375412437,), (1375412438,), (1375412440,), (1375412443,), (1375412457,), (1375412458,), (1375412459,), (1375412460,), (1375412462,), (1375412483,), (1375412484,), (1375412485,), (1375412487,), (1375412489,), (1375412493,), (1375412506,), (1375412508,), (1375412509,), (1375412530,), (1375412556,), (1375412558,), (1375412560,), (1375412579,), (1375412580,), (1375412581,), (1375412583,), (1375412606,), (1375412608,), (1375412610,), (1375412630,), (1375412633,), (1375412688,), (1375412692,), (1375412695,), (1375412697,), (1375412715,), (1375412722,), (1375412729,), (1375412757,), (1375412758,), (1375412787,), (1375412804,), (1375412852,), (1375412859,), (1375412864,), (1375412885,), (1375412887,), (1375412888,), (1375412890,), (1375412892,), (1375412909,), (1375412912,), (1375412915,), (1375412917,), (1375412921,), (1375413619,), (1375413593,), (1375413595,), (1375413596,), (1375413599,), (1375414118,), (1375414157,), (1375414194,), (1375414219,), (1375414410,), (1375414433,), (1375414434,), (1375414435,), (1375414437,), (1375414451,), (1375414453,), (1375414455,), (1375414457,), (1375414460,), (1375414474,), (1375414476,), (1375414478,), (1375414479,), (1375414481,), (1375414484,), (1375414590,), (1375414613,), (1375414636,), (1375414661,), (1375414962,), (1375414985,), (1375415006,), (1375415029,), (1375415051,), (1375415075,), (1375415305,), (1375415306,), (1375415307,), (1375415309,), (1375415313,), (1375415480,), (1375415638,), (1375415646,), (1375415650,), (1375415680,), (1375415688,), (1375415690,), (1375415692,), (1375415695,), (1375415711,), (1375415712,), (1375415713,), (1375415715,), (1375415717,), (1375415720,), (1375415737,), (1375415738,), (1375415741,), (1375415745,), (1375415748,), (1375415752,), (1375415759,), (1375415762,), (1375415763,), (1375415764,), (1375415765,), (1375415776,), (1375415766,), (1375415768,), (1375415772,), (1375415793,), (1375415794,), (1375415795,), (1375415797,), (1375415800,), (1375415803,), (1375415821,), (1375415822,), (1375415854,), (1375415855,), (1375415870,), (1375415871,), (1375415872,), (1375415874,), (1375415911,), (1375415912,), (1375415913,), (1375415938,), (1375415939,), (1375415947,), (1375415964,), (1375415971,), (1375415987,), (1375415988,), (1375415989,), (1375416030,), (1375416034,), (1375416035,), (1375416037,), (1375416039,), (1375416043,), (1375416065,), (1375416070,), (1375416071,), (1375416073,), (1375416076,), (1375416093,), (1375416095,), (1375416097,), (1375416099,), (1375416103,), (1375416109,), (1375416132,), (1375416134,), (1375416136,), (1375416166,), (1375416169,), (1375416171,), (1375416173,), (1375416176,), (1375416198,), (1375416203,), (1375416209,), (1375416211,), (1375416214,), (1375416216,), (1375416242,), (1375416245,), (1375416246,), (1375416249,), (1375416302,), (1375416289,), (1375416294,), (1375416295,), (1375416297,), (1375416300,), (1375416318,), (1375416321,), (1375416322,), (1375416325,), (1375416328,), (1375416346,), (1375416348,), (1375416351,), (1375416352,), (1375416355,), (1375416359,), (1375416371,), (1375416373,), (1375416375,), (1375416379,), (1375416383,), (1375416387,), (1375416404,), (1375416408,), (1375416411,), (1375416414,), (1375416416,), (1375416419,), (1375416421,), (1375416422,), (1375416423,), (1375416430,), (1375416433,), (1375416436,), (1375416446,), (1375416450,), (1375416451,), (1375416452,), (1375416454,), (1375416456,), (1375416457,), (1375416460,), (1375416464,), (1375416493,), (1375416509,), (1375416516,), (1375416523,), (1375416526,), (1375416537,), (1375416539,), (1375416541,), (1375416543,), (1375416546,), (1375416569,), (1375416571,), (1375416572,), (1375416575,), (1375416580,), (1375416584,), (1375416602,), (1375416605,), (1375416608,), (1375416612,), (1375416615,), (1375416637,), (1375416639,), (1375416641,), (1375416642,), (1375416646,), (1375416651,), (1375416663,), (1375416665,), (1375416667,), (1375416670,), (1375416701,), (1375416703,), (1375416705,), (1375416706,), (1375416709,), (1375416714,), (1375416734,), (1375416745,), (1375416748,), (1375416750,), (1375416755,), (1375416759,), (1375416779,), (1375416784,), (1375416786,), (1375416830,), (1375416810,), (1375416817,), (1375416821,), (1375416824,), (1375416828,), (1375416850,), (1375416853,), (1375416855,), (1375416857,), (1375416859,), (1375416877,), (1375416880,), (1375416882,), (1375416884,), (1375416887,), (1375416892,), (1375416913,), (1375416916,), (1375416918,), (1375416921,), (1375416942,), (1375416951,), (1375416957,), (1375416960,), (1375416964,), (1375416967,), (1375416994,), (1375416999,), (1375417001,), (1375417003,), (1375417009,), (1375417012,), (1375417025,), (1375417027,), (1375417028,), (1375417055,), (1375417059,), (1375417062,), (1375417068,), (1375417095,), (1375417099,), (1375417103,), (1375417106,), (1375417110,), (1375417114,), (1375417134,), (1375417139,), (1375417141,), (1375417145,), (1375417148,), (1375417150,), (1375417158,), (1375417160,), (1375417162,), (1375417164,), (1375417167,), (1375417170,), (1375417186,), (1375417189,), (1375417192,), (1375417197,), (1375417202,), (1375417217,), (1375417220,), (1375417223,), (1375417258,), (1375417261,), (1375417264,), (1375417268,), (1375417408,), (1375417436,), (1375417462,), (1375417487,), (1375417512,), (1375417540,), (1375417588,), (1375417612,), (1375417641,), (1375417645,), (1375417708,), (1375417699,), (1375417702,), (1375417735,), (1375417738,), (1375417741,), (1375417744,), (1375417748,), (1375417754,), (1375417774,), (1375417776,), (1375417778,), (1375417780,), (1375417784,), (1375418037,), (1375418060,), (1375418085,), (1375418110,), (1375418136,), (1375418164,), (1375418224,), (1375418250,), (1375418277,), (1375418301,), (1375418326,), (1375418478,), (1375418481,), (1375418485,), (1375418490,), (1375418592,), (1375418616,), (1375418640,), (1375418667,), (1375419052,), (1375419078,), (1375419118,), (1375419147,), (1375419268,), (1375419282,), (1375419306,), (1375419331,), (1375419347,), (1375419398,), (1375419403,), (1375419421,), (1375419425,), (1375419452,), (1375419480,), (1375419737,), (1375419750,), (1375419754,), (1375419756,), (1375419812,), (1375419814,), (1375419824,), (1375419831,), (1375420032,), (1375420037,), (1375420044,), (1375420070,), (1375420147,), (1375420157,), (1375420184,), (1375420201,), (1375420206,), (1375420210,), (1375420353,), (1375420356,), (1375420358,), (1375420361,), (1375420404,), (1375420388,), (1375420392,), (1375420395,), (1375420399,), (1375420504,), (1375420514,), (1375420517,), (1375420550,), (1375420557,), (1375420798,), (1375420805,), (1375420823,), (1375420833,), (1375420852,), (1375420877,), (1375420998,), (1375421000,), (1375421002,), (1375421096,), (1375421100,), (1375421103,), (1375421156,), (1375421256,), (1375421259,), (1375421262,), (1375421265,), (1375421470,), (1375421477,), (1375421492,), (1375421505,), (1375421515,), (1375421521,), (1375421626,), (1375421629,), (1375421631,), (1375421636,), (1375421657,), (1375421677,), (1375421920,), (1375421946,), (1375421971,), (1375421987,), (1375421992,), (1375422000,), (1375422020,), (1375422030,), (1375422032,), (1375422067,), (1375422107,), (1375422165,), (1375422182,), (1375422187,), (1375422204,), (1375422279,), (1375422284,), (1375422297,), (1375422400,), (1375422403,), (1375422406,), (1375422409,), (1375422443,), (1375422445,), (1375422488,), (1375422491,), (1375422494,), (1375422662,), (1375422655,), (1375422657,), (1375422659,), (1375422943,), (1375422952,), (1375422976,), (1375423280,), (1375423283,), (1375423286,), (1375423298,), (1375423351,), (1375423355,), (1375423386,), (1375423572,), (1375423576,), (1375423604,), (1375423608,), (1375423612,), (1375423616,), (1375423621,), (1375423626,), (1375423646,), (1375423650,), (1375423654,), (1375423657,), (1375423760,), (1375423764,), (1375423770,), (1375423772,), (1375423776,), (1375423802,), (1375423805,), (1375423809,), (1375423812,), (1375423818,), (1375423841,), (1375423843,), (1375423845,), (1375423847,), (1375423852,), (1375423857,), (1375423887,), (1375423890,), (1375423895,), (1375423900,), (1375423906,), (1375424248,), (1375424295,), (1375424344,), (1375424402,), (1375424443,), (1375424811,), (1375424836,), (1375424852,), (1375424869,), (1375424901,), (1375425085,), (1375425087,), (1375425089,), (1375425112,), (1375425115,), (1375425117,), (1375425120,), (1375425123,), (1375425126,), (1375425164,), (1375425143,), (1375425152,), (1375425155,), (1375425160,), (1375425194,), (1375425203,), (1375425229,), (1375425255,), (1375425299,), (1375425304,), (1375425310,), (1375425359,), (1375425380,), (1375425386,), (1375425391,), (1375425476,), (1375425478,), (1375425479,), (1375425482,), (1375425524,), (1375425527,), (1375425531,), (1375425537,), (1375425541,), (1375425545,), (1375425560,), (1375425566,), (1375425567,), (1375425571,), (1375425578,), (1375425583,), (1375425600,), (1375425602,), (1375425604,), (1375425608,), (1375425637,), (1375425639,), (1375425641,), (1375425643,), (1375425649,), (1375425654,), (1375425695,), (1375426954,), (1375426978,), (1375427115,), (1375427141,), (1375427175,), (1375427202,), (1375427227,), (1375427338,), (1375427314,), (1375427775,), (1375427800,), (1375427822,), (1375427852,), (1375427906,), (1375428388,), (1375428433,), (1375428481,), (1375428586,), (1375428608,), (1375428633,), (1375428658,), (1375428684,), (1375428709,), (1375428857,), (1375428880,), (1375428896,), (1375428897,), (1375428902,), (1375428984,), (1375428988,), (1375428990,), (1375428993,), (1375429024,), (1375429026,), (1375429027,), (1375429029,), (1375429031,), (1375429063,), (1375429074,), (1375429076,), (1375429078,), (1375429081,), (1375429085,), (1375429176,), (1375429179,), (1375429219,), (1375429220,), (1375429225,), (1375429258,), (1375429275,), (1375429304,), (1375429330,), (1375429334,), (1375429343,), (1375429400,), (1375429401,), (1375429402,), (1375429410,), (1375429465,), (1375429476,), (1375429482,), (1375429502,), (1375429533,), (1375429535,), (1375429536,), (1375429538,), (1375429541,), (1375429569,), (1375429573,), (1375429583,), (1375429585,), (1375429588,), (1375429592,), (1375429616,), (1375429609,), (1375429613,), (1375429696,), (1375429703,), (1375429705,), (1375429708,), (1375429711,), (1375429714,), (1375429842,), (1375429885,), (1375429888,), (1375429890,), (1375429892,), (1375429894,), (1375429988,), (1375429993,), (1375429995,), (1375430250,), (1375430278,), (1375430302,), (1375430591,), (1375430593,), (1375430595,), (1375430597,), (1375430600,), (1375430622,), (1375430625,), (1375430628,), (1375430654,), (1375430656,), (1375430658,), (1375430702,), (1375430794,), (1375430796,), (1375430798,), (1375430800,), (1375430824,), (1375430832,), (1375430835,), (1375430840,), (1375430844,), (1375430858,), (1375430860,), (1375430925,), (1375430928,), (1375430932,), (1375431011,), (1375431013,), (1375431015,), (1375431193,), (1375431194,), (1375431195,), (1375431231,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'06082025': {'nb_upload': 53, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25715907]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1375431231] map_info['map_portfolio_photo'] : {25715907: [1375431231, 1375431195, 1375431194, 1375431193, 1375431015, 1375431013, 1375431011, 1375430932, 1375430928, 1375430925, 1375430860, 1375430858, 1375430844, 1375430840, 1375430835, 1375430832, 1375430824, 1375430800, 1375430798, 1375430796, 1375430794, 1375430702, 1375430658, 1375430656, 1375430654, 1375430628, 1375430625, 1375430622, 1375430600, 1375430597, 1375430595, 1375430593, 1375430591, 1375430302, 1375430278, 1375430250, 1375429995, 1375429993, 1375429988, 1375429894, 1375429892, 1375429890, 1375429888, 1375429885, 1375429842, 1375429714, 1375429711, 1375429708, 1375429705, 1375429703, 1375429696, 1375429613, 1375429609]} final : True mtd_id 4302 list_pids : [1375431231] Looping around the photos to save general results len do output : 1 /25715907Didn'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, '3457107') ('4302', '25715907', '1375431231', None, None, None, None, None, '3457107') 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, '25715907', 'None', None, None, None, None, '3457107'), ('4302', '25715907', '1375431231', None, None, None, None, None, '3457107')] time used for this insertion : 0.012394189834594727 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.170539617538452 time spend to save output : 0.012633800506591797 total time spend for step 5 : 2.183173418045044 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 (3457107) 1.83user 2.35system 0:08.04elapsed 52%CPU (0avgtext+0avgdata 155996maxresident)k 904inputs+3080outputs (4major+61874minor)pagefaults 0swaps