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 : 3223 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 (2593817) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2593817) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612767 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2593817'] with mtr_portfolio_ids : ['20612767'] and first list_photo_ids : [] new path : /proc/3223/ Name: python3 Umask: 0002 State: R (running) Tgid: 3223 Ngid: 0 Pid: 3223 PPid: 3222 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3223 NSpid: 3223 NSpgid: 1252 NSsid: 1252 VmPeak: 1106840 kB VmSize: 1106840 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97976 kB VmRSS: 97976 kB RssAnon: 59788 kB RssFile: 38188 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 616 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: 46 nonvoluntary_ctxt_switches: 168 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3223', 'Ngid': '0', 'Pid': '3223', 'PPid': '3222', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3223', 'NSpid': '3223', 'NSpgid': '1252', 'NSsid': '1252', 'VmPeak': '1106840 kB', 'VmSize': '1106840 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97976 kB', 'VmRSS': '97976 kB', 'RssAnon': '59788 kB', 'RssFile': '38188 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '616 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': '46', 'nonvoluntary_ctxt_switches': '168'} ('datou_batch_current', '3223', '1106840', '0', '1106840', '865592', '97976', b'', 'marlene', '2593817') 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 (20612767) 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 (2593817 ) ) 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 (20612767) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1338183531, 'portfolio_id': 20612767}, {'photo_id': 1338183515, 'portfolio_id': 20612767}, {'photo_id': 1338183510, 'portfolio_id': 20612767}, {'photo_id': 1338183504, 'portfolio_id': 20612767}, {'photo_id': 1338183488, 'portfolio_id': 20612767}, {'photo_id': 1338183375, 'portfolio_id': 20612767}, {'photo_id': 1338183372, 'portfolio_id': 20612767}, {'photo_id': 1338183315, 'portfolio_id': 20612767}, {'photo_id': 1338183310, 'portfolio_id': 20612767}, {'photo_id': 1338183307, 'portfolio_id': 20612767}, {'photo_id': 1338183233, 'portfolio_id': 20612767}, {'photo_id': 1338183226, 'portfolio_id': 20612767}, {'photo_id': 1338183224, 'portfolio_id': 20612767}, {'photo_id': 1338183205, 'portfolio_id': 20612767}, {'photo_id': 1338183199, 'portfolio_id': 20612767}, {'photo_id': 1338183171, 'portfolio_id': 20612767}, {'photo_id': 1338183069, 'portfolio_id': 20612767}, {'photo_id': 1338182967, 'portfolio_id': 20612767}, {'photo_id': 1338182911, 'portfolio_id': 20612767}, {'photo_id': 1338182893, 'portfolio_id': 20612767}, {'photo_id': 1338182889, 'portfolio_id': 20612767}, {'photo_id': 1338182881, 'portfolio_id': 20612767}, {'photo_id': 1338182878, 'portfolio_id': 20612767}, {'photo_id': 1338182876, 'portfolio_id': 20612767}] map_portfolio_id_photo_id: {20612767: [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307, 1338183233, 1338183226, 1338183224, 1338183205, 1338183199, 1338183171, 1338183069, 1338182967, 1338182911, 1338182893, 1338182889, 1338182881, 1338182878, 1338182876]} ##### 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.01421213150024414 #### 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 Mon Feb 17 16:50:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20612767) 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 : 20612767 get user id for portfolio 20612767 get sub ptf for main ptf 20612767, type 3726 and hashtags ['metal', 'cartonnette', 'plastique', 'kraft', 'flou', 'environnement', 'Teint_Dans_La_Masse', 'mal_croppe', 'papier', 'Carton_brun', 'Carton_gris', 'autre_refus'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20612767 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','plastique','kraft','flou','environnement','Teint_Dans_La_Masse','mal_croppe','papier','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20612767 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','plastique','kraft','flou','environnement','Teint_Dans_La_Masse','mal_croppe','papier','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 20612767, 'sub_port_id': 20612821, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269356, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'Carton_brun': {'main_port_id': 20612767, 'sub_port_id': 20612822, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269357, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'mal_croppe': {'main_port_id': 20612767, 'sub_port_id': 20612823, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269358, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'autre_refus': {'main_port_id': 20612767, 'sub_port_id': 20612824, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269359, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'kraft': {'main_port_id': 20612767, 'sub_port_id': 20612825, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269360, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'flou': {'main_port_id': 20612767, 'sub_port_id': 20612826, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269361, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'environnement': {'main_port_id': 20612767, 'sub_port_id': 20612827, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269362, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'Carton_gris': {'main_port_id': 20612767, 'sub_port_id': 20612828, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269363, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 20612767, 'sub_port_id': 20612829, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269364, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'papier': {'main_port_id': 20612767, 'sub_port_id': 20612830, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269365, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'plastique': {'main_port_id': 20612767, 'sub_port_id': 20612831, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269366, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}, 'cartonnette': {'main_port_id': 20612767, 'sub_port_id': 20612832, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269367, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20612821 , 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=20612767 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 (20612821) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612822 , 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=20612767 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 (20612822) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612823 , 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=20612767 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 (20612823) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612824 , 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=20612767 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 (20612824) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612825 , 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=20612767 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 (20612825) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612826 , 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=20612767 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 (20612826) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612827 , 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=20612767 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 (20612827) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612828 , 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=20612767 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 (20612828) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612829 , 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=20612767 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 (20612829) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612830 , 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=20612767 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 (20612830) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612831 , 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=20612767 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 (20612831) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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 20612832 , 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=20612767 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 (20612832) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20612767) result : ((1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) 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`=20612767 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','plastique','kraft','flou','environnement','Teint_Dans_La_Masse','mal_croppe','papier','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20612767 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','cartonnette','plastique','kraft','flou','environnement','Teint_Dans_La_Masse','mal_croppe','papier','Carton_brun','Carton_gris','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 20612767, 'sub_port_id': 20612833, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269368, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'Carton_brun': {'main_port_id': 20612767, 'sub_port_id': 20612834, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269369, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'mal_croppe': {'main_port_id': 20612767, 'sub_port_id': 20612835, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269370, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'autre_refus': {'main_port_id': 20612767, 'sub_port_id': 20612836, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269371, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'kraft': {'main_port_id': 20612767, 'sub_port_id': 20612837, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269372, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'flou': {'main_port_id': 20612767, 'sub_port_id': 20612838, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269373, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'environnement': {'main_port_id': 20612767, 'sub_port_id': 20612839, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269374, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'Carton_gris': {'main_port_id': 20612767, 'sub_port_id': 20612840, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269375, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 20612767, 'sub_port_id': 20612841, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269376, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'papier': {'main_port_id': 20612767, 'sub_port_id': 20612842, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269377, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'plastique': {'main_port_id': 20612767, 'sub_port_id': 20612843, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269378, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}, 'cartonnette': {'main_port_id': 20612767, 'sub_port_id': 20612844, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13269379, 'last_updated_at': datetime.datetime(2025, 2, 17, 16, 49, 30), 'last_updated_at_desc': datetime.datetime(2025, 2, 17, 16, 49, 30), 'last_updated_at_asc': datetime.datetime(2025, 2, 17, 16, 49, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612833,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612821 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612834,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612822 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612835,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612823 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612836,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612824 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612837,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612825 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612838,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612826 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612839,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612827 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612840,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612828 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612841,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612829 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612842,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612830 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612843,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612831 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20612844,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20612832 lien utilise dans velours : https://www.fotonower.com/velours/20612833,20612834,20612835,20612836,20612837,20612838,20612839,20612840,20612841,20612842,20612843,20612844?tags=metal,Carton_brun,mal_croppe,autre_refus,kraft,flou,environnement,Carton_gris,Teint_Dans_La_Masse,papier,plastique,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20612767]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] map_info['map_portfolio_photo'] : {20612767: [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307, 1338183233, 1338183226, 1338183224, 1338183205, 1338183199, 1338183171, 1338183069, 1338182967, 1338182911, 1338182893, 1338182889, 1338182881, 1338182878, 1338182876]} final : False mtd_id 4302 list_pids : [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] Looping around the photos to save general results len do output : 1 /20612767. 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, '2593817') ('4302', '20612767', '1338183531', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183515', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183510', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183504', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183488', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183375', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183372', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183315', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183310', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183307', None, None, None, None, None, '2593817') 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', None, '20612767', "{'metal': 20612821, 'Carton_brun': 20612822, 'mal_croppe': 20612823, 'autre_refus': 20612824, 'kraft': 20612825, 'flou': 20612826, 'environnement': 20612827, 'Carton_gris': 20612828, 'Teint_Dans_La_Masse': 20612829, 'papier': 20612830, 'plastique': 20612831, 'cartonnette': 20612832}", None, None, None, None, '2593817'), ('4302', '20612767', '1338183531', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183515', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183510', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183504', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183488', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183375', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183372', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183315', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183310', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183307', None, None, None, None, None, '2593817')] time used for this insertion : 0.013714075088500977 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.419538974761963 time spend to save output : 0.014019012451171875 total time spend for step 1 : 1.4335579872131348 step2:final Mon Feb 17 16:50:31 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20612767) 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 20612767 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1338182893,1338182889,1338182881,1338182878,1338182876,1338183205,1338183199,1338183171,1338183069,1338182967,1338182911,1338183233,1338183226,1338183224,1338183375,1338183372,1338183315,1338183310,1338183307,1338183531,1338183515,1338183510,1338183504,1338183488); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20612767]) Inside saveOutput : final : False verbose : True original output for save of step final : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} new output for save of step final : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] map_info['map_portfolio_photo'] : {20612767: [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307, 1338183233, 1338183226, 1338183224, 1338183205, 1338183199, 1338183171, 1338183069, 1338182967, 1338182911, 1338182893, 1338182889, 1338182881, 1338182878, 1338182876]} final : False mtd_id 4302 list_pids : [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] Looping around the photos to save general results len do output : 10 /1338183531.Didn't retrieve data . /1338183515.Didn't retrieve data . /1338183510.Didn't retrieve data . /1338183504.Didn't retrieve data . /1338183488.Didn't retrieve data . /1338183375.Didn't retrieve data . /1338183372.Didn't retrieve data . /1338183315.Didn't retrieve data . /1338183310.Didn't retrieve data . /1338183307.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, '2593817') ('4302', '20612767', '1338183531', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183515', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183510', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183504', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183488', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183375', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183372', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183315', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183310', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183307', None, None, None, None, None, '2593817') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '20612767', '1338183531', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183515', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183510', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183504', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183488', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183375', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183372', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183315', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183310', '0.0', None, None, None, None, '2593817'), ('4302', '20612767', '1338183307', '0.0', None, None, None, None, '2593817')] time used for this insertion : 0.013849020004272461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05076289176940918 time spend to save output : 0.014461278915405273 total time spend for step 2 : 0.06522417068481445 step3:velours_tree Mon Feb 17 16:50:31 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {20612767: [{'metal': 20612821, 'Carton_brun': 20612822, 'mal_croppe': 20612823, 'autre_refus': 20612824, 'kraft': 20612825, 'flou': 20612826, 'environnement': 20612827, 'Carton_gris': 20612828, 'Teint_Dans_La_Masse': 20612829, 'papier': 20612830, 'plastique': 20612831, 'cartonnette': 20612832}]} input_args_next_step : {20612767: ()} output_args : {20612767: [{'metal': 20612821, 'Carton_brun': 20612822, 'mal_croppe': 20612823, 'autre_refus': 20612824, 'kraft': 20612825, 'flou': 20612826, 'environnement': 20612827, 'Carton_gris': 20612828, 'Teint_Dans_La_Masse': 20612829, 'papier': 20612830, 'plastique': 20612831, 'cartonnette': 20612832}]} args : 20612767 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 : ({'metal': 20612821, 'Carton_brun': 20612822, 'mal_croppe': 20612823, 'autre_refus': 20612824, 'kraft': 20612825, 'flou': 20612826, 'environnement': 20612827, 'Carton_gris': 20612828, 'Teint_Dans_La_Masse': 20612829, 'papier': 20612830, 'plastique': 20612831, 'cartonnette': 20612832},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20612767) 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([20612767]) 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.3096351623535156 time spend to save output : 5.53131103515625e-05 total time spend for step 3 : 0.3096904754638672 step4:send_mail_cod Mon Feb 17 16:50:32 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} input_args_next_step : {1338183531: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183531 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183515 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183510 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183504 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183488 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183375 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183372 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183315 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183310 depend.output_id : 0 input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ()} output_args : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',)} args : 1338183307 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 : {20612767: [{'metal': 20612821, 'Carton_brun': 20612822, 'mal_croppe': 20612823, 'autre_refus': 20612824, 'kraft': 20612825, 'flou': 20612826, 'environnement': 20612827, 'Carton_gris': 20612828, 'Teint_Dans_La_Masse': 20612829, 'papier': 20612830, 'plastique': 20612831, 'cartonnette': 20612832}]} input_args_next_step : {1338183531: ('0.0',), 1338183515: ('0.0',), 1338183510: ('0.0',), 1338183504: ('0.0',), 1338183488: ('0.0',), 1338183375: ('0.0',), 1338183372: ('0.0',), 1338183315: ('0.0',), 1338183310: ('0.0',), 1338183307: ('0.0',), 20612767: ()} output_args : {20612767: [{'metal': 20612821, 'Carton_brun': 20612822, 'mal_croppe': 20612823, 'autre_refus': 20612824, 'kraft': 20612825, 'flou': 20612826, 'environnement': 20612827, 'Carton_gris': 20612828, 'Teint_Dans_La_Masse': 20612829, 'papier': 20612830, 'plastique': 20612831, 'cartonnette': 20612832}]} args : 20612767 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 :11, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20612767) 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 (1338183531,1338183515,1338183510,1338183504,1338183488,1338183375,1338183372,1338183315,1338183310,1338183307) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1338183307 begin to download photo : 1338183372 begin to download photo : 1338183504 begin to download photo : 1338183531 download finish for photo 1338183372 begin to download photo : 1338183375 download finish for photo 1338183531 download finish for photo 1338183307 begin to download photo : 1338183310 download finish for photo 1338183504 begin to download photo : 1338183510 download finish for photo 1338183310 begin to download photo : 1338183315 download finish for photo 1338183375 begin to download photo : 1338183488 download finish for photo 1338183510 begin to download photo : 1338183515 download finish for photo 1338183315 download finish for photo 1338183488 download finish for photo 1338183515 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette206128211739807432/ imagette206128231739807432/ imagette206128241739807432/ imagette206128251739807432/ imagette206128261739807432/ imagette206128311739807432/ imagette206128321739807432/ imagette206128221739807432/ imagette206128281739807432/ imagette206128291739807432/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P20612767_17-02-2025_16_50_32.pdf 20612821 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=20612821 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128211739807432 20612823 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=20612823 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128231739807432 20612824 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=20612824 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128241739807432 20612825 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=20612825 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128251739807432 20612826 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=20612826 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128261739807432 20612831 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=20612831 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128311739807432 20612832 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=20612832 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128321739807432 20612822 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=20612822 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128221739807432 20612828 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=20612828 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128281739807432 20612829 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=20612829 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206128291739807432 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20612767 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20612833,20612834,20612835,20612836,20612837,20612838,20612839,20612840,20612841,20612842,20612843,20612844?tags=metal,Carton_brun,mal_croppe,autre_refus,kraft,flou,environnement,Carton_gris,Teint_Dans_La_Masse,papier,plastique,cartonnette your option no_mail is active, we will not send the real mail to your client args[1338183531] : ('0.0',) no score found for photo 1338183531 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183515] : ('0.0',) no score found for photo 1338183515 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183510] : ('0.0',) no score found for photo 1338183510 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183504] : ('0.0',) no score found for photo 1338183504 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183488] : ('0.0',) no score found for photo 1338183488 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183375] : ('0.0',) no score found for photo 1338183375 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183372] : ('0.0',) no score found for photo 1338183372 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183315] : ('0.0',) no score found for photo 1338183315 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183310] : ('0.0',) no score found for photo 1338183310 apple ('0.0',) We are sending mail with results at report@fotonower.com args[1338183307] : ('0.0',) no score found for photo 1338183307 apple ('0.0',) We are sending mail with results at report@fotonower.com refus_total : 0.0 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=20612767 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_P20612767_17-02-2025_16_50_32.pdf results_Auto_P20612767_17-02-2025_16_50_32.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20612767_17-02-2025_16_50_32.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','20612767','results_Auto_P20612767_17-02-2025_16_50_32.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20612767_17-02-2025_16_50_32.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20612767]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] map_info['map_portfolio_photo'] : {20612767: [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307, 1338183233, 1338183226, 1338183224, 1338183205, 1338183199, 1338183171, 1338183069, 1338182967, 1338182911, 1338182893, 1338182889, 1338182881, 1338182878, 1338182876]} final : False mtd_id 4302 list_pids : [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] 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, '2593817') ('4302', '20612767', '1338183531', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183515', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183510', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183504', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183488', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183375', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183372', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183315', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183310', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183307', None, None, None, None, None, '2593817') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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', '20612767', '1338183531', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183515', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183510', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183504', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183488', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183375', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183372', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183315', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183310', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183307', None, None, None, None, None, '2593817')] time used for this insertion : 0.012848615646362305 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.3619530200958252 time spend to save output : 0.013057947158813477 total time spend for step 4 : 1.3750109672546387 step5:split_time_score Mon Feb 17 16:50:33 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['20612767'] 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 : [('20612767',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20612767) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1338183531: {'path': 'temp/1739807432_3223_1338183531_5320026cba387cb242b5cf6b469cc324.jpg', 'extension': 'jpg'}, 1338183307: {'path': 'temp/1739807432_3223_1338183307_61645681b314e8ce976374aaec3f331f.jpg', 'extension': 'jpg'}, 1338183310: {'path': 'temp/1739807432_3223_1338183310_c1a9a6303b8a3e176ba4f51d64a50aa6.jpg', 'extension': 'jpg'}, 1338183315: {'path': 'temp/1739807432_3223_1338183315_ab9ddfc36db759dff204ea0746aaeb41.jpg', 'extension': 'jpg'}, 1338183372: {'path': 'temp/1739807432_3223_1338183372_41008a554584a530ffeb117c48e5c82b.jpg', 'extension': 'jpg'}, 1338183375: {'path': 'temp/1739807432_3223_1338183375_de9a67f37697db519cb861887fa52044.jpg', 'extension': 'jpg'}, 1338183488: {'path': 'temp/1739807432_3223_1338183488_c1f7ba05183f04eed48d2e104dab521f.jpg', 'extension': 'jpg'}, 1338183504: {'path': 'temp/1739807432_3223_1338183504_15c976c5cbbf5af15904961f2b4f1887.jpg', 'extension': 'jpg'}, 1338183510: {'path': 'temp/1739807432_3223_1338183510_8f8a729537a10f5865ea48cfa062d9f0.jpg', 'extension': 'jpg'}, 1338183515: {'path': 'temp/1739807432_3223_1338183515_a560f68fd94623b650b938df3f45ea2f.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 = 20612767; (('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 = 20612767 group by h (('16', 24),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20612767 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 (20612767) 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 (20612767) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17022025 20612767 Nombre de photos uploadées : 24 / 23040 (0%) 17022025 20612767 Nombre de photos taguées (types de déchets): 0 / 24 (0%) 17022025 20612767 Nombre de photos taguées (volume) : 0 / 24 (0%) [{'photo_id': 1338182893, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/8c49b0226c8f8fc2cc7f8003c13affc1.jpg', 'username': None, 'uploaded_at': 1739807167, 'text': 'image_17022025_16_45_04_10152.jpg'}, {'photo_id': 1338182889, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/aaa2813fa23f811187301fe899857d53.jpg', 'username': None, 'uploaded_at': 1739807167, 'text': 'image_17022025_16_45_13_9125.jpg'}, {'photo_id': 1338182881, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/b0771b53caf5bcdbd7090c5ea04714d5.jpg', 'username': None, 'uploaded_at': 1739807167, 'text': 'image_17022025_16_45_24_10141.jpg'}, {'photo_id': 1338182878, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/17/edf6e05457753e08bdf6f91b87ee4d8d.jpg', 'username': None, 'uploaded_at': 1739807167, 'text': 'image_17022025_16_45_34_10142.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ???????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0010247230529785156 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20612767, '2025-02-17' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1607134,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.024028539657592773 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= 1607134 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1607134, 'dashboard_run_id': 1615983, 'mtr_portfolio_id': 20610930, 'dashboard_result_id': 8932538, '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_P20610930_17-02-2025_16_17_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20610958, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20610959, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20610960, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20610961, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20610962, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20610963, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20610964, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20610965, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20610966, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20610967, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20610968, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20610969, 'pht': 3726}}"}, {'dashboat_entry_day': 1607134, 'dashboard_run_id': 1615983, 'mtr_portfolio_id': 20611466, 'dashboard_result_id': 8932539, '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_P20611466_17-02-2025_16_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20611494, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20611495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20611496, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20611497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20611498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20611499, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20611500, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20611501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20611502, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20611503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20611504, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20611505, 'pht': 3726}}"}, {'dashboat_entry_day': 1607134, 'dashboard_run_id': 1615983, 'mtr_portfolio_id': 20612080, 'dashboard_result_id': 8932540, '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_P20612080_17-02-2025_16_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20612141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20612142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20612143, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20612144, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20612145, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20612146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20612147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20612148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20612149, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20612150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20612151, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20612152, 'pht': 3726}}"}, {'dashboat_entry_day': 1607134, 'dashboard_run_id': 1615983, 'mtr_portfolio_id': 20612767, 'dashboard_result_id': 8932541, '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_P20612767_17-02-2025_16_49_30.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20612821, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20612822, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20612823, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20612824, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20612825, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20612826, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20612827, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20612828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20612829, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20612830, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20612831, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20612832, '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 = 20610930 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': 2593646, 'mtr_portfolio_id': 20610930, 'created_at': datetime.datetime(2025, 2, 17, 16, 17), 'result': '0.03280718177372909', 'result_long': None, 'result_double': None}] Qualite : 0.03280718177372909 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20610930 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20610930_17-02-2025_16_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20610930 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_P20610930_17-02-2025_16_17_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20610958, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20610959, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20610960, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20610961, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20610962, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20610963, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20610964, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20610965, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20610966, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20610967, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20610968, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20610969, 'pht': 3726}}" where mtr_portfolio_id = 20610930 and dashboard_run_id = 1615983 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`=20610930 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8932538, 0.03280718177372909, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20610930_17-02-2025_16_17_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20610958, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20610959, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20610960, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20610961, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20610962, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20610963, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20610964, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20610965, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20610966, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20610967, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20610968, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20610969, '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 = 20611466 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': 2593686, 'mtr_portfolio_id': 20611466, 'created_at': datetime.datetime(2025, 2, 17, 16, 32, 59), 'result': '0.06433049405998875', 'result_long': None, 'result_double': None}] Qualite : 0.06433049405998875 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20611466 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20611466_17-02-2025_16_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20611466 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_P20611466_17-02-2025_16_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20611494, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20611495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20611496, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20611497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20611498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20611499, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20611500, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20611501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20611502, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20611503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20611504, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20611505, 'pht': 3726}}" where mtr_portfolio_id = 20611466 and dashboard_run_id = 1615983 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`=20611466 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8932539, 0.06433049405998875, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20611466_17-02-2025_16_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 20611494, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20611495, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20611496, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20611497, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20611498, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20611499, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20611500, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20611501, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20611502, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20611503, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20611504, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20611505, '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 = 20612080 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': 2593721, 'mtr_portfolio_id': 20612080, 'created_at': datetime.datetime(2025, 2, 17, 16, 48, 58), 'result': '0.06081060962300819', 'result_long': None, 'result_double': None}] Qualite : 0.06081060962300819 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20612080 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20612080_17-02-2025_16_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20612080 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_P20612080_17-02-2025_16_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20612141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20612142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20612143, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20612144, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20612145, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20612146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20612147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20612148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20612149, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20612150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20612151, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20612152, 'pht': 3726}}" where mtr_portfolio_id = 20612080 and dashboard_run_id = 1615983 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`=20612080 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8932540, 0.06081060962300819, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20612080_17-02-2025_16_48_59.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20612141, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20612142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20612143, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20612144, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20612145, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20612146, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20612147, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20612148, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20612149, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20612150, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20612151, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20612152, '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 = 20612767 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20612767 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 20612767 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20612767 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20612767 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20612767 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20612767_17-02-2025_16_50_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20612767 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_P20612767_17-02-2025_16_50_32.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20612821, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20612822, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20612823, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20612824, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20612825, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20612826, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20612827, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20612828, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20612829, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20612830, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20612831, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20612832, 'pht': 3726}}" where mtr_portfolio_id = 20612767 and dashboard_run_id = 1615983 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20610930,20611466,20612080,20612767) result : ((1338176124,), (1338176128,), (1338176132,), (1338176135,), (1338176463,), (1338176466,), (1338176470,), (1338176477,), (1338176483,), (1338176507,), (1338176510,), (1338176514,), (1338176527,), (1338176533,), (1338176589,), (1338176592,), (1338176596,), (1338176602,), (1338176922,), (1338177006,), (1338177130,), (1338177194,), (1338177198,), (1338177640,), (1338177750,), (1338177840,), (1338177936,), (1338178076,), (1338178520,), (1338178585,), (1338178592,), (1338178717,), (1338178719,), (1338178723,), (1338178727,), (1338178729,), (1338178750,), (1338178752,), (1338178755,), (1338178758,), (1338178761,), (1338178765,), (1338178782,), (1338178784,), (1338178794,), (1338178834,), (1338178837,), (1338178840,), (1338178843,), (1338179117,), (1338179159,), (1338179206,), (1338179208,), (1338179212,), (1338179216,), (1338179220,), (1338179223,), (1338179267,), (1338179270,), (1338179274,), (1338179302,), (1338179305,), (1338179310,), (1338179313,), (1338179315,), (1338179320,), (1338179352,), (1338179338,), (1338179341,), (1338179345,), (1338179349,), (1338179670,), (1338179674,), (1338179678,), (1338179689,), (1338179736,), (1338179740,), (1338179744,), (1338179749,), (1338179751,), (1338179908,), (1338179918,), (1338180031,), (1338180199,), (1338180399,), (1338180622,), (1338180624,), (1338180665,), (1338180746,), (1338180748,), (1338180751,), (1338180754,), (1338180756,), (1338180777,), (1338180780,), (1338180784,), (1338180793,), (1338180796,), (1338180842,), (1338180844,), (1338180847,), (1338180940,), (1338180941,), (1338180959,), (1338180961,), (1338180964,), (1338180967,), (1338180971,), (1338180973,), (1338181098,), (1338181101,), (1338181105,), (1338181109,), (1338181114,), (1338181161,), (1338181163,), (1338181167,), (1338181171,), (1338181228,), (1338181230,), (1338181233,), (1338181236,), (1338181239,), (1338181242,), (1338181261,), (1338181263,), (1338181266,), (1338181331,), (1338181334,), (1338181390,), (1338181396,), (1338181399,), (1338181402,), (1338181404,), (1338181428,), (1338181431,), (1338181434,), (1338181438,), (1338181442,), (1338181446,), (1338181713,), (1338181675,), (1338181694,), (1338181702,), (1338181744,), (1338181747,), (1338181751,), (1338181753,), (1338181755,), (1338181927,), (1338181981,), (1338181987,), (1338181990,), (1338181992,), (1338182015,), (1338182114,), (1338182115,), (1338182119,), (1338182122,), (1338182145,), (1338182148,), (1338182151,), (1338182155,), (1338182200,), (1338182202,), (1338182207,), (1338182214,), (1338182218,), (1338182221,), (1338182481,), (1338182486,), (1338182488,), (1338182491,), (1338182552,), (1338182556,), (1338182572,), (1338182601,), (1338182603,), (1338182606,), (1338182608,), (1338182614,), (1338182618,), (1338182633,), (1338182635,), (1338182638,), (1338182643,), (1338182672,), (1338182674,), (1338182677,), (1338182680,), (1338182708,), (1338182715,), (1338182718,), (1338182721,), (1338182724,), (1338182727,), (1338182743,), (1338182745,), (1338182748,), (1338182751,), (1338182762,), (1338182768,), (1338182803,), (1338182805,), (1338182808,), (1338182811,), (1338182847,), (1338182849,), (1338182852,), (1338182896,), (1338182876,), (1338182878,), (1338182881,), (1338182889,), (1338182893,), (1338182911,), (1338182967,), (1338183069,), (1338183171,), (1338183199,), (1338183205,), (1338183224,), (1338183226,), (1338183233,), (1338183307,), (1338183310,), (1338183315,), (1338183372,), (1338183375,), (1338183488,), (1338183504,), (1338183510,), (1338183515,), (1338183531,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17022025': {'nb_upload': 24, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20612767]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] map_info['map_portfolio_photo'] : {20612767: [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307, 1338183233, 1338183226, 1338183224, 1338183205, 1338183199, 1338183171, 1338183069, 1338182967, 1338182911, 1338182893, 1338182889, 1338182881, 1338182878, 1338182876]} final : True mtd_id 4302 list_pids : [1338183531, 1338183515, 1338183510, 1338183504, 1338183488, 1338183375, 1338183372, 1338183315, 1338183310, 1338183307] Looping around the photos to save general results len do output : 1 /20612767Didn'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, '2593817') ('4302', '20612767', '1338183531', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183515', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183510', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183504', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183488', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183375', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183372', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183315', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183310', None, None, None, None, None, '2593817') ('4302', None, None, None, None, None, None, None, '2593817') ('4302', '20612767', '1338183307', None, None, None, None, None, '2593817') 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', None, '20612767', 'None', None, None, None, None, '2593817'), ('4302', '20612767', '1338183531', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183515', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183510', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183504', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183488', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183375', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183372', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183315', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183310', None, None, None, None, None, '2593817'), ('4302', '20612767', '1338183307', None, None, None, None, None, '2593817')] time used for this insertion : 0.013092517852783203 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3198275566101074 time spend to save output : 0.013346195220947266 total time spend for step 5 : 0.3331737518310547 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 (2593817) 2.52user 2.07system 0:08.14elapsed 56%CPU (0avgtext+0avgdata 159020maxresident)k 256inputs+6216outputs (6major+75103minor)pagefaults 0swaps