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 : 2288508 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 (4000969) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4000969) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186038 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4000969'] with mtr_portfolio_ids : ['28186038'] and first list_photo_ids : [] new path : /proc/2288508/ Name: python3 Umask: 0002 State: R (running) Tgid: 2288508 Ngid: 0 Pid: 2288508 PPid: 2288507 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2288508 NSpid: 2288508 NSpgid: 2287755 NSsid: 2287755 VmPeak: 1106908 kB VmSize: 1106884 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99156 kB VmRSS: 99156 kB RssAnon: 59908 kB RssFile: 39248 kB RssShmem: 0 kB VmData: 865636 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 564 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 47 nonvoluntary_ctxt_switches: 113 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2288508', 'Ngid': '0', 'Pid': '2288508', 'PPid': '2288507', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2288508', 'NSpid': '2288508', 'NSpgid': '2287755', 'NSsid': '2287755', 'VmPeak': '1106908 kB', 'VmSize': '1106884 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99156 kB', 'VmRSS': '99156 kB', 'RssAnon': '59908 kB', 'RssFile': '39248 kB', 'RssShmem': '0 kB', 'VmData': '865636 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '564 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '47', 'nonvoluntary_ctxt_switches': '113'} ('datou_batch_current', '2288508', '1106908', '0', '1106884', '865636', '99156', b'', 'marlene', '4000969') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (28186038) 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 (4000969 ) ) 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 (28186038) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1392622575, 'portfolio_id': 28186038}, {'photo_id': 1392619794, 'portfolio_id': 28186038}, {'photo_id': 1392619776, 'portfolio_id': 28186038}, {'photo_id': 1392619771, 'portfolio_id': 28186038}, {'photo_id': 1392619664, 'portfolio_id': 28186038}, {'photo_id': 1392619652, 'portfolio_id': 28186038}, {'photo_id': 1392619646, 'portfolio_id': 28186038}, {'photo_id': 1392619427, 'portfolio_id': 28186038}, {'photo_id': 1392618834, 'portfolio_id': 28186038}, {'photo_id': 1392617861, 'portfolio_id': 28186038}, {'photo_id': 1392617859, 'portfolio_id': 28186038}, {'photo_id': 1392617853, 'portfolio_id': 28186038}] map_portfolio_id_photo_id: {28186038: [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853]} ##### 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.014925479888916016 #### 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 Nov 5 06:14:28 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 (28186038) 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 : 28186038 get user id for portfolio 28186038 get sub ptf for main ptf 28186038, type 3726 and hashtags ['papier', 'plastique', 'cartonnette', 'kraft', 'Carton_brun', 'metal', 'flou', 'Carton_gris', 'environnement', 'Teint_Dans_La_Masse', 'mal_croppe', 'autre_refus'] 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`=28186038 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','cartonnette','kraft','Carton_brun','metal','flou','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','autre_refus')) 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`=28186038 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','cartonnette','kraft','Carton_brun','metal','flou','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 28186038, 'sub_port_id': 28186039, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062681, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'mal_croppe': {'main_port_id': 28186038, 'sub_port_id': 28186040, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062682, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'Carton_brun': {'main_port_id': 28186038, 'sub_port_id': 28186041, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062683, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'papier': {'main_port_id': 28186038, 'sub_port_id': 28186042, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062684, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'kraft': {'main_port_id': 28186038, 'sub_port_id': 28186043, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062685, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'environnement': {'main_port_id': 28186038, 'sub_port_id': 28186044, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062686, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'Carton_gris': {'main_port_id': 28186038, 'sub_port_id': 28186045, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062687, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'flou': {'main_port_id': 28186038, 'sub_port_id': 28186046, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062688, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 28186038, 'sub_port_id': 28186047, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062689, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'autre_refus': {'main_port_id': 28186038, 'sub_port_id': 28186048, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062690, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'metal': {'main_port_id': 28186038, 'sub_port_id': 28186049, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062691, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}, 'plastique': {'main_port_id': 28186038, 'sub_port_id': 28186050, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062692, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186039 , 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=28186038 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 (28186039) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186040 , 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=28186038 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 (28186040) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186041 , 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=28186038 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 (28186041) result : ((1392618210,), (1392618212,), (1392619355,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186042 , 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=28186038 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 (28186042) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186043 , 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=28186038 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 (28186043) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186044 , 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=28186038 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 (28186044) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186045 , 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=28186038 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 (28186045) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186046 , 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=28186038 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 (28186046) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186047 , 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=28186038 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 (28186047) result : ((1392618198,), (1392619354,), (1392619862,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186048 , 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=28186038 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 (28186048) result : ((1392619861,), (1392619864,), (1392619865,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186049 , 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=28186038 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 (28186049) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 28186050 , 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=28186038 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 (28186050) result : ((1392619866,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (28186038) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,)) select distinct(cspi.sub_photo_id) from MTRPhoto.crop_hashtag_ids chi, MTRPhoto.crop_sub_photo_ids cspi where chi.type=3726 and chi.photo_id in () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=28186038 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','cartonnette','kraft','Carton_brun','metal','flou','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','autre_refus')) 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`=28186038 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','plastique','cartonnette','kraft','Carton_brun','metal','flou','Carton_gris','environnement','Teint_Dans_La_Masse','mal_croppe','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 28186038, 'sub_port_id': 28186051, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062693, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'mal_croppe': {'main_port_id': 28186038, 'sub_port_id': 28186052, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062694, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'Carton_brun': {'main_port_id': 28186038, 'sub_port_id': 28186053, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062695, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'papier': {'main_port_id': 28186038, 'sub_port_id': 28186054, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062696, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'kraft': {'main_port_id': 28186038, 'sub_port_id': 28186055, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062697, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'environnement': {'main_port_id': 28186038, 'sub_port_id': 28186056, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062698, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'Carton_gris': {'main_port_id': 28186038, 'sub_port_id': 28186057, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062699, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'flou': {'main_port_id': 28186038, 'sub_port_id': 28186058, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062700, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'Teint_Dans_La_Masse': {'main_port_id': 28186038, 'sub_port_id': 28186059, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062701, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'autre_refus': {'main_port_id': 28186038, 'sub_port_id': 28186060, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062702, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'metal': {'main_port_id': 28186038, 'sub_port_id': 28186061, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062703, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 19, 33), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}, 'plastique': {'main_port_id': 28186038, 'sub_port_id': 28186062, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19062704, 'last_updated_at': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 11, 5, 0, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 11, 5, 0, 19, 33)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186051,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186039 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186052,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186040 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186053,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186041 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186054,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186042 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186055,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186043 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186056,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186044 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186057,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186045 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186058,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186046 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186059,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186047 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186060,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186048 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186061,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186049 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 28186062,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 28186050 lien utilise dans velours : https://marlene.fotonower.com/velours/28186051,28186052,28186053,28186054,28186055,28186056,28186057,28186058,28186059,28186060,28186061,28186062?tags=cartonnette,mal_croppe,Carton_brun,papier,kraft,environnement,Carton_gris,flou,Teint_Dans_La_Masse,autre_refus,metal,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28186038]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] map_info['map_portfolio_photo'] : {28186038: [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853]} final : False mtd_id 4302 list_pids : [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] Looping around the photos to save general results len do output : 1 /28186038. 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, '4000969') ('4302', '28186038', '1392622575', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619794', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619776', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619771', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619664', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619652', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619646', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619427', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392618834', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617861', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617859', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617853', None, None, None, None, None, '4000969') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '28186038', "{'cartonnette': 28186039, 'mal_croppe': 28186040, 'Carton_brun': 28186041, 'papier': 28186042, 'kraft': 28186043, 'environnement': 28186044, 'Carton_gris': 28186045, 'flou': 28186046, 'Teint_Dans_La_Masse': 28186047, 'autre_refus': 28186048, 'metal': 28186049, 'plastique': 28186050}", None, None, None, None, '4000969'), ('4302', '28186038', '1392622575', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619794', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619776', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619771', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619664', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619652', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619646', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619427', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392618834', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617861', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617859', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617853', None, None, None, None, None, '4000969')] time used for this insertion : 0.01471710205078125 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.512610912322998 time spend to save output : 0.015002965927124023 total time spend for step 1 : 1.527613878250122 step2:final Wed Nov 5 06:14:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (28186038) 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 28186038 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1392617861,1392617859,1392618834,1392617853,1392619427,1392619664,1392619652,1392619646,1392619794,1392619776,1392619771,1392622575); 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([28186038]) Inside saveOutput : final : False verbose : True original output for save of step final : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} new output for save of step final : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] map_info['map_portfolio_photo'] : {28186038: [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853]} final : False mtd_id 4302 list_pids : [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] Looping around the photos to save general results len do output : 12 /1392622575.Didn't retrieve data . /1392619794.Didn't retrieve data . /1392619776.Didn't retrieve data . /1392619771.Didn't retrieve data . /1392619664.Didn't retrieve data . /1392619652.Didn't retrieve data . /1392619646.Didn't retrieve data . /1392619427.Didn't retrieve data . /1392618834.Didn't retrieve data . /1392617861.Didn't retrieve data . /1392617859.Didn't retrieve data . /1392617853.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, '4000969') ('4302', '28186038', '1392622575', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619794', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619776', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619771', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619664', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619652', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619646', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619427', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392618834', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617861', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617859', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617853', None, None, None, None, None, '4000969') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 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', '28186038', '1392622575', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392619794', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392619776', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392619771', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392619664', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392619652', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392619646', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392619427', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392618834', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392617861', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392617859', '0.10490548635916874', None, None, None, None, '4000969'), ('4302', '28186038', '1392617853', '0.10490548635916874', None, None, None, None, '4000969')] time used for this insertion : 0.01373434066772461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06466221809387207 time spend to save output : 0.01435399055480957 total time spend for step 2 : 0.07901620864868164 step3:velours_tree Wed Nov 5 06:14:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {28186038: [{'cartonnette': 28186039, 'mal_croppe': 28186040, 'Carton_brun': 28186041, 'papier': 28186042, 'kraft': 28186043, 'environnement': 28186044, 'Carton_gris': 28186045, 'flou': 28186046, 'Teint_Dans_La_Masse': 28186047, 'autre_refus': 28186048, 'metal': 28186049, 'plastique': 28186050}]} input_args_next_step : {28186038: ()} output_args : {28186038: [{'cartonnette': 28186039, 'mal_croppe': 28186040, 'Carton_brun': 28186041, 'papier': 28186042, 'kraft': 28186043, 'environnement': 28186044, 'Carton_gris': 28186045, 'flou': 28186046, 'Teint_Dans_La_Masse': 28186047, 'autre_refus': 28186048, 'metal': 28186049, 'plastique': 28186050}]} args : 28186038 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 : ({'cartonnette': 28186039, 'mal_croppe': 28186040, 'Carton_brun': 28186041, 'papier': 28186042, 'kraft': 28186043, 'environnement': 28186044, 'Carton_gris': 28186045, 'flou': 28186046, 'Teint_Dans_La_Masse': 28186047, 'autre_refus': 28186048, 'metal': 28186049, 'plastique': 28186050},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28186038) 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([28186038]) 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.26848769187927246 time spend to save output : 3.886222839355469e-05 total time spend for step 3 : 0.268526554107666 step4:send_mail_cod Wed Nov 5 06:14:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} input_args_next_step : {1392622575: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392622575 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392619794 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392619776 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392619771 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392619664 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392619652 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392619646 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392619427 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392618834 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392617861 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392617859 depend.output_id : 0 input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ()} output_args : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',)} args : 1392617853 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {28186038: [{'cartonnette': 28186039, 'mal_croppe': 28186040, 'Carton_brun': 28186041, 'papier': 28186042, 'kraft': 28186043, 'environnement': 28186044, 'Carton_gris': 28186045, 'flou': 28186046, 'Teint_Dans_La_Masse': 28186047, 'autre_refus': 28186048, 'metal': 28186049, 'plastique': 28186050}]} input_args_next_step : {1392622575: ('0.10490548635916874',), 1392619794: ('0.10490548635916874',), 1392619776: ('0.10490548635916874',), 1392619771: ('0.10490548635916874',), 1392619664: ('0.10490548635916874',), 1392619652: ('0.10490548635916874',), 1392619646: ('0.10490548635916874',), 1392619427: ('0.10490548635916874',), 1392618834: ('0.10490548635916874',), 1392617861: ('0.10490548635916874',), 1392617859: ('0.10490548635916874',), 1392617853: ('0.10490548635916874',), 28186038: ()} output_args : {28186038: [{'cartonnette': 28186039, 'mal_croppe': 28186040, 'Carton_brun': 28186041, 'papier': 28186042, 'kraft': 28186043, 'environnement': 28186044, 'Carton_gris': 28186045, 'flou': 28186046, 'Teint_Dans_La_Masse': 28186047, 'autre_refus': 28186048, 'metal': 28186049, 'plastique': 28186050}]} args : 28186038 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 :13, first value : ('0.10490548635916874',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28186038) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos_view ph WHERE photo_id IN (1392622575,1392619794,1392619776,1392619771,1392619664,1392619652,1392619646,1392619427,1392618834,1392617861,1392617859,1392617853) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1392617853 begin to download photo : 1392618834 begin to download photo : 1392619652 begin to download photo : 1392619776 download finish for photo 1392619652 begin to download photo : 1392619664 download finish for photo 1392618834 begin to download photo : 1392619427 download finish for photo 1392617853 begin to download photo : 1392617859 download finish for photo 1392619776 begin to download photo : 1392619794 download finish for photo 1392619427 begin to download photo : 1392619646 download finish for photo 1392619664 begin to download photo : 1392619771 download finish for photo 1392619794 begin to download photo : 1392622575 download finish for photo 1392617859 begin to download photo : 1392617861 download finish for photo 1392619646 download finish for photo 1392622575 download finish for photo 1392617861 download finish for photo 1392619771 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette281860391762319671/ imagette281860401762319671/ imagette281860431762319671/ imagette281860461762319671/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P28186038_05-11-2025_06_14_31.pdf 28186039 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186039 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette281860391762319671 28186040 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186040 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette281860401762319671 28186043 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186043 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette281860431762319671 28186046 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186046 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette281860461762319671 28186048 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186048 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392619861: '1762298965_3877979_1392619794_60ddcefb0c81c6f8ca12324b28a64fec_rle_crop_4020898534_0.png', 1392619864: '1762298946_3877913_1392619776_048a5cc3880162109d95464e8b4ff81c_rle_crop_4020898543_0.png', 1392619865: '1762298946_3877913_1392619776_048a5cc3880162109d95464e8b4ff81c_rle_crop_4020898548_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/3ad767ff5e5a56be49ecd0d0b042cc12_37238350.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/d6ba003709455b72aefdca9ef2e97098_66782981.png change filename to text .imagette281860481762319671/ imagette281860481762319671/1762298946_3877913_1392619776_048a5cc3880162109d95464e8b4ff81c_rle_crop_4020898548_0.png.png imagette281860481762319671/1762298965_3877979_1392619794_60ddcefb0c81c6f8ca12324b28a64fec_rle_crop_4020898534_0.png.png imagette281860481762319671/1762298946_3877913_1392619776_048a5cc3880162109d95464e8b4ff81c_rle_crop_4020898543_0.png.png imagette281860491762319671/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/7e3ebf18949ba0e0e08160d070c88bad_83887597.png imagette281860481762319671 28186049 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186049 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette281860491762319671 28186050 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186050 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392619866: '1762298946_3877913_1392619771_d3b89c5cd75e436edf35b9f54ff65267_rle_crop_4020898575_0.png'} change filename to text .imagette281860501762319671/ imagette281860501762319671/1762298946_3877913_1392619771_d3b89c5cd75e436edf35b9f54ff65267_rle_crop_4020898575_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/7c5c9996371a04e64aee69f02c0e68c0_96564243.png imagette281860501762319671 28186041 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186041 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392618210: '1762298347_3862242_1392617859_e3a12ba732e7dca8302d190fda763306_rle_crop_4020892287_0.png', 1392618212: '1762298347_3862242_1392617853_344ec8ded47d4b21fb60361cbc2e6f54_rle_crop_4020892298_0.png', 1392619355: '1762298708_3870086_1392618834_f8c16d202a59fd8222f8f64a2e90db96_rle_crop_4020895739_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/3280cf855e87227777aabd8cab786cef_31971091.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/170883d17c7ab2b60914414689b942b3_29812134.png change filename to text .imagette281860411762319671/ imagette281860411762319671/1762298347_3862242_1392617859_e3a12ba732e7dca8302d190fda763306_rle_crop_4020892287_0.png.png imagette281860411762319671/1762298347_3862242_1392617853_344ec8ded47d4b21fb60361cbc2e6f54_rle_crop_4020892298_0.png.png imagette281860411762319671/1762298708_3870086_1392618834_f8c16d202a59fd8222f8f64a2e90db96_rle_crop_4020895739_0.png.png imagette281860451762319671/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/beb37c5f25ddadc845c07101615542f7_39726482.png imagette281860411762319671 28186045 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186045 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette281860451762319671 28186047 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186047 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1392618198: '1762298347_3862242_1392617853_344ec8ded47d4b21fb60361cbc2e6f54_rle_crop_4020892299_0.png', 1392619354: '1762298708_3870086_1392618834_f8c16d202a59fd8222f8f64a2e90db96_rle_crop_4020895741_0.png', 1392619862: '1762298946_3877913_1392619771_d3b89c5cd75e436edf35b9f54ff65267_rle_crop_4020898579_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/025e8648ab244a766c563969c5c1de14_22177766.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/2e9e65ccdb1eb0a78ee6f5273992b701_96919252.png change filename to text .imagette281860471762319671/ imagette281860471762319671/1762298946_3877913_1392619771_d3b89c5cd75e436edf35b9f54ff65267_rle_crop_4020898579_0.png.png imagette281860471762319671/1762298708_3870086_1392618834_f8c16d202a59fd8222f8f64a2e90db96_rle_crop_4020895741_0.png.png imagette281860471762319671/1762298347_3862242_1392617853_344ec8ded47d4b21fb60361cbc2e6f54_rle_crop_4020892299_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/63b164a684254d406c728f09deaf9447_25604669.png imagette281860471762319671 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=28186038 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/28186051,28186052,28186053,28186054,28186055,28186056,28186057,28186058,28186059,28186060,28186061,28186062?tags=cartonnette,mal_croppe,Carton_brun,papier,kraft,environnement,Carton_gris,flou,Teint_Dans_La_Masse,autre_refus,metal,plastique your option no_mail is active, we will not send the real mail to your client args[1392622575] : ('0.10490548635916874',) no score found for photo 1392622575 We are sending mail with results at report@fotonower.com args[1392619794] : ('0.10490548635916874',) no score found for photo 1392619794 We are sending mail with results at report@fotonower.com args[1392619776] : ('0.10490548635916874',) no score found for photo 1392619776 We are sending mail with results at report@fotonower.com args[1392619771] : ('0.10490548635916874',) no score found for photo 1392619771 We are sending mail with results at report@fotonower.com args[1392619664] : ('0.10490548635916874',) no score found for photo 1392619664 We are sending mail with results at report@fotonower.com args[1392619652] : ('0.10490548635916874',) no score found for photo 1392619652 We are sending mail with results at report@fotonower.com args[1392619646] : ('0.10490548635916874',) no score found for photo 1392619646 We are sending mail with results at report@fotonower.com args[1392619427] : ('0.10490548635916874',) no score found for photo 1392619427 We are sending mail with results at report@fotonower.com args[1392618834] : ('0.10490548635916874',) no score found for photo 1392618834 We are sending mail with results at report@fotonower.com args[1392617861] : ('0.10490548635916874',) no score found for photo 1392617861 We are sending mail with results at report@fotonower.com args[1392617859] : ('0.10490548635916874',) no score found for photo 1392617859 We are sending mail with results at report@fotonower.com args[1392617853] : ('0.10490548635916874',) no score found for photo 1392617853 We are sending mail with results at report@fotonower.com refus_total : 0.10490548635916874 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186038 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_P28186038_05-11-2025_06_14_31.pdf results_Auto_P28186038_05-11-2025_06_14_31.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28186038_05-11-2025_06_14_31.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','28186038','results_Auto_P28186038_05-11-2025_06_14_31.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28186038_05-11-2025_06_14_31.pdf','pdf','','0.13','0.10490548635916874') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28186038]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] map_info['map_portfolio_photo'] : {28186038: [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853]} final : False mtd_id 4302 list_pids : [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] 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, '4000969') ('4302', '28186038', '1392622575', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619794', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619776', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619771', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619664', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619652', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619646', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619427', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392618834', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617861', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617859', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617853', None, None, None, None, None, '4000969') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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', '28186038', '1392622575', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619794', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619776', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619771', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619664', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619652', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619646', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619427', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392618834', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617861', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617859', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617853', None, None, None, None, None, '4000969')] time used for this insertion : 0.013852834701538086 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.6261754035949707 time spend to save output : 0.014075994491577148 total time spend for step 4 : 2.640251398086548 step5:split_time_score Wed Nov 5 06:14:33 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['28186038'] 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 : [('28186038',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (28186038) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1392618834: {'path': 'temp/1762319670_2288508_1392618834_f8c16d202a59fd8222f8f64a2e90db96.jpg', 'extension': 'jpg'}, 1392619427: {'path': 'temp/1762319670_2288508_1392619427_c4fcddc1a07af5d09f2f5eadccd01774.jpg', 'extension': 'jpg'}, 1392619646: {'path': 'temp/1762319670_2288508_1392619646_5b859164560a0b041d56aeb896d4fc1e.jpg', 'extension': 'jpg'}, 1392619776: {'path': 'temp/1762319670_2288508_1392619776_048a5cc3880162109d95464e8b4ff81c.jpg', 'extension': 'jpg'}, 1392619794: {'path': 'temp/1762319670_2288508_1392619794_60ddcefb0c81c6f8ca12324b28a64fec.jpg', 'extension': 'jpg'}, 1392622575: {'path': 'temp/1762319670_2288508_1392622575_0392b671382508d167d5fd156b35d651.jpg', 'extension': 'jpg'}, 1392617853: {'path': 'temp/1762319670_2288508_1392617853_344ec8ded47d4b21fb60361cbc2e6f54.jpg', 'extension': 'jpg'}, 1392617859: {'path': 'temp/1762319670_2288508_1392617859_e3a12ba732e7dca8302d190fda763306.jpg', 'extension': 'jpg'}, 1392617861: {'path': 'temp/1762319670_2288508_1392617861_361edb67c97dc8d3dbdf446219b334b4.jpg', 'extension': 'jpg'}, 1392619652: {'path': 'temp/1762319670_2288508_1392619652_42d6a899583bf6d30ff26052509b8579.jpg', 'extension': 'jpg'}, 1392619664: {'path': 'temp/1762319670_2288508_1392619664_87dc9fb17a2209209558320df8551df7.jpg', 'extension': 'jpg'}, 1392619771: {'path': 'temp/1762319670_2288508_1392619771_d3b89c5cd75e436edf35b9f54ff65267.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 = 28186038; (('arc_en_ciel_jrm',), ('arc_en_ciel_jrm_bis',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 28186038 group by h (('00', 12),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=28186038 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 (28186038) 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 (28186038) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 05112025 28186038 Nombre de photos uploadées : 12 / 23040 (0%) 05112025 28186038 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 05112025 28186038 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1392617861, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/361edb67c97dc8d3dbdf446219b334b4.jpg', 'username': None, 'uploaded_at': 1762298298, 'text': 'image_05112025_00_16_44_10136.jpg'}, {'photo_id': 1392617859, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/e3a12ba732e7dca8302d190fda763306.jpg', 'username': None, 'uploaded_at': 1762298298, 'text': 'image_05112025_00_17_03_009139m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1392618834, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/f8c16d202a59fd8222f8f64a2e90db96.jpg', 'username': None, 'uploaded_at': 1762298587, 'text': 'image_05112025_00_17_13_010143m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1392617853, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/11/5/344ec8ded47d4b21fb60361cbc2e6f54.jpg', 'username': None, 'uploaded_at': 1762298283, 'text': 'image_05112025_00_17_23_010139m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.000766754150390625 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 28186038, '2025-11-05' ) 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-11-05' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2512508,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.20774245262145996 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= 2512508 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28186038, 'dashboard_result_id': 16820965, '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_P28186038_05-11-2025_00_40_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28186039, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28186040, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28186041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28186042, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28186043, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28186044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28186045, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28186046, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28186047, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28186048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28186049, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28186050, 'pht': 3726}}"}, {'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28186394, 'dashboard_result_id': 16820966, '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_P28186394_05-11-2025_01_03_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28186395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28186396, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28186397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28186398, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28186399, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28186400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28186401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28186402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28186403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28186404, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28186405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28186406, 'pht': 3726}}"}, {'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28187294, 'dashboard_result_id': 16820967, '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_P28187294_05-11-2025_02_20_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28187295, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28187296, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28187297, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28187298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28187299, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28187300, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28187301, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28187302, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28187303, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28187304, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28187305, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28187306, 'pht': 3726}}"}, {'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28188183, 'dashboard_result_id': 16820968, '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_P28188183_05-11-2025_03_32_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28188184, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28188185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28188186, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28188187, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28188188, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28188189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28188190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28188191, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28188192, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28188193, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28188194, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28188195, 'pht': 3726}}"}, {'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28189317, 'dashboard_result_id': 16820969, '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_P28189317_05-11-2025_05_45_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189323, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189324, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189325, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189326, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189327, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189328, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189329, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189330, 'pht': 3726}}"}, {'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28189664, 'dashboard_result_id': 16820970, '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_P28189664_05-11-2025_05_47_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189666, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189667, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189668, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189669, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189675, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189676, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189677, 'pht': 3726}}"}, {'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28189717, 'dashboard_result_id': 16820971, '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_P28189717_05-11-2025_06_03_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189720, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189721, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189722, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189723, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189724, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189726, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189729, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189731, 'pht': 3726}}"}, {'dashboat_entry_day': 2512508, 'dashboard_run_id': 2521666, 'mtr_portfolio_id': 28190150, 'dashboard_result_id': 16820972, '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_P28190150_05-11-2025_06_13_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28190170, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28190171, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28190172, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28190173, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28190174, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28190175, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28190176, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28190177, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28190179, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28190180, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28190181, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28190182, '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 = 28186038 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': 4000969, 'mtr_portfolio_id': 28186038, 'created_at': datetime.datetime(2025, 11, 5, 6, 14, 30), 'result': '0.10490548635916874', 'result_long': None, 'result_double': None}] Qualite : 0.10490548635916874 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28186038 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28186038_05-11-2025_06_14_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28186038 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_P28186038_05-11-2025_06_14_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28186039, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28186040, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28186041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28186042, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28186043, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28186044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28186045, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28186046, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28186047, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28186048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28186049, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28186050, 'pht': 3726}}" where mtr_portfolio_id = 28186038 and dashboard_run_id = 2521666 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`=28186038 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16820965, 0.10490548635916874, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28186038_05-11-2025_06_14_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28186039, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28186040, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28186041, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28186042, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28186043, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28186044, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28186045, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28186046, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28186047, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28186048, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28186049, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28186050, '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 = 28186394 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': 4000357, 'mtr_portfolio_id': 28186394, 'created_at': datetime.datetime(2025, 11, 5, 1, 3), 'result': '0.052245642542151395', 'result_long': None, 'result_double': None}] Qualite : 0.052245642542151395 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28186394 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28186394_05-11-2025_01_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28186394 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_P28186394_05-11-2025_01_03_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28186395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28186396, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28186397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28186398, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28186399, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28186400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28186401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28186402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28186403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28186404, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28186405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28186406, 'pht': 3726}}" where mtr_portfolio_id = 28186394 and dashboard_run_id = 2521666 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`=28186394 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16820966, 0.052245642542151395, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28186394_05-11-2025_01_03_00.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28186395, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28186396, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28186397, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28186398, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28186399, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28186400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28186401, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28186402, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28186403, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28186404, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28186405, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28186406, '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 = 28187294 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': 4000508, 'mtr_portfolio_id': 28187294, 'created_at': datetime.datetime(2025, 11, 5, 2, 20, 57), 'result': '0.0931771878060378', 'result_long': None, 'result_double': None}] Qualite : 0.0931771878060378 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28187294 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28187294_05-11-2025_02_20_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28187294 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_P28187294_05-11-2025_02_20_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28187295, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28187296, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28187297, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28187298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28187299, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28187300, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28187301, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28187302, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28187303, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28187304, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28187305, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28187306, 'pht': 3726}}" where mtr_portfolio_id = 28187294 and dashboard_run_id = 2521666 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`=28187294 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16820967, 0.0931771878060378, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28187294_05-11-2025_02_20_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 28187295, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28187296, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28187297, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28187298, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28187299, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28187300, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28187301, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28187302, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28187303, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28187304, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28187305, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28187306, '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 = 28188183 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': 4000645, 'mtr_portfolio_id': 28188183, 'created_at': datetime.datetime(2025, 11, 5, 3, 32, 31), 'result': '0.061078176578676466', 'result_long': None, 'result_double': None}] Qualite : 0.061078176578676466 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28188183 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28188183_05-11-2025_03_32_31.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28188183 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_P28188183_05-11-2025_03_32_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28188184, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28188185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28188186, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28188187, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28188188, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28188189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28188190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28188191, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28188192, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28188193, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28188194, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28188195, 'pht': 3726}}" where mtr_portfolio_id = 28188183 and dashboard_run_id = 2521666 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`=28188183 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16820968, 0.061078176578676466, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28188183_05-11-2025_03_32_31.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28188184, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28188185, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28188186, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28188187, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28188188, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28188189, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28188190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28188191, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28188192, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28188193, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28188194, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28188195, '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 = 28189317 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': 4000858, 'mtr_portfolio_id': 28189317, 'created_at': datetime.datetime(2025, 11, 5, 5, 45, 33), 'result': '0.05720052889085852', 'result_long': None, 'result_double': None}] Qualite : 0.05720052889085852 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28189317 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28189317_05-11-2025_05_45_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28189317 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_P28189317_05-11-2025_05_45_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189323, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189324, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189325, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189326, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189327, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189328, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189329, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189330, 'pht': 3726}}" where mtr_portfolio_id = 28189317 and dashboard_run_id = 2521666 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`=28189317 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16820969, 0.05720052889085852, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28189317_05-11-2025_05_45_33.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189319, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189320, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189321, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189322, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189323, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189324, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189325, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189326, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189327, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189328, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189329, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189330, '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 = 28189664 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28189664 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 28189664 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28189664 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 28189664 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28189664 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28189664_05-11-2025_05_47_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28189664 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_P28189664_05-11-2025_05_47_32.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189666, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189667, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189668, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189669, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189670, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189671, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189672, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189674, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189675, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189676, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189677, 'pht': 3726}}" where mtr_portfolio_id = 28189664 and dashboard_run_id = 2521666 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 = 28189717 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': 4001040, 'mtr_portfolio_id': 28189717, 'created_at': datetime.datetime(2025, 11, 5, 6, 3, 29), 'result': '0.054422044536203015', 'result_long': None, 'result_double': None}] Qualite : 0.054422044536203015 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28189717 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28189717_05-11-2025_06_03_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28189717 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_P28189717_05-11-2025_06_03_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189720, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189721, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189722, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189723, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189724, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189726, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189729, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189731, 'pht': 3726}}" where mtr_portfolio_id = 28189717 and dashboard_run_id = 2521666 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`=28189717 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16820971, 0.054422044536203015, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28189717_05-11-2025_06_03_29.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28189720, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28189721, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28189722, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28189723, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28189724, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28189725, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28189726, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28189727, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28189728, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28189729, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28189730, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28189731, '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 = 28190150 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': 4001101, 'mtr_portfolio_id': 28190150, 'created_at': datetime.datetime(2025, 11, 5, 6, 13, 1), 'result': '0.0408711167729987', 'result_long': None, 'result_double': None}] Qualite : 0.0408711167729987 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 28190150 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28190150_05-11-2025_06_13_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 28190150 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_P28190150_05-11-2025_06_13_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28190170, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28190171, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28190172, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28190173, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28190174, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28190175, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28190176, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28190177, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28190179, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28190180, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28190181, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28190182, 'pht': 3726}}" where mtr_portfolio_id = 28190150 and dashboard_run_id = 2521666 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`=28190150 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (16820972, 0.0408711167729987, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P28190150_05-11-2025_06_13_02.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 28190170, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 28190171, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 28190172, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 28190173, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 28190174, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 28190175, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 28190176, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 28190177, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 28190179, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 28190180, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 28190181, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 28190182, '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 (28186038,28186394,28187294,28188183,28189317,28189664,28189717,28190150) result : ((1392617853,), (1392617859,), (1392617861,), (1392618834,), (1392619427,), (1392619646,), (1392619652,), (1392619664,), (1392619771,), (1392619776,), (1392619794,), (1392622575,), (1392624099,), (1392624159,), (1392624315,), (1392624846,), (1392625280,), (1392625705,), (1392625734,), (1392626088,), (1392626189,), (1392626193,), (1392626304,), (1392633920,), (1392636440,), (1392637712,), (1392637787,), (1392638973,), (1392639353,), (1392639501,), (1392639504,), (1392639569,), (1392639809,), (1392646293,), (1392646343,), (1392646492,), (1392646587,), (1392646612,), (1392646668,), (1392646671,), (1392646674,), (1392646746,), (1392656752,), (1392656757,), (1392656803,), (1392656829,), (1392656831,), (1392656855,), (1392656858,), (1392656860,), (1392656957,), (1392656964,), (1392656970,), (1392656978,), (1392657044,), (1392657051,), (1392657054,), (1392657057,), (1392657073,), (1392657076,), (1392657079,), (1392657114,), (1392657116,), (1392657118,), (1392657121,), (1392657140,), (1392657143,), (1392657144,), (1392657145,), (1392657249,), (1392657251,), (1392657252,), (1392657255,), (1392657258,), (1392657262,), (1392657280,), (1392657284,), (1392657286,), (1392657288,), (1392657339,), (1392657343,), (1392657919,), (1392657614,), (1392657918,), (1392657958,), (1392657959,), (1392657963,), (1392657965,), (1392657967,), (1392657970,), (1392657999,), (1392657995,), (1392657997,), (1392658020,), (1392658022,), (1392658023,), (1392658025,), (1392658122,), (1392658124,), (1392658126,), (1392658130,), (1392658134,), (1392658158,), (1392658160,), (1392658162,), (1392658165,), (1392658169,), (1392658171,), (1392658205,), (1392658208,), (1392658211,), (1392658214,), (1392658236,), (1392658239,), (1392658241,), (1392658243,), (1392658246,), (1392658276,), (1392658281,), (1392658285,), (1392658288,), (1392658335,), (1392658336,), (1392658337,), (1392658339,), (1392658341,), (1392658376,), (1392658382,), (1392658385,), (1392658388,), (1392658391,), (1392658393,), (1392658405,), (1392658407,), (1392658408,), (1392658409,), (1392658418,), (1392658421,), (1392658425,), (1392658427,), (1392658430,), (1392658456,), (1392658458,), (1392658460,), (1392658462,), (1392658466,), (1392658470,), (1392658483,), (1392658485,), (1392658486,), (1392658488,), (1392658624,), (1392658627,), (1392658630,), (1392658632,), (1392658634,), (1392658665,), (1392658671,), (1392659587,), (1392659409,), (1392659453,), (1392659501,), (1392659543,), (1392660113,), (1392660121,), (1392660123,), (1392660125,), (1392660128,), (1392660191,), (1392660226,), (1392660262,), (1392660294,), (1392660681,), (1392660718,), (1392660768,), (1392660799,), (1392660832,), (1392661208,), (1392661210,), (1392661213,), (1392661218,), (1392661224,), (1392661231,), (1392661441,), (1392661458,), (1392661503,), (1392661505,), (1392661656,), (1392661658,), (1392661659,), (1392661660,), (1392661662,), (1392661663,), (1392661701,), (1392661702,), (1392661703,), (1392661705,), (1392661721,), (1392661723,), (1392661725,), (1392661766,), (1392661772,), (1392661779,), (1392661789,), (1392661792,), (1392661795,), (1392661848,), (1392661851,), (1392661854,), (1392661855,), (1392661858,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'05112025': {'nb_upload': 12, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([28186038]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] map_info['map_portfolio_photo'] : {28186038: [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853]} final : True mtd_id 4302 list_pids : [1392622575, 1392619794, 1392619776, 1392619771, 1392619664, 1392619652, 1392619646, 1392619427, 1392618834, 1392617861, 1392617859, 1392617853] Looping around the photos to save general results len do output : 1 /28186038Didn'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, '4000969') ('4302', '28186038', '1392622575', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619794', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619776', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619771', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619664', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619652', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619646', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392619427', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392618834', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617861', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617859', None, None, None, None, None, '4000969') ('4302', None, None, None, None, None, None, None, '4000969') ('4302', '28186038', '1392617853', None, None, None, None, None, '4000969') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '28186038', 'None', None, None, None, None, '4000969'), ('4302', '28186038', '1392622575', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619794', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619776', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619771', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619664', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619652', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619646', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392619427', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392618834', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617861', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617859', None, None, None, None, None, '4000969'), ('4302', '28186038', '1392617853', None, None, None, None, None, '4000969')] time used for this insertion : 0.014044046401977539 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.653331995010376 time spend to save output : 0.014279603958129883 total time spend for step 5 : 1.6676115989685059 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 (4000969) 2.28user 2.41system 0:09.64elapsed 48%CPU (0avgtext+0avgdata 159192maxresident)k 864inputs+7264outputs (5major+73816minor)pagefaults 0swaps