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 : 2541433 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 (2643233) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2643233) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118295 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2643233'] with mtr_portfolio_ids : ['21118295'] and first list_photo_ids : [] new path : /proc/2541433/ Name: python3 Umask: 0002 State: R (running) Tgid: 2541433 Ngid: 0 Pid: 2541433 PPid: 2541432 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2541433 NSpid: 2541433 NSpgid: 2540666 NSsid: 2540666 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98524 kB VmRSS: 98524 kB RssAnon: 59760 kB RssFile: 38764 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 544 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 3/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: 71 nonvoluntary_ctxt_switches: 113 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2541433', 'Ngid': '0', 'Pid': '2541433', 'PPid': '2541432', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2541433', 'NSpid': '2541433', 'NSpgid': '2540666', 'NSsid': '2540666', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98524 kB', 'VmRSS': '98524 kB', 'RssAnon': '59760 kB', 'RssFile': '38764 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '544 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '3/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': '71', 'nonvoluntary_ctxt_switches': '113'} ('datou_batch_current', '2541433', '1106928', '0', '1106928', '865676', '98524', b'', 'marlene', '2643233') 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 (21118295) 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 (2643233 ) ) 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 (21118295) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1341266679, 'portfolio_id': 21118295}, {'photo_id': 1341266674, 'portfolio_id': 21118295}, {'photo_id': 1341266671, 'portfolio_id': 21118295}, {'photo_id': 1341266666, 'portfolio_id': 21118295}, {'photo_id': 1341266660, 'portfolio_id': 21118295}, {'photo_id': 1341266642, 'portfolio_id': 21118295}, {'photo_id': 1341266623, 'portfolio_id': 21118295}, {'photo_id': 1341266619, 'portfolio_id': 21118295}, {'photo_id': 1341266403, 'portfolio_id': 21118295}, {'photo_id': 1341266308, 'portfolio_id': 21118295}, {'photo_id': 1341266268, 'portfolio_id': 21118295}, {'photo_id': 1341266261, 'portfolio_id': 21118295}, {'photo_id': 1341266252, 'portfolio_id': 21118295}, {'photo_id': 1341266248, 'portfolio_id': 21118295}, {'photo_id': 1341266172, 'portfolio_id': 21118295}, {'photo_id': 1341265985, 'portfolio_id': 21118295}, {'photo_id': 1341265978, 'portfolio_id': 21118295}, {'photo_id': 1341265962, 'portfolio_id': 21118295}, {'photo_id': 1341265952, 'portfolio_id': 21118295}, {'photo_id': 1341265941, 'portfolio_id': 21118295}, {'photo_id': 1341265936, 'portfolio_id': 21118295}, {'photo_id': 1341265839, 'portfolio_id': 21118295}, {'photo_id': 1341265773, 'portfolio_id': 21118295}, {'photo_id': 1341265475, 'portfolio_id': 21118295}, {'photo_id': 1341265470, 'portfolio_id': 21118295}, {'photo_id': 1341265436, 'portfolio_id': 21118295}, {'photo_id': 1341265422, 'portfolio_id': 21118295}, {'photo_id': 1341265418, 'portfolio_id': 21118295}, {'photo_id': 1341265413, 'portfolio_id': 21118295}, {'photo_id': 1341265409, 'portfolio_id': 21118295}, {'photo_id': 1341265391, 'portfolio_id': 21118295}, {'photo_id': 1341265377, 'portfolio_id': 21118295}, {'photo_id': 1341265316, 'portfolio_id': 21118295}, {'photo_id': 1341265298, 'portfolio_id': 21118295}, {'photo_id': 1341265297, 'portfolio_id': 21118295}, {'photo_id': 1341265289, 'portfolio_id': 21118295}, {'photo_id': 1341265220, 'portfolio_id': 21118295}, {'photo_id': 1341265217, 'portfolio_id': 21118295}, {'photo_id': 1341265212, 'portfolio_id': 21118295}, {'photo_id': 1341265210, 'portfolio_id': 21118295}, {'photo_id': 1341265205, 'portfolio_id': 21118295}, {'photo_id': 1341265200, 'portfolio_id': 21118295}, {'photo_id': 1341265178, 'portfolio_id': 21118295}, {'photo_id': 1341265084, 'portfolio_id': 21118295}, {'photo_id': 1341265080, 'portfolio_id': 21118295}, {'photo_id': 1341265075, 'portfolio_id': 21118295}, {'photo_id': 1341265069, 'portfolio_id': 21118295}] map_portfolio_id_photo_id: {21118295: [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248, 1341266172, 1341265985, 1341265978, 1341265962, 1341265952, 1341265941, 1341265936, 1341265839, 1341265773, 1341265475, 1341265470, 1341265436, 1341265422, 1341265418, 1341265413, 1341265409, 1341265391, 1341265377, 1341265316, 1341265298, 1341265297, 1341265289, 1341265220, 1341265217, 1341265212, 1341265210, 1341265205, 1341265200, 1341265178, 1341265084, 1341265080, 1341265075, 1341265069]} ##### 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.014882802963256836 #### 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 Thu Mar 6 17:19:28 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21118295) 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 : 21118295 get user id for portfolio 21118295 get sub ptf for main ptf 21118295, type 3726 and hashtags ['papier', 'metal', 'mal_croppe', 'Teint_Dans_La_Masse', 'Carton_gris', 'flou', 'autre_refus', 'cartonnette', 'plastique', 'kraft', 'environnement', 'Carton_brun'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21118295 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','mal_croppe','Teint_Dans_La_Masse','Carton_gris','flou','autre_refus','cartonnette','plastique','kraft','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21118295 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','mal_croppe','Teint_Dans_La_Masse','Carton_gris','flou','autre_refus','cartonnette','plastique','kraft','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 21118295, 'sub_port_id': 21118336, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723381, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'Carton_gris': {'main_port_id': 21118295, 'sub_port_id': 21118337, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723382, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'flou': {'main_port_id': 21118295, 'sub_port_id': 21118338, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723383, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'cartonnette': {'main_port_id': 21118295, 'sub_port_id': 21118339, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723384, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'papier': {'main_port_id': 21118295, 'sub_port_id': 21118340, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723385, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'plastique': {'main_port_id': 21118295, 'sub_port_id': 21118341, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723386, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'environnement': {'main_port_id': 21118295, 'sub_port_id': 21118342, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723387, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'mal_croppe': {'main_port_id': 21118295, 'sub_port_id': 21118343, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723388, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'metal': {'main_port_id': 21118295, 'sub_port_id': 21118344, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723389, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'Carton_brun': {'main_port_id': 21118295, 'sub_port_id': 21118345, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723390, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'kraft': {'main_port_id': 21118295, 'sub_port_id': 21118346, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723391, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}, 'autre_refus': {'main_port_id': 21118295, 'sub_port_id': 21118347, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723392, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 26)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118336 , 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=21118295 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 (21118336) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118337 , 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=21118295 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 (21118337) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118338 , 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=21118295 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 (21118338) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118339 , 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=21118295 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 (21118339) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118340 , 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=21118295 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 (21118340) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118341 , 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=21118295 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 (21118341) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118342 , 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=21118295 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 (21118342) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118343 , 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=21118295 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 (21118343) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118344 , 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=21118295 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 (21118344) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118345 , 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=21118295 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 (21118345) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118346 , 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=21118295 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 (21118346) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21118347 , 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=21118295 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 (21118347) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295) result : ((1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) 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 (1341265200) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21118295 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','mal_croppe','Teint_Dans_La_Masse','Carton_gris','flou','autre_refus','cartonnette','plastique','kraft','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21118295 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','metal','mal_croppe','Teint_Dans_La_Masse','Carton_gris','flou','autre_refus','cartonnette','plastique','kraft','environnement','Carton_brun')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 21118295, 'sub_port_id': 21118349, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723393, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'Carton_gris': {'main_port_id': 21118295, 'sub_port_id': 21118350, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723394, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'flou': {'main_port_id': 21118295, 'sub_port_id': 21118351, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723395, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'cartonnette': {'main_port_id': 21118295, 'sub_port_id': 21118352, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723396, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'papier': {'main_port_id': 21118295, 'sub_port_id': 21118353, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723397, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'plastique': {'main_port_id': 21118295, 'sub_port_id': 21118354, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723398, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'environnement': {'main_port_id': 21118295, 'sub_port_id': 21118355, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723399, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'mal_croppe': {'main_port_id': 21118295, 'sub_port_id': 21118356, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723400, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'metal': {'main_port_id': 21118295, 'sub_port_id': 21118357, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723401, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'Carton_brun': {'main_port_id': 21118295, 'sub_port_id': 21118358, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723402, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'kraft': {'main_port_id': 21118295, 'sub_port_id': 21118359, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723403, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 13, 27), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}, 'autre_refus': {'main_port_id': 21118295, 'sub_port_id': 21118360, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13723404, 'last_updated_at': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_desc': datetime.datetime(2025, 3, 6, 17, 17, 4), 'last_updated_at_asc': datetime.datetime(2025, 3, 6, 17, 13, 27)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118349,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118336 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118350,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118337 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118351,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118338 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118352,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118339 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118353,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118340 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118354,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118341 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118355,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118342 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118356,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118343 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118357,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118344 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118358,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118345 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118359,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118346 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21118360,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21118347 lien utilise dans velours : https://www.fotonower.com/velours/21118349,21118350,21118351,21118352,21118353,21118354,21118355,21118356,21118357,21118358,21118359,21118360?tags=Teint_Dans_La_Masse,Carton_gris,flou,cartonnette,papier,plastique,environnement,mal_croppe,metal,Carton_brun,kraft,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21118295]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] map_info['map_portfolio_photo'] : {21118295: [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248, 1341266172, 1341265985, 1341265978, 1341265962, 1341265952, 1341265941, 1341265936, 1341265839, 1341265773, 1341265475, 1341265470, 1341265436, 1341265422, 1341265418, 1341265413, 1341265409, 1341265391, 1341265377, 1341265316, 1341265298, 1341265297, 1341265289, 1341265220, 1341265217, 1341265212, 1341265210, 1341265205, 1341265200, 1341265178, 1341265084, 1341265080, 1341265075, 1341265069]} final : False mtd_id 4302 list_pids : [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] Looping around the photos to save general results len do output : 1 /21118295. 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, '2643233') ('4302', '21118295', '1341266679', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266674', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266671', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266666', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266660', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266642', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266623', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266619', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266403', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266308', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266268', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266261', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266252', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266248', None, None, None, None, None, '2643233') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '21118295', "{'Teint_Dans_La_Masse': 21118336, 'Carton_gris': 21118337, 'flou': 21118338, 'cartonnette': 21118339, 'papier': 21118340, 'plastique': 21118341, 'environnement': 21118342, 'mal_croppe': 21118343, 'metal': 21118344, 'Carton_brun': 21118345, 'kraft': 21118346, 'autre_refus': 21118347}", None, None, None, None, '2643233'), ('4302', '21118295', '1341266679', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266674', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266671', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266666', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266660', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266642', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266623', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266619', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266403', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266308', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266268', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266261', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266252', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266248', None, None, None, None, None, '2643233')] time used for this insertion : 0.015580892562866211 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4311790466308594 time spend to save output : 0.016014814376831055 total time spend for step 1 : 0.44719386100769043 step2:final Thu Mar 6 17:19:28 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 (21118295) 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 21118295 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1341266679,1341266674,1341266671,1341266666,1341266660,1341266642,1341266623,1341266619,1341266403,1341266308,1341266268,1341266261,1341266252,1341266248,1341266172,1341265985,1341265978,1341265962,1341265952,1341265941,1341265936,1341265839,1341265773,1341265475,1341265470,1341265436,1341265422,1341265418,1341265413,1341265409,1341265391,1341265377,1341265316,1341265298,1341265297,1341265289,1341265220,1341265217,1341265212,1341265210,1341265205,1341265200,1341265178,1341265084,1341265080,1341265075,1341265069); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21118295]) Inside saveOutput : final : False verbose : True original output for save of step final : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} new output for save of step final : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] map_info['map_portfolio_photo'] : {21118295: [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248, 1341266172, 1341265985, 1341265978, 1341265962, 1341265952, 1341265941, 1341265936, 1341265839, 1341265773, 1341265475, 1341265470, 1341265436, 1341265422, 1341265418, 1341265413, 1341265409, 1341265391, 1341265377, 1341265316, 1341265298, 1341265297, 1341265289, 1341265220, 1341265217, 1341265212, 1341265210, 1341265205, 1341265200, 1341265178, 1341265084, 1341265080, 1341265075, 1341265069]} final : False mtd_id 4302 list_pids : [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] Looping around the photos to save general results len do output : 14 /1341266679.Didn't retrieve data . /1341266674.Didn't retrieve data . /1341266671.Didn't retrieve data . /1341266666.Didn't retrieve data . /1341266660.Didn't retrieve data . /1341266642.Didn't retrieve data . /1341266623.Didn't retrieve data . /1341266619.Didn't retrieve data . /1341266403.Didn't retrieve data . /1341266308.Didn't retrieve data . /1341266268.Didn't retrieve data . /1341266261.Didn't retrieve data . /1341266252.Didn't retrieve data . /1341266248.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, '2643233') ('4302', '21118295', '1341266679', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266674', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266671', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266666', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266660', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266642', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266623', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266619', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266403', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266308', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266268', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266261', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266252', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266248', None, None, None, None, None, '2643233') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '21118295', '1341266679', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266674', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266671', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266666', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266660', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266642', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266623', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266619', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266403', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266308', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266268', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266261', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266252', '0.0', None, None, None, None, '2643233'), ('4302', '21118295', '1341266248', '0.0', None, None, None, None, '2643233')] time used for this insertion : 0.01552724838256836 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.05273628234863281 time spend to save output : 0.016232013702392578 total time spend for step 2 : 0.06896829605102539 step3:velours_tree Thu Mar 6 17:19:28 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec 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 : {21118295: [{'Teint_Dans_La_Masse': 21118336, 'Carton_gris': 21118337, 'flou': 21118338, 'cartonnette': 21118339, 'papier': 21118340, 'plastique': 21118341, 'environnement': 21118342, 'mal_croppe': 21118343, 'metal': 21118344, 'Carton_brun': 21118345, 'kraft': 21118346, 'autre_refus': 21118347}]} input_args_next_step : {21118295: ()} output_args : {21118295: [{'Teint_Dans_La_Masse': 21118336, 'Carton_gris': 21118337, 'flou': 21118338, 'cartonnette': 21118339, 'papier': 21118340, 'plastique': 21118341, 'environnement': 21118342, 'mal_croppe': 21118343, 'metal': 21118344, 'Carton_brun': 21118345, 'kraft': 21118346, 'autre_refus': 21118347}]} args : 21118295 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Teint_Dans_La_Masse': 21118336, 'Carton_gris': 21118337, 'flou': 21118338, 'cartonnette': 21118339, 'papier': 21118340, 'plastique': 21118341, 'environnement': 21118342, 'mal_croppe': 21118343, 'metal': 21118344, 'Carton_brun': 21118345, 'kraft': 21118346, 'autre_refus': 21118347},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21118295) 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([21118295]) 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.3220515251159668 time spend to save output : 6.937980651855469e-05 total time spend for step 3 : 0.32212090492248535 step4:send_mail_cod Thu Mar 6 17:19:29 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 : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} input_args_next_step : {1341266679: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266679 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266674 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266671 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266666 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266660 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266642 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266623 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266619 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266403 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266308 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266268 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266261 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266252 depend.output_id : 0 input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ()} output_args : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',)} args : 1341266248 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 : {21118295: [{'Teint_Dans_La_Masse': 21118336, 'Carton_gris': 21118337, 'flou': 21118338, 'cartonnette': 21118339, 'papier': 21118340, 'plastique': 21118341, 'environnement': 21118342, 'mal_croppe': 21118343, 'metal': 21118344, 'Carton_brun': 21118345, 'kraft': 21118346, 'autre_refus': 21118347}]} input_args_next_step : {1341266679: ('0.0',), 1341266674: ('0.0',), 1341266671: ('0.0',), 1341266666: ('0.0',), 1341266660: ('0.0',), 1341266642: ('0.0',), 1341266623: ('0.0',), 1341266619: ('0.0',), 1341266403: ('0.0',), 1341266308: ('0.0',), 1341266268: ('0.0',), 1341266261: ('0.0',), 1341266252: ('0.0',), 1341266248: ('0.0',), 21118295: ()} output_args : {21118295: [{'Teint_Dans_La_Masse': 21118336, 'Carton_gris': 21118337, 'flou': 21118338, 'cartonnette': 21118339, 'papier': 21118340, 'plastique': 21118341, 'environnement': 21118342, 'mal_croppe': 21118343, 'metal': 21118344, 'Carton_brun': 21118345, 'kraft': 21118346, 'autre_refus': 21118347}]} args : 21118295 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 :15, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21118295) 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 (1341266679,1341266674,1341266671,1341266666,1341266660,1341266642,1341266623,1341266619,1341266403,1341266308,1341266268,1341266261,1341266252,1341266248) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1341266248 begin to download photo : 1341266268 begin to download photo : 1341266619 begin to download photo : 1341266660 begin to download photo : 1341266674 download finish for photo 1341266674 begin to download photo : 1341266679 download finish for photo 1341266619 begin to download photo : 1341266623 download finish for photo 1341266268 begin to download photo : 1341266308 download finish for photo 1341266660 begin to download photo : 1341266666 download finish for photo 1341266248 begin to download photo : 1341266252 download finish for photo 1341266308 begin to download photo : 1341266403 download finish for photo 1341266679 download finish for photo 1341266623 begin to download photo : 1341266642 download finish for photo 1341266252 begin to download photo : 1341266261 download finish for photo 1341266666 begin to download photo : 1341266671 download finish for photo 1341266403 download finish for photo 1341266642 download finish for photo 1341266261 download finish for photo 1341266671 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette211183381741277969/ imagette211183391741277969/ imagette211183411741277969/ imagette211183431741277969/ imagette211183441741277969/ imagette211183461741277969/ imagette211183471741277969/ imagette211183361741277969/ imagette211183371741277969/ imagette211183451741277969/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P21118295_06-03-2025_17_19_29.pdf 21118338 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=21118338 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183381741277969 21118339 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=21118339 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183391741277969 21118341 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=21118341 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183411741277969 21118343 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=21118343 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183431741277969 21118344 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=21118344 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183441741277969 21118346 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=21118346 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183461741277969 21118347 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=21118347 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183471741277969 21118336 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=21118336 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183361741277969 21118337 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=21118337 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183371741277969 21118345 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=21118345 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette211183451741277969 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21118295 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21118349,21118350,21118351,21118352,21118353,21118354,21118355,21118356,21118357,21118358,21118359,21118360?tags=Teint_Dans_La_Masse,Carton_gris,flou,cartonnette,papier,plastique,environnement,mal_croppe,metal,Carton_brun,kraft,autre_refus your option no_mail is active, we will not send the real mail to your client args[1341266679] : ('0.0',) no score found for photo 1341266679 We are sending mail with results at report@fotonower.com args[1341266674] : ('0.0',) no score found for photo 1341266674 We are sending mail with results at report@fotonower.com args[1341266671] : ('0.0',) no score found for photo 1341266671 We are sending mail with results at report@fotonower.com args[1341266666] : ('0.0',) no score found for photo 1341266666 We are sending mail with results at report@fotonower.com args[1341266660] : ('0.0',) no score found for photo 1341266660 We are sending mail with results at report@fotonower.com args[1341266642] : ('0.0',) no score found for photo 1341266642 We are sending mail with results at report@fotonower.com args[1341266623] : ('0.0',) no score found for photo 1341266623 We are sending mail with results at report@fotonower.com args[1341266619] : ('0.0',) no score found for photo 1341266619 We are sending mail with results at report@fotonower.com args[1341266403] : ('0.0',) no score found for photo 1341266403 We are sending mail with results at report@fotonower.com args[1341266308] : ('0.0',) no score found for photo 1341266308 We are sending mail with results at report@fotonower.com args[1341266268] : ('0.0',) no score found for photo 1341266268 We are sending mail with results at report@fotonower.com args[1341266261] : ('0.0',) no score found for photo 1341266261 We are sending mail with results at report@fotonower.com args[1341266252] : ('0.0',) no score found for photo 1341266252 We are sending mail with results at report@fotonower.com args[1341266248] : ('0.0',) no score found for photo 1341266248 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=21118295 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_P21118295_06-03-2025_17_19_29.pdf results_Auto_P21118295_06-03-2025_17_19_29.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21118295_06-03-2025_17_19_29.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','21118295','results_Auto_P21118295_06-03-2025_17_19_29.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21118295_06-03-2025_17_19_29.pdf','pdf','','0.13','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21118295]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] map_info['map_portfolio_photo'] : {21118295: [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248, 1341266172, 1341265985, 1341265978, 1341265962, 1341265952, 1341265941, 1341265936, 1341265839, 1341265773, 1341265475, 1341265470, 1341265436, 1341265422, 1341265418, 1341265413, 1341265409, 1341265391, 1341265377, 1341265316, 1341265298, 1341265297, 1341265289, 1341265220, 1341265217, 1341265212, 1341265210, 1341265205, 1341265200, 1341265178, 1341265084, 1341265080, 1341265075, 1341265069]} final : False mtd_id 4302 list_pids : [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] 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, '2643233') ('4302', '21118295', '1341266679', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266674', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266671', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266666', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266660', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266642', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266623', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266619', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266403', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266308', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266268', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266261', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266252', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266248', None, None, None, None, None, '2643233') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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', '21118295', '1341266679', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266674', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266671', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266666', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266660', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266642', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266623', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266619', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266403', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266308', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266268', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266261', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266252', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266248', None, None, None, None, None, '2643233')] time used for this insertion : 0.013775110244750977 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.7434375286102295 time spend to save output : 0.014027118682861328 total time spend for step 4 : 1.7574646472930908 step5:split_time_score Thu Mar 6 17:19:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21118295'] 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 : [('21118295',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21118295) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1341266674: {'path': 'temp/1741277969_2541433_1341266674_df282c8d89e36f01e0c78c16ecfa2984.jpg', 'extension': 'jpg'}, 1341266679: {'path': 'temp/1741277969_2541433_1341266679_bdb722de6dcd5af79e5c66d8a40f6a7a.jpg', 'extension': 'jpg'}, 1341266268: {'path': 'temp/1741277969_2541433_1341266268_017b2bb59423bc41d1f188d313ab7a2f.jpg', 'extension': 'jpg'}, 1341266308: {'path': 'temp/1741277969_2541433_1341266308_2f224643d4e7257152b80b02016830a4.jpg', 'extension': 'jpg'}, 1341266403: {'path': 'temp/1741277969_2541433_1341266403_db9c3706021683df0a6e6bdd19af9da2.jpg', 'extension': 'jpg'}, 1341266619: {'path': 'temp/1741277969_2541433_1341266619_6faafac7187e51b42732ade892ab5ae4.jpg', 'extension': 'jpg'}, 1341266623: {'path': 'temp/1741277969_2541433_1341266623_aac7aad5311015f4b1db2b35a1d41d5a.jpg', 'extension': 'jpg'}, 1341266642: {'path': 'temp/1741277969_2541433_1341266642_07f8df8bd6655ff387abf1f816d2b3b7.jpg', 'extension': 'jpg'}, 1341266248: {'path': 'temp/1741277969_2541433_1341266248_17df5931fc4388b2a7c885eb8b753baf.jpg', 'extension': 'jpg'}, 1341266252: {'path': 'temp/1741277969_2541433_1341266252_286e4173e1e9a3fc1cee8cf9a3e5a946.jpg', 'extension': 'jpg'}, 1341266261: {'path': 'temp/1741277969_2541433_1341266261_962028f66128e176380a237360a7c5ec.jpg', 'extension': 'jpg'}, 1341266660: {'path': 'temp/1741277969_2541433_1341266660_98058708993f1a10697e357b4fcf1f21.jpg', 'extension': 'jpg'}, 1341266666: {'path': 'temp/1741277969_2541433_1341266666_c425abe993d39c01b824ecef19d57346.jpg', 'extension': 'jpg'}, 1341266671: {'path': 'temp/1741277969_2541433_1341266671_0f2e6370f7b081cc5bc4131454ecf075.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 = 21118295; (('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 = 21118295 group by h (('16', 47),) 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=21118295 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 (21118295) 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 (21118295) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 06032025 21118295 Nombre de photos uploadées : 47 / 23040 (0%) 06032025 21118295 Nombre de photos taguées (types de déchets): 0 / 47 (0%) 06032025 21118295 Nombre de photos taguées (volume) : 0 / 47 (0%) [{'photo_id': 1341266679, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/6/bdb722de6dcd5af79e5c66d8a40f6a7a.jpg', 'username': None, 'uploaded_at': 1741277843, 'text': 'image_06032025_16_32_24_10134.jpg'}, {'photo_id': 1341266674, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/6/df282c8d89e36f01e0c78c16ecfa2984.jpg', 'username': None, 'uploaded_at': 1741277843, 'text': 'image_06032025_16_32_34_10135.jpg'}, {'photo_id': 1341266671, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/6/0f2e6370f7b081cc5bc4131454ecf075.jpg', 'username': None, 'uploaded_at': 1741277843, 'text': 'image_06032025_16_32_53_9128.jpg'}, {'photo_id': 1341266666, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/6/c425abe993d39c01b824ecef19d57346.jpg', 'username': None, 'uploaded_at': 1741277843, 'text': 'image_06032025_16_33_04_10151.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 1.0013580322265625e-05 ??????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0021660327911376953 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21118295, '2025-03-06' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1643118,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.024947643280029297 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= 1643118 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1643118, 'dashboard_run_id': 1652480, 'mtr_portfolio_id': 21118295, 'dashboard_result_id': 9270981, '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_P21118295_06-03-2025_17_17_05.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21118336, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21118337, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21118338, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21118339, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21118340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21118341, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21118342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21118343, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21118344, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21118345, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21118346, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21118347, 'pht': 3726}}"}, {'dashboat_entry_day': 1643118, 'dashboard_run_id': 1652480, 'mtr_portfolio_id': 21118076, 'dashboard_result_id': 9270982, '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_P21118076_06-03-2025_17_09_06.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21118122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21118123, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21118124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21118125, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21118126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21118127, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21118128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21118129, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21118130, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21118131, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21118132, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21118133, 'pht': 3726}}"}, {'dashboat_entry_day': 1643118, 'dashboard_run_id': 1652480, 'mtr_portfolio_id': 21118079, 'dashboard_result_id': 9270983, '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_P21118079_06-03-2025_17_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21118095, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21118096, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21118097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21118098, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21118099, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21118100, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21118101, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21118102, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21118103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21118104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21118105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21118106, '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 = 21118295 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 = 21118295 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 = 21118295 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21118295 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 = 21118295 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 = 21118295 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21118295_06-03-2025_17_19_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21118295 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_P21118295_06-03-2025_17_19_29.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21118336, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21118337, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21118338, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21118339, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21118340, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21118341, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21118342, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21118343, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21118344, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21118345, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21118346, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21118347, 'pht': 3726}}" where mtr_portfolio_id = 21118295 and dashboard_run_id = 1652480 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 = 21118076 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 = 21118076 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 = 21118076 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21118076 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 = 21118076 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 = 21118076 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21118076_06-03-2025_17_09_06.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21118076 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_P21118076_06-03-2025_17_09_06.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21118122, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21118123, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21118124, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21118125, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21118126, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21118127, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21118128, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21118129, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21118130, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21118131, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21118132, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21118133, 'pht': 3726}}" where mtr_portfolio_id = 21118076 and dashboard_run_id = 1652480 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 = 21118079 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': 2643173, 'mtr_portfolio_id': 21118079, 'created_at': datetime.datetime(2025, 3, 6, 17, 18, 59), 'result': '0.05761263995900692', 'result_long': None, 'result_double': None}] Qualite : 0.05761263995900692 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21118079 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21118079_06-03-2025_17_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21118079 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_P21118079_06-03-2025_17_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21118095, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21118096, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21118097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21118098, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21118099, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21118100, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21118101, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21118102, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21118103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21118104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21118105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21118106, 'pht': 3726}}" where mtr_portfolio_id = 21118079 and dashboard_run_id = 1652480 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`=21118079 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9270983, 0.05761263995900692, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21118079_06-03-2025_17_18_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21118095, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21118096, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21118097, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21118098, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21118099, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21118100, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21118101, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21118102, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21118103, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21118104, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21118105, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21118106, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21118295,21118076,21118079) result : ((1341264473,), (1341264474,), (1341264476,), (1341264478,), (1341264480,), (1341264482,), (1341264543,), (1341264550,), (1341264558,), (1341264564,), (1341264569,), (1341264574,), (1341264600,), (1341264611,), (1341264618,), (1341264628,), (1341264634,), (1341264638,), (1341264668,), (1341264673,), (1341264697,), (1341264704,), (1341264714,), (1341264718,), (1341264722,), (1341264728,), (1341264771,), (1341264779,), (1341264809,), (1341264833,), (1341264839,), (1341264843,), (1341264846,), (1341264851,), (1341264857,), (1341264952,), (1341264966,), (1341264974,), (1341264983,), (1341264989,), (1341264996,), (1341265002,), (1341265030,), (1341265034,), (1341265039,), (1341265058,), (1341265063,), (1341264651,), (1341264656,), (1341264661,), (1341264664,), (1341264736,), (1341264743,), (1341264749,), (1341264763,), (1341264793,), (1341264797,), (1341264800,), (1341264803,), (1341264806,), (1341264869,), (1341264872,), (1341264874,), (1341264876,), (1341264881,), (1341264882,), (1341264886,), (1341264889,), (1341264895,), (1341264897,), (1341264902,), (1341264903,), (1341264923,), (1341264928,), (1341264935,), (1341264942,), (1341264948,), (1341265014,), (1341265019,), (1341265025,), (1341265099,), (1341265102,), (1341265106,), (1341265107,), (1341265110,), (1341265113,), (1341265116,), (1341265120,), (1341265124,), (1341265132,), (1341265137,), (1341265144,), (1341265155,), (1341265160,), (1341265165,), (1341265169,), (1341265174,), (1341265234,), (1341265236,), (1341265240,), (1341265243,), (1341265249,), (1341265259,), (1341265281,), (1341265288,), (1341265340,), (1341265353,), (1341265362,), (1341265368,), (1341265371,), (1341265446,), (1341265454,), (1341265459,), (1341265464,), (1341265507,), (1341265511,), (1341265523,), (1341265529,), (1341265540,), (1341265548,), (1341265565,), (1341265606,), (1341265669,), (1341265720,), (1341266072,), (1341266105,), (1341266116,), (1341266123,), (1341266158,), (1341266190,), (1341266196,), (1341266201,), (1341266206,), (1341266217,), (1341266221,), (1341266614,), (1341265069,), (1341265075,), (1341265080,), (1341265084,), (1341265178,), (1341265200,), (1341265205,), (1341265210,), (1341265212,), (1341265217,), (1341265220,), (1341265289,), (1341265297,), (1341265298,), (1341265316,), (1341265377,), (1341265391,), (1341265409,), (1341265413,), (1341265418,), (1341265422,), (1341265436,), (1341265470,), (1341265475,), (1341265773,), (1341265839,), (1341265936,), (1341265941,), (1341265952,), (1341265962,), (1341265978,), (1341265985,), (1341266172,), (1341266248,), (1341266252,), (1341266261,), (1341266268,), (1341266308,), (1341266403,), (1341266619,), (1341266623,), (1341266642,), (1341266660,), (1341266666,), (1341266671,), (1341266674,), (1341266679,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'06032025': {'nb_upload': 47, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21118295]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] map_info['map_portfolio_photo'] : {21118295: [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248, 1341266172, 1341265985, 1341265978, 1341265962, 1341265952, 1341265941, 1341265936, 1341265839, 1341265773, 1341265475, 1341265470, 1341265436, 1341265422, 1341265418, 1341265413, 1341265409, 1341265391, 1341265377, 1341265316, 1341265298, 1341265297, 1341265289, 1341265220, 1341265217, 1341265212, 1341265210, 1341265205, 1341265200, 1341265178, 1341265084, 1341265080, 1341265075, 1341265069]} final : True mtd_id 4302 list_pids : [1341266679, 1341266674, 1341266671, 1341266666, 1341266660, 1341266642, 1341266623, 1341266619, 1341266403, 1341266308, 1341266268, 1341266261, 1341266252, 1341266248] Looping around the photos to save general results len do output : 1 /21118295Didn'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, '2643233') ('4302', '21118295', '1341266679', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266674', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266671', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266666', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266660', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266642', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266623', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266619', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266403', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266308', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266268', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266261', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266252', None, None, None, None, None, '2643233') ('4302', None, None, None, None, None, None, None, '2643233') ('4302', '21118295', '1341266248', None, None, None, None, None, '2643233') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '21118295', 'None', None, None, None, None, '2643233'), ('4302', '21118295', '1341266679', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266674', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266671', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266666', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266660', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266642', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266623', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266619', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266403', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266308', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266268', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266261', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266252', None, None, None, None, None, '2643233'), ('4302', '21118295', '1341266248', None, None, None, None, None, '2643233')] time used for this insertion : 0.014339685440063477 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.23642206192016602 time spend to save output : 0.014699935913085938 total time spend for step 5 : 0.25112199783325195 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 (2643233) 2.20user 2.18system 0:05.43elapsed 80%CPU (0avgtext+0avgdata 161884maxresident)k 4184inputs+8968outputs (51major+73603minor)pagefaults 0swaps