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 : 2142368 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 (2733233) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2733233) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149601 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2733233'] with mtr_portfolio_ids : ['22149601'] and first list_photo_ids : [] new path : /proc/2142368/ Name: python3 Umask: 0002 State: R (running) Tgid: 2142368 Ngid: 0 Pid: 2142368 PPid: 2142367 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2142368 NSpid: 2142368 NSpgid: 2139081 NSsid: 2139081 VmPeak: 1106844 kB VmSize: 1106844 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98952 kB VmRSS: 98952 kB RssAnon: 59800 kB RssFile: 39152 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 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: 57 nonvoluntary_ctxt_switches: 121 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2142368', 'Ngid': '0', 'Pid': '2142368', 'PPid': '2142367', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2142368', 'NSpid': '2142368', 'NSpgid': '2139081', 'NSsid': '2139081', 'VmPeak': '1106844 kB', 'VmSize': '1106844 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98952 kB', 'VmRSS': '98952 kB', 'RssAnon': '59800 kB', 'RssFile': '39152 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', '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': '57', 'nonvoluntary_ctxt_switches': '121'} ('datou_batch_current', '2142368', '1106844', '0', '1106844', '865592', '98952', b'', 'marlene', '2733233') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (22149601) 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 (2733233 ) ) 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 (22149601) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350646946, 'portfolio_id': 22149601}, {'photo_id': 1350646938, 'portfolio_id': 22149601}, {'photo_id': 1350646933, 'portfolio_id': 22149601}, {'photo_id': 1350646928, 'portfolio_id': 22149601}, {'photo_id': 1350646924, 'portfolio_id': 22149601}, {'photo_id': 1350646894, 'portfolio_id': 22149601}, {'photo_id': 1350646856, 'portfolio_id': 22149601}, {'photo_id': 1350646844, 'portfolio_id': 22149601}, {'photo_id': 1350646840, 'portfolio_id': 22149601}, {'photo_id': 1350646820, 'portfolio_id': 22149601}, {'photo_id': 1350646805, 'portfolio_id': 22149601}, {'photo_id': 1350646739, 'portfolio_id': 22149601}, {'photo_id': 1350646737, 'portfolio_id': 22149601}, {'photo_id': 1350646736, 'portfolio_id': 22149601}, {'photo_id': 1350646682, 'portfolio_id': 22149601}, {'photo_id': 1350646675, 'portfolio_id': 22149601}, {'photo_id': 1350646668, 'portfolio_id': 22149601}, {'photo_id': 1350646664, 'portfolio_id': 22149601}, {'photo_id': 1350646658, 'portfolio_id': 22149601}, {'photo_id': 1350646563, 'portfolio_id': 22149601}, {'photo_id': 1350646558, 'portfolio_id': 22149601}, {'photo_id': 1350646546, 'portfolio_id': 22149601}, {'photo_id': 1350646536, 'portfolio_id': 22149601}, {'photo_id': 1350646519, 'portfolio_id': 22149601}, {'photo_id': 1350646441, 'portfolio_id': 22149601}, {'photo_id': 1350646439, 'portfolio_id': 22149601}] map_portfolio_id_photo_id: {22149601: [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805, 1350646739, 1350646737, 1350646736, 1350646682, 1350646675, 1350646668, 1350646664, 1350646658, 1350646563, 1350646558, 1350646546, 1350646536, 1350646519, 1350646441, 1350646439]} ##### 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.014226198196411133 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Tue Apr 8 16:22:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22149601) 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 : 22149601 get user id for portfolio 22149601 get sub ptf for main ptf 22149601, type 3726 and hashtags ['flou', 'metal', 'plastique', 'autre_refus', 'kraft', 'environnement', 'Teint_Dans_La_Masse', 'Carton_gris', 'mal_croppe', 'Carton_brun', 'papier', 'cartonnette'] 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`=22149601 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','plastique','autre_refus','kraft','environnement','Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','papier','cartonnette')) 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`=22149601 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','plastique','autre_refus','kraft','environnement','Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','papier','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22149601, 'sub_port_id': 22149671, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627971, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'autre_refus': {'main_port_id': 22149601, 'sub_port_id': 22149672, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627972, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 22149601, 'sub_port_id': 22149673, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627973, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'kraft': {'main_port_id': 22149601, 'sub_port_id': 22149674, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627974, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'environnement': {'main_port_id': 22149601, 'sub_port_id': 22149675, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627975, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'mal_croppe': {'main_port_id': 22149601, 'sub_port_id': 22149676, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627976, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'cartonnette': {'main_port_id': 22149601, 'sub_port_id': 22149677, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627977, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'Carton_gris': {'main_port_id': 22149601, 'sub_port_id': 22149678, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627978, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'metal': {'main_port_id': 22149601, 'sub_port_id': 22149679, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627979, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'Carton_brun': {'main_port_id': 22149601, 'sub_port_id': 22149680, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627980, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'flou': {'main_port_id': 22149601, 'sub_port_id': 22149681, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627981, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}, 'papier': {'main_port_id': 22149601, 'sub_port_id': 22149682, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627982, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 20, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 20, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22149671 , 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=22149601 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 (22149671) result : ((1350647046,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149672 , 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=22149601 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 (22149672) result : ((1350646855,), (1350647092,), (1350647093,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149673 , 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=22149601 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 (22149673) result : ((1350646774,), (1350646850,), (1350646851,), (1350646852,), (1350646853,), (1350646999,), (1350647085,), (1350647086,), (1350647087,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149674 , 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=22149601 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 (22149674) result : ((1350647101,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149675 , 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=22149601 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 (22149675) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149676 , 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=22149601 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 (22149676) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149677 , 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=22149601 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 (22149677) result : ((1350646778,), (1350647031,), (1350647095,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149678 , 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=22149601 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 (22149678) result : ((1350647011,), (1350647094,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149679 , 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=22149601 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 (22149679) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149680 , 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=22149601 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 (22149680) result : ((1350646781,), (1350647044,), (1350647098,), (1350647099,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149681 , 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=22149601 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 (22149681) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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 22149682 , 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=22149601 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 (22149682) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22149601) result : ((1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) 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`=22149601 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','plastique','autre_refus','kraft','environnement','Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','papier','cartonnette')) 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`=22149601 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','metal','plastique','autre_refus','kraft','environnement','Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','papier','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'plastique': {'main_port_id': 22149601, 'sub_port_id': 22149683, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627983, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'autre_refus': {'main_port_id': 22149601, 'sub_port_id': 22149684, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627984, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'Teint_Dans_La_Masse': {'main_port_id': 22149601, 'sub_port_id': 22149685, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627985, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'kraft': {'main_port_id': 22149601, 'sub_port_id': 22149686, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627986, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'environnement': {'main_port_id': 22149601, 'sub_port_id': 22149687, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627987, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'mal_croppe': {'main_port_id': 22149601, 'sub_port_id': 22149688, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627988, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'cartonnette': {'main_port_id': 22149601, 'sub_port_id': 22149689, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627989, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'Carton_gris': {'main_port_id': 22149601, 'sub_port_id': 22149690, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627990, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'metal': {'main_port_id': 22149601, 'sub_port_id': 22149691, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627991, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'Carton_brun': {'main_port_id': 22149601, 'sub_port_id': 22149692, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627992, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'flou': {'main_port_id': 22149601, 'sub_port_id': 22149693, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627993, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}, 'papier': {'main_port_id': 22149601, 'sub_port_id': 22149694, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14627994, 'last_updated_at': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 16, 21), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 16, 21)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149683,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149671 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149684,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149672 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149685,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149673 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149686,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149674 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149687,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149675 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149688,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149676 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149689,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149677 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149690,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149678 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149691,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149679 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149692,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149680 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149693,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149681 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22149694,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22149682 lien utilise dans velours : https://www.fotonower.com/velours/22149683,22149684,22149685,22149686,22149687,22149688,22149689,22149690,22149691,22149692,22149693,22149694?tags=plastique,autre_refus,Teint_Dans_La_Masse,kraft,environnement,mal_croppe,cartonnette,Carton_gris,metal,Carton_brun,flou,papier After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22149601]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] map_info['map_portfolio_photo'] : {22149601: [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805, 1350646739, 1350646737, 1350646736, 1350646682, 1350646675, 1350646668, 1350646664, 1350646658, 1350646563, 1350646558, 1350646546, 1350646536, 1350646519, 1350646441, 1350646439]} final : False mtd_id 4302 list_pids : [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] Looping around the photos to save general results len do output : 1 /22149601. 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, '2733233') ('4302', '22149601', '1350646946', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646938', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646933', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646928', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646924', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646894', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646856', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646844', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646840', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646820', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646805', None, None, None, None, None, '2733233') 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', None, '22149601', "{'plastique': 22149671, 'autre_refus': 22149672, 'Teint_Dans_La_Masse': 22149673, 'kraft': 22149674, 'environnement': 22149675, 'mal_croppe': 22149676, 'cartonnette': 22149677, 'Carton_gris': 22149678, 'metal': 22149679, 'Carton_brun': 22149680, 'flou': 22149681, 'papier': 22149682}", None, None, None, None, '2733233'), ('4302', '22149601', '1350646946', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646938', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646933', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646928', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646924', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646894', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646856', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646844', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646840', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646820', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646805', None, None, None, None, None, '2733233')] time used for this insertion : 0.015717506408691406 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4663188457489014 time spend to save output : 0.016015291213989258 total time spend for step 1 : 1.4823341369628906 step2:final Tue Apr 8 16:23:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (22149601) 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 22149601 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350646441,1350646439,1350646563,1350646558,1350646546,1350646536,1350646519,1350646682,1350646675,1350646668,1350646664,1350646658,1350646739,1350646737,1350646736,1350646856,1350646844,1350646840,1350646820,1350646805,1350646946,1350646938,1350646933,1350646928,1350646924,1350646894); 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([22149601]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} new output for save of step final : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] map_info['map_portfolio_photo'] : {22149601: [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805, 1350646739, 1350646737, 1350646736, 1350646682, 1350646675, 1350646668, 1350646664, 1350646658, 1350646563, 1350646558, 1350646546, 1350646536, 1350646519, 1350646441, 1350646439]} final : False mtd_id 4302 list_pids : [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] Looping around the photos to save general results len do output : 11 /1350646946.Didn't retrieve data . /1350646938.Didn't retrieve data . /1350646933.Didn't retrieve data . /1350646928.Didn't retrieve data . /1350646924.Didn't retrieve data . /1350646894.Didn't retrieve data . /1350646856.Didn't retrieve data . /1350646844.Didn't retrieve data . /1350646840.Didn't retrieve data . /1350646820.Didn't retrieve data . /1350646805.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, '2733233') ('4302', '22149601', '1350646946', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646938', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646933', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646928', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646924', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646894', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646856', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646844', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646840', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646820', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646805', None, None, None, None, None, '2733233') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '22149601', '1350646946', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646938', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646933', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646928', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646924', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646894', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646856', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646844', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646840', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646820', '0.04541635516030169', None, None, None, None, '2733233'), ('4302', '22149601', '1350646805', '0.04541635516030169', None, None, None, None, '2733233')] time used for this insertion : 0.016293048858642578 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07010412216186523 time spend to save output : 0.01672530174255371 total time spend for step 2 : 0.08682942390441895 step3:velours_tree Tue Apr 8 16:23:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22149601: [{'plastique': 22149671, 'autre_refus': 22149672, 'Teint_Dans_La_Masse': 22149673, 'kraft': 22149674, 'environnement': 22149675, 'mal_croppe': 22149676, 'cartonnette': 22149677, 'Carton_gris': 22149678, 'metal': 22149679, 'Carton_brun': 22149680, 'flou': 22149681, 'papier': 22149682}]} input_args_next_step : {22149601: ()} output_args : {22149601: [{'plastique': 22149671, 'autre_refus': 22149672, 'Teint_Dans_La_Masse': 22149673, 'kraft': 22149674, 'environnement': 22149675, 'mal_croppe': 22149676, 'cartonnette': 22149677, 'Carton_gris': 22149678, 'metal': 22149679, 'Carton_brun': 22149680, 'flou': 22149681, 'papier': 22149682}]} args : 22149601 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 : ({'plastique': 22149671, 'autre_refus': 22149672, 'Teint_Dans_La_Masse': 22149673, 'kraft': 22149674, 'environnement': 22149675, 'mal_croppe': 22149676, 'cartonnette': 22149677, 'Carton_gris': 22149678, 'metal': 22149679, 'Carton_brun': 22149680, 'flou': 22149681, 'papier': 22149682},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22149601) 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([22149601]) 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.30390429496765137 time spend to save output : 4.5299530029296875e-05 total time spend for step 3 : 0.30394959449768066 step4:send_mail_cod Tue Apr 8 16:23:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} input_args_next_step : {1350646946: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646946 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646938 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646933 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646928 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646924 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646894 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646856 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646844 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646840 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646820 depend.output_id : 0 input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ()} output_args : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',)} args : 1350646805 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 : {22149601: [{'plastique': 22149671, 'autre_refus': 22149672, 'Teint_Dans_La_Masse': 22149673, 'kraft': 22149674, 'environnement': 22149675, 'mal_croppe': 22149676, 'cartonnette': 22149677, 'Carton_gris': 22149678, 'metal': 22149679, 'Carton_brun': 22149680, 'flou': 22149681, 'papier': 22149682}]} input_args_next_step : {1350646946: ('0.04541635516030169',), 1350646938: ('0.04541635516030169',), 1350646933: ('0.04541635516030169',), 1350646928: ('0.04541635516030169',), 1350646924: ('0.04541635516030169',), 1350646894: ('0.04541635516030169',), 1350646856: ('0.04541635516030169',), 1350646844: ('0.04541635516030169',), 1350646840: ('0.04541635516030169',), 1350646820: ('0.04541635516030169',), 1350646805: ('0.04541635516030169',), 22149601: ()} output_args : {22149601: [{'plastique': 22149671, 'autre_refus': 22149672, 'Teint_Dans_La_Masse': 22149673, 'kraft': 22149674, 'environnement': 22149675, 'mal_croppe': 22149676, 'cartonnette': 22149677, 'Carton_gris': 22149678, 'metal': 22149679, 'Carton_brun': 22149680, 'flou': 22149681, 'papier': 22149682}]} args : 22149601 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 :12, first value : ('0.04541635516030169',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22149601) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1350646946,1350646938,1350646933,1350646928,1350646924,1350646894,1350646856,1350646844,1350646840,1350646820,1350646805) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350646805 begin to download photo : 1350646844 begin to download photo : 1350646924 begin to download photo : 1350646938 download finish for photo 1350646844 begin to download photo : 1350646856 download finish for photo 1350646938 begin to download photo : 1350646946 download finish for photo 1350646805 begin to download photo : 1350646820 download finish for photo 1350646924 begin to download photo : 1350646928 download finish for photo 1350646856 begin to download photo : 1350646894 download finish for photo 1350646946 download finish for photo 1350646820 begin to download photo : 1350646840 download finish for photo 1350646928 begin to download photo : 1350646933 download finish for photo 1350646894 download finish for photo 1350646840 download finish for photo 1350646933 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P22149601_08-04-2025_16_23_01.pdf 22149671 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149671 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350647046: '1744122093_2278384_1350646736_17d944eafc6f8e7680224af960b823e9_rle_crop_3750954902_0.png'} change filename to text .imagette221496711744122181/ imagette221496711744122181/1744122093_2278384_1350646736_17d944eafc6f8e7680224af960b823e9_rle_crop_3750954902_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/228d35567ffee99ff7019cbaa79742db_25184617.png imagette221496711744122181 22149672 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149672 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350646855: '1744121953_2276241_1350646519_9a199541979ea5dd66ba33f16130809f_rle_crop_3750953331_0.png', 1350647092: '1744122111_2278616_1350646675_59dea1ff6e9881be5d3cda02676c15e6_rle_crop_3750955042_0.png', 1350647093: '1744122111_2278616_1350646668_923f9f5a3a71f77809fd536c91ef8155_rle_crop_3750955050_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/d0d62fbc9f407e124a23580fba833e48_81722133.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/2016ef544be7f814ecec06509f337f1e_89217734.png change filename to text .imagette221496721744122181/ imagette221496721744122181/1744122111_2278616_1350646668_923f9f5a3a71f77809fd536c91ef8155_rle_crop_3750955050_0.png.png imagette221496721744122181/1744122111_2278616_1350646675_59dea1ff6e9881be5d3cda02676c15e6_rle_crop_3750955042_0.png.png imagette221496721744122181/1744121953_2276241_1350646519_9a199541979ea5dd66ba33f16130809f_rle_crop_3750953331_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/63ae8a192d81649e6cb5343656dc07c6_95800899.png imagette221496721744122181 22149674 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149674 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350647101: '1744122111_2278616_1350646675_59dea1ff6e9881be5d3cda02676c15e6_rle_crop_3750955043_0.png'} change filename to text .imagette221496741744122181/ imagette221496741744122181/1744122111_2278616_1350646675_59dea1ff6e9881be5d3cda02676c15e6_rle_crop_3750955043_0.png.png imagette221496761744122181/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/09b384e6cde834f56711cd8d58125a2f_1798227.png imagette221496741744122181 22149676 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149676 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221496761744122181 22149677 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149677 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350646778: '1744121967_2427794_1350646441_e6cf23928b9e840a3b6ccf3028a78572_rle_crop_3750952890_0.png', 1350647031: '1744122093_2278384_1350646737_a5d069490da2d74a3958065f00769701_rle_crop_3750954808_0.png', 1350647095: '1744122111_2278616_1350646668_923f9f5a3a71f77809fd536c91ef8155_rle_crop_3750955051_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/b4d45d27bb59a86005b1b25c3007c845_3542145.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/9740c23920af5ed4b887d9c1542c9be4_92874627.png change filename to text .imagette221496771744122181/ imagette221496771744122181/1744121967_2427794_1350646441_e6cf23928b9e840a3b6ccf3028a78572_rle_crop_3750952890_0.png.png imagette221496771744122181/1744122111_2278616_1350646668_923f9f5a3a71f77809fd536c91ef8155_rle_crop_3750955051_0.png.png imagette221496771744122181/1744122093_2278384_1350646737_a5d069490da2d74a3958065f00769701_rle_crop_3750954808_0.png.png imagette221496791744122181/ imagette221496811744122181/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/d7a06d385ed576482c217cf558488362_47648698.png imagette221496771744122181 22149679 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149679 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221496791744122181 22149681 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149681 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221496811744122181 22149673 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149673 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350646774: '1744121967_2004759_1350646563_ee54eb764e8b77321f852cbf71fc625b_rle_crop_3750952820_0.png', 1350646850: '1744121953_2276241_1350646558_a79517e5102c91ad9bfe2d3e4b3bdc97_rle_crop_3750953202_0.png', 1350646851: '1744121953_2276241_1350646546_4f5d05912ce40cbc4be50896718af699_rle_crop_3750953219_0.png', 1350646852: '1744121953_2276241_1350646536_fe9b63809e70fc62f01600851682beb5_rle_crop_3750953319_0.png', 1350646853: '1744121953_2276241_1350646519_9a199541979ea5dd66ba33f16130809f_rle_crop_3750953328_0.png', 1350646999: '1744122093_2278384_1350646736_17d944eafc6f8e7680224af960b823e9_rle_crop_3750954903_0.png', 1350647085: '1744122111_2278616_1350646675_59dea1ff6e9881be5d3cda02676c15e6_rle_crop_3750955041_0.png', 1350647086: '1744122111_2278616_1350646668_923f9f5a3a71f77809fd536c91ef8155_rle_crop_3750955055_0.png', 1350647087: '1744122111_2278616_1350646658_2faf685877ac8384c92e2657d2794492_rle_crop_3750955075_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/cf3829c885739e417329b59dc74ec18f_91933766.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/024330e693342bbb315b3b5798cf58e0_6656948.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/8280377bb618fec60c43a4525c56975b_79122904.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/8f0c23188217b165087797f3eb338e68_94198837.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/575218e02612ff0f9692c7a1ac60a8e5_6008142.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/0981a53b0a03e7e538962711da41d778_83574619.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/5cd1deda6dc38259b01ccd94f7ebb8b0_83553240.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/32c82ff8e0c454715c5fd1427bec3dc9_91273018.png change filename to text .imagette221496731744122181/ imagette221496731744122181/1744122093_2278384_1350646736_17d944eafc6f8e7680224af960b823e9_rle_crop_3750954903_0.png.png imagette221496731744122181/1744121953_2276241_1350646558_a79517e5102c91ad9bfe2d3e4b3bdc97_rle_crop_3750953202_0.png.png imagette221496731744122181/1744121953_2276241_1350646546_4f5d05912ce40cbc4be50896718af699_rle_crop_3750953219_0.png.png imagette221496731744122181/1744122111_2278616_1350646675_59dea1ff6e9881be5d3cda02676c15e6_rle_crop_3750955041_0.png.png imagette221496731744122181/1744122111_2278616_1350646658_2faf685877ac8384c92e2657d2794492_rle_crop_3750955075_0.png.png imagette221496731744122181/1744121953_2276241_1350646519_9a199541979ea5dd66ba33f16130809f_rle_crop_3750953328_0.png.png imagette221496731744122181/1744122111_2278616_1350646668_923f9f5a3a71f77809fd536c91ef8155_rle_crop_3750955055_0.png.png imagette221496731744122181/1744121953_2276241_1350646536_fe9b63809e70fc62f01600851682beb5_rle_crop_3750953319_0.png.png imagette221496731744122181/1744121967_2004759_1350646563_ee54eb764e8b77321f852cbf71fc625b_rle_crop_3750952820_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/4fba049eb7d80036e38fae68054c4056_80745163.png imagette221496731744122181 22149678 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149678 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350647011: '1744122093_2278384_1350646737_a5d069490da2d74a3958065f00769701_rle_crop_3750954809_0.png', 1350647094: '1744122111_2278616_1350646739_a3a09c19cf2e3db0aee7ec56db958172_rle_crop_3750955031_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/10502cdb2081f24c3b07f33eabd159cb_77645876.png change filename to text .imagette221496781744122182/ imagette221496781744122182/1744122093_2278384_1350646737_a5d069490da2d74a3958065f00769701_rle_crop_3750954809_0.png.png imagette221496781744122182/1744122111_2278616_1350646739_a3a09c19cf2e3db0aee7ec56db958172_rle_crop_3750955031_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/6d0aac949c47893bdd5cbd532b15dd88_60526398.png imagette221496781744122182 22149680 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149680 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350646781: '1744121967_2427794_1350646441_e6cf23928b9e840a3b6ccf3028a78572_rle_crop_3750952893_0.png', 1350647044: '1744122093_2278384_1350646737_a5d069490da2d74a3958065f00769701_rle_crop_3750954814_0.png', 1350647098: '1744122111_2278616_1350646739_a3a09c19cf2e3db0aee7ec56db958172_rle_crop_3750955032_0.png', 1350647099: '1744122111_2278616_1350646664_addccd470db760f0699418ecafc7d73e_rle_crop_3750955063_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/4e0f70a4c6f25b574c0bb3e8aac45a11_52381126.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/5e8de3d56f8cf610549f954ce195607f_42305460.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/59b3b2af6bae65815f39f1031b04a2c5_3082508.png change filename to text .imagette221496801744122182/ imagette221496801744122182/1744122111_2278616_1350646739_a3a09c19cf2e3db0aee7ec56db958172_rle_crop_3750955032_0.png.png imagette221496801744122182/1744122111_2278616_1350646664_addccd470db760f0699418ecafc7d73e_rle_crop_3750955063_0.png.png imagette221496801744122182/1744122093_2278384_1350646737_a5d069490da2d74a3958065f00769701_rle_crop_3750954814_0.png.png imagette221496801744122182/1744121967_2427794_1350646441_e6cf23928b9e840a3b6ccf3028a78572_rle_crop_3750952893_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/e7f29bd3a8c3a0340b53d391016e85bf_87808374.png imagette221496801744122182 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22149601 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22149683,22149684,22149685,22149686,22149687,22149688,22149689,22149690,22149691,22149692,22149693,22149694?tags=plastique,autre_refus,Teint_Dans_La_Masse,kraft,environnement,mal_croppe,cartonnette,Carton_gris,metal,Carton_brun,flou,papier your option no_mail is active, we will not send the real mail to your client args[1350646946] : ('0.04541635516030169',) no score found for photo 1350646946 We are sending mail with results at report@fotonower.com args[1350646938] : ('0.04541635516030169',) no score found for photo 1350646938 We are sending mail with results at report@fotonower.com args[1350646933] : ('0.04541635516030169',) no score found for photo 1350646933 We are sending mail with results at report@fotonower.com args[1350646928] : ('0.04541635516030169',) no score found for photo 1350646928 We are sending mail with results at report@fotonower.com args[1350646924] : ('0.04541635516030169',) no score found for photo 1350646924 We are sending mail with results at report@fotonower.com args[1350646894] : ('0.04541635516030169',) no score found for photo 1350646894 We are sending mail with results at report@fotonower.com args[1350646856] : ('0.04541635516030169',) no score found for photo 1350646856 We are sending mail with results at report@fotonower.com args[1350646844] : ('0.04541635516030169',) no score found for photo 1350646844 We are sending mail with results at report@fotonower.com args[1350646840] : ('0.04541635516030169',) no score found for photo 1350646840 We are sending mail with results at report@fotonower.com args[1350646820] : ('0.04541635516030169',) no score found for photo 1350646820 We are sending mail with results at report@fotonower.com args[1350646805] : ('0.04541635516030169',) no score found for photo 1350646805 We are sending mail with results at report@fotonower.com refus_total : 0.04541635516030169 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149601 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_P22149601_08-04-2025_16_23_01.pdf results_Auto_P22149601_08-04-2025_16_23_01.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22149601_08-04-2025_16_23_01.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','22149601','results_Auto_P22149601_08-04-2025_16_23_01.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22149601_08-04-2025_16_23_01.pdf','pdf','','0.17','0.04541635516030169') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22149601]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] map_info['map_portfolio_photo'] : {22149601: [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805, 1350646739, 1350646737, 1350646736, 1350646682, 1350646675, 1350646668, 1350646664, 1350646658, 1350646563, 1350646558, 1350646546, 1350646536, 1350646519, 1350646441, 1350646439]} final : False mtd_id 4302 list_pids : [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] 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, '2733233') ('4302', '22149601', '1350646946', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646938', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646933', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646928', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646924', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646894', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646856', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646844', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646840', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646820', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646805', None, None, None, None, None, '2733233') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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', '22149601', '1350646946', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646938', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646933', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646928', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646924', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646894', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646856', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646844', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646840', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646820', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646805', None, None, None, None, None, '2733233')] time used for this insertion : 0.015542268753051758 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.9648022651672363 time spend to save output : 0.015854835510253906 total time spend for step 4 : 2.9806571006774902 step5:split_time_score Tue Apr 8 16:23:04 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 : ['22149601'] 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 : [('22149601',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22149601) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350646938: {'path': 'temp/1744122181_2142368_1350646938_dd44627d5944adecf770f34e0fb8f864.jpg', 'extension': 'jpg'}, 1350646946: {'path': 'temp/1744122181_2142368_1350646946_fb8b351141c2ec3de8e07d898805ede9.jpg', 'extension': 'jpg'}, 1350646844: {'path': 'temp/1744122181_2142368_1350646844_e74996b6973224f0edce58fa543f8169.jpg', 'extension': 'jpg'}, 1350646856: {'path': 'temp/1744122181_2142368_1350646856_06b6d8851aef17e3ac1d460f95f4976a.jpg', 'extension': 'jpg'}, 1350646894: {'path': 'temp/1744122181_2142368_1350646894_79b14e7e9687b2ffb3b5b5f63fb097f3.jpg', 'extension': 'jpg'}, 1350646805: {'path': 'temp/1744122181_2142368_1350646805_3ecaae8a09b3f646136e0523293762b8.jpg', 'extension': 'jpg'}, 1350646820: {'path': 'temp/1744122181_2142368_1350646820_c7ed238304b52a682db5cb5f815ed9eb.jpg', 'extension': 'jpg'}, 1350646840: {'path': 'temp/1744122181_2142368_1350646840_53f07edfaa9fd93341e79bbd1ac6cc1e.jpg', 'extension': 'jpg'}, 1350646924: {'path': 'temp/1744122181_2142368_1350646924_28429983e0344e465247e04c50bf078d.jpg', 'extension': 'jpg'}, 1350646928: {'path': 'temp/1744122181_2142368_1350646928_42da6cbfdf7092c329b4a64d8b57f2f6.jpg', 'extension': 'jpg'}, 1350646933: {'path': 'temp/1744122181_2142368_1350646933_75be22a93e9ec0e4de7fbcd1f54511da.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 = 22149601; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22149601 group by h (('16', 26),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=22149601 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 (22149601) 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 (22149601) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 08042025 22149601 Nombre de photos uploadées : 26 / 23040 (0%) 08042025 22149601 Nombre de photos taguées (types de déchets): 0 / 26 (0%) 08042025 22149601 Nombre de photos taguées (volume) : 0 / 26 (0%) [{'photo_id': 1350646441, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/e6cf23928b9e840a3b6ccf3028a78572.jpg', 'username': None, 'uploaded_at': 1744121767, 'text': 'image_08042025_16_15_03_009128m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350646439, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/cc9bd8ab8db9d6065bec6d803247630e.jpg', 'username': None, 'uploaded_at': 1744121767, 'text': 'image_08042025_16_15_14_010135m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350646563, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/ee54eb764e8b77321f852cbf71fc625b.jpg', 'username': None, 'uploaded_at': 1744121828, 'text': 'image_08042025_16_15_54_010134m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350646558, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/a79517e5102c91ad9bfe2d3e4b3bdc97.jpg', 'username': None, 'uploaded_at': 1744121828, 'text': 'image_08042025_16_16_13_9125.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.384185791015625e-06 elapsed_time : order_list_meta_photo_and_scores 6.198883056640625e-06 ?????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0024073123931884766 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22149601, '2025-04-08' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1722494,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03039383888244629 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= 1722494 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732709, 'mtr_portfolio_id': 22147434, 'dashboard_result_id': 9936069, '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_P22147434_08-04-2025_15_47_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22147437, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22147438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22147439, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22147440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22147441, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22147442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22147443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22147444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22147445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22147446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22147447, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22147448, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732709, 'mtr_portfolio_id': 22148225, 'dashboard_result_id': 9936070, '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_P22148225_08-04-2025_16_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148275, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148276, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148279, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148283, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148285, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148286, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732709, 'mtr_portfolio_id': 22148796, 'dashboard_result_id': 9936071, '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_P22148796_08-04-2025_16_19_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148829, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148830, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148831, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148832, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148833, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148834, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148835, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148836, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148837, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148839, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732709, 'mtr_portfolio_id': 22149601, 'dashboard_result_id': 9936072, '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_P22149601_08-04-2025_16_21_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22149671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22149672, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22149673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22149674, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22149675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22149676, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22149677, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22149678, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22149679, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22149680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22149681, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22149682, '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 = 22147434 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': 2733066, 'mtr_portfolio_id': 22147434, 'created_at': datetime.datetime(2025, 4, 8, 15, 47, 7), 'result': '0.04512624098783352', 'result_long': None, 'result_double': None}] Qualite : 0.04512624098783352 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22147434 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22147434_08-04-2025_15_47_08.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22147434 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_P22147434_08-04-2025_15_47_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22147437, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22147438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22147439, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22147440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22147441, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22147442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22147443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22147444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22147445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22147446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22147447, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22147448, 'pht': 3726}}" where mtr_portfolio_id = 22147434 and dashboard_run_id = 1732709 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`=22147434 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9936069, 0.04512624098783352, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22147434_08-04-2025_15_47_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22147437, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22147438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22147439, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22147440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22147441, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22147442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22147443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22147444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22147445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22147446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22147447, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22147448, '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 = 22148225 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': 2733121, 'mtr_portfolio_id': 22148225, 'created_at': datetime.datetime(2025, 4, 8, 16, 2, 59), 'result': '0.04328545822920084', 'result_long': None, 'result_double': None}] Qualite : 0.04328545822920084 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22148225 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148225_08-04-2025_16_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22148225 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_P22148225_08-04-2025_16_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148275, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148276, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148279, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148283, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148285, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148286, 'pht': 3726}}" where mtr_portfolio_id = 22148225 and dashboard_run_id = 1732709 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`=22148225 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9936070, 0.04328545822920084, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148225_08-04-2025_16_03_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148275, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148276, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148279, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148283, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148285, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148286, '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 = 22148796 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': 2733171, 'mtr_portfolio_id': 22148796, 'created_at': datetime.datetime(2025, 4, 8, 16, 19), 'result': '0.07197818887150766', 'result_long': None, 'result_double': None}] Qualite : 0.07197818887150766 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22148796 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148796_08-04-2025_16_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22148796 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_P22148796_08-04-2025_16_19_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148829, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148830, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148831, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148832, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148833, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148834, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148835, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148836, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148837, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148839, 'pht': 3726}}" where mtr_portfolio_id = 22148796 and dashboard_run_id = 1732709 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`=22148796 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9936071, 0.07197818887150766, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148796_08-04-2025_16_19_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148829, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148830, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148831, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148832, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148833, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148834, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148835, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148836, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148837, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148838, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148839, '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 = 22149601 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': 2733233, 'mtr_portfolio_id': 22149601, 'created_at': datetime.datetime(2025, 4, 8, 16, 23), 'result': '0.04541635516030169', 'result_long': None, 'result_double': None}] Qualite : 0.04541635516030169 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22149601 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22149601_08-04-2025_16_23_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22149601 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_P22149601_08-04-2025_16_23_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22149671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22149672, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22149673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22149674, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22149675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22149676, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22149677, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22149678, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22149679, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22149680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22149681, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22149682, 'pht': 3726}}" where mtr_portfolio_id = 22149601 and dashboard_run_id = 1732709 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`=22149601 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9936072, 0.04541635516030169, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22149601_08-04-2025_16_23_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22149671, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22149672, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22149673, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22149674, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22149675, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22149676, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22149677, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22149678, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22149679, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22149680, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22149681, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22149682, '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 (22147434,22148225,22148796,22149601) result : ((1350637463,), (1350637470,), (1350637476,), (1350637522,), (1350637526,), (1350637530,), (1350637537,), (1350637538,), (1350637546,), (1350637566,), (1350637570,), (1350637577,), (1350637597,), (1350637765,), (1350637799,), (1350637816,), (1350637826,), (1350637831,), (1350638025,), (1350638027,), (1350638032,), (1350638049,), (1350638062,), (1350638085,), (1350638091,), (1350638121,), (1350638147,), (1350638153,), (1350638157,), (1350638191,), (1350638194,), (1350638199,), (1350638207,), (1350638216,), (1350638475,), (1350638611,), (1350638713,), (1350639050,), (1350639059,), (1350639063,), (1350639070,), (1350639094,), (1350639101,), (1350639181,), (1350639186,), (1350639188,), (1350639196,), (1350639234,), (1350639402,), (1350639514,), (1350639552,), (1350639564,), (1350639589,), (1350639599,), (1350639665,), (1350639707,), (1350639762,), (1350639816,), (1350639848,), (1350639863,), (1350640023,), (1350640042,), (1350640114,), (1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,), (1350641020,), (1350641026,), (1350641032,), (1350641042,), (1350641049,), (1350641053,), (1350641069,), (1350641097,), (1350641137,), (1350641149,), (1350641327,), (1350641403,), (1350641441,), (1350641548,), (1350641553,), (1350641560,), (1350641566,), (1350641576,), (1350641645,), (1350641668,), (1350641674,), (1350641726,), (1350641751,), (1350641877,), (1350641914,), (1350641916,), (1350641920,), (1350641930,), (1350641936,), (1350641960,), (1350641964,), (1350641966,), (1350642410,), (1350642439,), (1350642492,), (1350642540,), (1350642593,), (1350642658,), (1350642687,), (1350642721,), (1350642756,), (1350643056,), (1350642905,), (1350642979,), (1350643027,), (1350643172,), (1350643203,), (1350643248,), (1350643318,), (1350643376,), (1350643631,), (1350643636,), (1350643647,), (1350643666,), (1350643708,), (1350644011,), (1350644090,), (1350644137,), (1350644183,), (1350644496,), (1350644732,), (1350644771,), (1350645093,), (1350645127,), (1350645174,), (1350645180,), (1350645213,), (1350645217,), (1350645429,), (1350645461,), (1350645493,), (1350645621,), (1350645640,), (1350645652,), (1350645656,), (1350645660,), (1350645696,), (1350645706,), (1350645717,), (1350645741,), (1350645761,), (1350645864,), (1350645889,), (1350645907,), (1350645944,), (1350646009,), (1350646012,), (1350646019,), (1350646036,), (1350646043,), (1350646050,), (1350646112,), (1350646163,), (1350646183,), (1350646189,), (1350646307,), (1350646309,), (1350646339,), (1350646349,), (1350646355,), (1350646361,), (1350646379,), (1350646382,), (1350646384,), (1350646389,), (1350646396,), (1350646403,), (1350646443,), (1350646439,), (1350646441,), (1350646519,), (1350646536,), (1350646546,), (1350646558,), (1350646563,), (1350646658,), (1350646664,), (1350646668,), (1350646675,), (1350646682,), (1350646736,), (1350646737,), (1350646739,), (1350646805,), (1350646820,), (1350646840,), (1350646844,), (1350646856,), (1350646894,), (1350646924,), (1350646928,), (1350646933,), (1350646938,), (1350646946,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'08042025': {'nb_upload': 26, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22149601]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] map_info['map_portfolio_photo'] : {22149601: [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805, 1350646739, 1350646737, 1350646736, 1350646682, 1350646675, 1350646668, 1350646664, 1350646658, 1350646563, 1350646558, 1350646546, 1350646536, 1350646519, 1350646441, 1350646439]} final : True mtd_id 4302 list_pids : [1350646946, 1350646938, 1350646933, 1350646928, 1350646924, 1350646894, 1350646856, 1350646844, 1350646840, 1350646820, 1350646805] Looping around the photos to save general results len do output : 1 /22149601Didn'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, '2733233') ('4302', '22149601', '1350646946', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646938', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646933', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646928', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646924', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646894', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646856', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646844', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646840', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646820', None, None, None, None, None, '2733233') ('4302', None, None, None, None, None, None, None, '2733233') ('4302', '22149601', '1350646805', None, None, None, None, None, '2733233') 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', None, '22149601', 'None', None, None, None, None, '2733233'), ('4302', '22149601', '1350646946', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646938', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646933', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646928', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646924', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646894', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646856', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646844', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646840', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646820', None, None, None, None, None, '2733233'), ('4302', '22149601', '1350646805', None, None, None, None, None, '2733233')] time used for this insertion : 0.015801191329956055 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3668065071105957 time spend to save output : 0.016035079956054688 total time spend for step 5 : 0.3828415870666504 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 (2733233) 2.35user 2.38system 0:10.35elapsed 45%CPU (0avgtext+0avgdata 159860maxresident)k 1096inputs+8552outputs (21major+74674minor)pagefaults 0swaps