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 : 941110 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 (2819378) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2819378) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871877 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2819378'] with mtr_portfolio_ids : ['22871877'] and first list_photo_ids : [] new path : /proc/941110/ Name: python3 Umask: 0002 State: R (running) Tgid: 941110 Ngid: 0 Pid: 941110 PPid: 941109 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 941110 NSpid: 941110 NSpgid: 940012 NSsid: 940012 VmPeak: 1107228 kB VmSize: 1107228 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99028 kB VmRSS: 99028 kB RssAnon: 60228 kB RssFile: 38800 kB RssShmem: 0 kB VmData: 865976 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 572 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 40 nonvoluntary_ctxt_switches: 185 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '941110', 'Ngid': '0', 'Pid': '941110', 'PPid': '941109', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '941110', 'NSpid': '941110', 'NSpgid': '940012', 'NSsid': '940012', 'VmPeak': '1107228 kB', 'VmSize': '1107228 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99028 kB', 'VmRSS': '99028 kB', 'RssAnon': '60228 kB', 'RssFile': '38800 kB', 'RssShmem': '0 kB', 'VmData': '865976 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '572 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '40', 'nonvoluntary_ctxt_switches': '185'} ('datou_batch_current', '941110', '1107228', '0', '1107228', '865976', '99028', b'', 'marlene', '2819378') 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 (22871877) 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 (2819378 ) ) 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 (22871877) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1357599507, 'portfolio_id': 22871877}, {'photo_id': 1357599506, 'portfolio_id': 22871877}, {'photo_id': 1357599505, 'portfolio_id': 22871877}, {'photo_id': 1357599504, 'portfolio_id': 22871877}, {'photo_id': 1357599502, 'portfolio_id': 22871877}, {'photo_id': 1357599473, 'portfolio_id': 22871877}, {'photo_id': 1357599472, 'portfolio_id': 22871877}, {'photo_id': 1357599471, 'portfolio_id': 22871877}, {'photo_id': 1357599468, 'portfolio_id': 22871877}, {'photo_id': 1357599429, 'portfolio_id': 22871877}, {'photo_id': 1357599427, 'portfolio_id': 22871877}, {'photo_id': 1357599426, 'portfolio_id': 22871877}, {'photo_id': 1357599425, 'portfolio_id': 22871877}, {'photo_id': 1357599423, 'portfolio_id': 22871877}, {'photo_id': 1357599420, 'portfolio_id': 22871877}, {'photo_id': 1357599403, 'portfolio_id': 22871877}, {'photo_id': 1357599393, 'portfolio_id': 22871877}, {'photo_id': 1357599392, 'portfolio_id': 22871877}, {'photo_id': 1357599391, 'portfolio_id': 22871877}, {'photo_id': 1357599389, 'portfolio_id': 22871877}, {'photo_id': 1357599362, 'portfolio_id': 22871877}, {'photo_id': 1357599360, 'portfolio_id': 22871877}, {'photo_id': 1357599359, 'portfolio_id': 22871877}, {'photo_id': 1357599357, 'portfolio_id': 22871877}, {'photo_id': 1357599327, 'portfolio_id': 22871877}, {'photo_id': 1357599325, 'portfolio_id': 22871877}, {'photo_id': 1357599323, 'portfolio_id': 22871877}, {'photo_id': 1357599322, 'portfolio_id': 22871877}, {'photo_id': 1357599321, 'portfolio_id': 22871877}, {'photo_id': 1357599319, 'portfolio_id': 22871877}, {'photo_id': 1357599292, 'portfolio_id': 22871877}, {'photo_id': 1357599289, 'portfolio_id': 22871877}, {'photo_id': 1357599286, 'portfolio_id': 22871877}, {'photo_id': 1357599284, 'portfolio_id': 22871877}, {'photo_id': 1357599282, 'portfolio_id': 22871877}, {'photo_id': 1357599241, 'portfolio_id': 22871877}, {'photo_id': 1357599240, 'portfolio_id': 22871877}, {'photo_id': 1357599239, 'portfolio_id': 22871877}, {'photo_id': 1357599200, 'portfolio_id': 22871877}, {'photo_id': 1357599198, 'portfolio_id': 22871877}, {'photo_id': 1357599197, 'portfolio_id': 22871877}, {'photo_id': 1357599196, 'portfolio_id': 22871877}, {'photo_id': 1357599194, 'portfolio_id': 22871877}, {'photo_id': 1357599189, 'portfolio_id': 22871877}, {'photo_id': 1357599142, 'portfolio_id': 22871877}, {'photo_id': 1357599141, 'portfolio_id': 22871877}, {'photo_id': 1357599140, 'portfolio_id': 22871877}, {'photo_id': 1357599138, 'portfolio_id': 22871877}, {'photo_id': 1357599137, 'portfolio_id': 22871877}, {'photo_id': 1357599102, 'portfolio_id': 22871877}, {'photo_id': 1357599101, 'portfolio_id': 22871877}, {'photo_id': 1357599100, 'portfolio_id': 22871877}, {'photo_id': 1357599099, 'portfolio_id': 22871877}, {'photo_id': 1357599098, 'portfolio_id': 22871877}, {'photo_id': 1357599069, 'portfolio_id': 22871877}, {'photo_id': 1357599067, 'portfolio_id': 22871877}, {'photo_id': 1357599066, 'portfolio_id': 22871877}, {'photo_id': 1357599065, 'portfolio_id': 22871877}, {'photo_id': 1357599064, 'portfolio_id': 22871877}, {'photo_id': 1357599032, 'portfolio_id': 22871877}, {'photo_id': 1357599031, 'portfolio_id': 22871877}, {'photo_id': 1357599029, 'portfolio_id': 22871877}, {'photo_id': 1357599027, 'portfolio_id': 22871877}, {'photo_id': 1357599006, 'portfolio_id': 22871877}, {'photo_id': 1357599005, 'portfolio_id': 22871877}, {'photo_id': 1357599004, 'portfolio_id': 22871877}, {'photo_id': 1357599003, 'portfolio_id': 22871877}, {'photo_id': 1357599000, 'portfolio_id': 22871877}] map_portfolio_id_photo_id: {22871877: [1357599507, 1357599506, 1357599505, 1357599504, 1357599502, 1357599473, 1357599472, 1357599471, 1357599468, 1357599429, 1357599427, 1357599426, 1357599425, 1357599423, 1357599420, 1357599403, 1357599393, 1357599392, 1357599391, 1357599389, 1357599362, 1357599360, 1357599359, 1357599357, 1357599327, 1357599325, 1357599323, 1357599322, 1357599321, 1357599319, 1357599292, 1357599289, 1357599286, 1357599284, 1357599282, 1357599241, 1357599240, 1357599239, 1357599200, 1357599198, 1357599197, 1357599196, 1357599194, 1357599189, 1357599142, 1357599141, 1357599140, 1357599138, 1357599137, 1357599102, 1357599101, 1357599100, 1357599099, 1357599098, 1357599069, 1357599067, 1357599066, 1357599065, 1357599064, 1357599032, 1357599031, 1357599029, 1357599027, 1357599006, 1357599005, 1357599004, 1357599003, 1357599000]} ##### 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.016435623168945312 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon May 12 06:30:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22871877) 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 : 22871877 get user id for portfolio 22871877 get sub ptf for main ptf 22871877, type 3726 and hashtags ['metal', 'papier', 'Teint_Dans_La_Masse', 'kraft', 'plastique', 'autre_refus', 'Carton_brun', 'environnement', 'cartonnette', 'Carton_gris', 'mal_croppe', 'flou'] 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`=22871877 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','Teint_Dans_La_Masse','kraft','plastique','autre_refus','Carton_brun','environnement','cartonnette','Carton_gris','mal_croppe','flou')) 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`=22871877 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','Teint_Dans_La_Masse','kraft','plastique','autre_refus','Carton_brun','environnement','cartonnette','Carton_gris','mal_croppe','flou')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 22871877, 'sub_port_id': 22871902, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268726, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'environnement': {'main_port_id': 22871877, 'sub_port_id': 22871903, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268727, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'papier': {'main_port_id': 22871877, 'sub_port_id': 22871904, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268728, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'cartonnette': {'main_port_id': 22871877, 'sub_port_id': 22871905, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268729, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'mal_croppe': {'main_port_id': 22871877, 'sub_port_id': 22871906, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268730, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 22871877, 'sub_port_id': 22871907, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268731, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'flou': {'main_port_id': 22871877, 'sub_port_id': 22871908, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268732, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'Carton_gris': {'main_port_id': 22871877, 'sub_port_id': 22871909, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268733, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'autre_refus': {'main_port_id': 22871877, 'sub_port_id': 22871910, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268734, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'Carton_brun': {'main_port_id': 22871877, 'sub_port_id': 22871911, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268735, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'metal': {'main_port_id': 22871877, 'sub_port_id': 22871912, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268736, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}, 'plastique': {'main_port_id': 22871877, 'sub_port_id': 22871913, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268737, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22871902 , 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=22871877 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 (22871902) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871903 , 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=22871877 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 (22871903) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871904 , 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=22871877 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 (22871904) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871905 , 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=22871877 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 (22871905) result : ((1357599411,), (1357599456,), (1357599457,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871906 , 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=22871877 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 (22871906) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871907 , 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=22871877 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 (22871907) result : ((1357599306,), (1357599450,), (1357599525,), (1357599526,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871908 , 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=22871877 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 (22871908) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871909 , 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=22871877 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 (22871909) result : ((1357599373,), (1357599374,), (1357599453,), (1357599454,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871910 , 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=22871877 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 (22871910) result : ((1357599308,), (1357599451,), (1357599527,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871911 , 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=22871877 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 (22871911) result : ((1357599310,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871912 , 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=22871877 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 (22871912) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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 22871913 , 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=22871877 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 (22871913) result : ((1357599414,), (1357599459,), (1357599460,), (1357599461,), (1357599462,), (1357599463,), (1357599464,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22871877) result : ((1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) 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 (1357599000,1357599200,1357599100) 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`=22871877 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','Teint_Dans_La_Masse','kraft','plastique','autre_refus','Carton_brun','environnement','cartonnette','Carton_gris','mal_croppe','flou')) 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`=22871877 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','papier','Teint_Dans_La_Masse','kraft','plastique','autre_refus','Carton_brun','environnement','cartonnette','Carton_gris','mal_croppe','flou')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 22871877, 'sub_port_id': 22871914, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268738, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'environnement': {'main_port_id': 22871877, 'sub_port_id': 22871915, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268739, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'papier': {'main_port_id': 22871877, 'sub_port_id': 22871916, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268740, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'cartonnette': {'main_port_id': 22871877, 'sub_port_id': 22871917, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268741, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'mal_croppe': {'main_port_id': 22871877, 'sub_port_id': 22871918, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268742, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 22871877, 'sub_port_id': 22871919, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268743, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'flou': {'main_port_id': 22871877, 'sub_port_id': 22871920, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268744, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'Carton_gris': {'main_port_id': 22871877, 'sub_port_id': 22871921, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268745, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'autre_refus': {'main_port_id': 22871877, 'sub_port_id': 22871922, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268746, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'Carton_brun': {'main_port_id': 22871877, 'sub_port_id': 22871923, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268747, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'metal': {'main_port_id': 22871877, 'sub_port_id': 22871924, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268748, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 19, 29), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}, 'plastique': {'main_port_id': 22871877, 'sub_port_id': 22871925, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 15268749, 'last_updated_at': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_desc': datetime.datetime(2025, 5, 12, 6, 28, 58), 'last_updated_at_asc': datetime.datetime(2025, 5, 12, 6, 19, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871914,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871902 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871915,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871903 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871916,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871904 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871917,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871905 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871918,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871906 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871919,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871907 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871920,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871908 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871921,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871909 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871922,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871910 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871923,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871911 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871924,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871912 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22871925,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22871913 lien utilise dans velours : https://www.fotonower.com/velours/22871914,22871915,22871916,22871917,22871918,22871919,22871920,22871921,22871922,22871923,22871924,22871925?tags=kraft,environnement,papier,cartonnette,mal_croppe,Teint_Dans_La_Masse,flou,Carton_gris,autre_refus,Carton_brun,metal,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22871877]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] map_info['map_portfolio_photo'] : {22871877: [1357599507, 1357599506, 1357599505, 1357599504, 1357599502, 1357599473, 1357599472, 1357599471, 1357599468, 1357599429, 1357599427, 1357599426, 1357599425, 1357599423, 1357599420, 1357599403, 1357599393, 1357599392, 1357599391, 1357599389, 1357599362, 1357599360, 1357599359, 1357599357, 1357599327, 1357599325, 1357599323, 1357599322, 1357599321, 1357599319, 1357599292, 1357599289, 1357599286, 1357599284, 1357599282, 1357599241, 1357599240, 1357599239, 1357599200, 1357599198, 1357599197, 1357599196, 1357599194, 1357599189, 1357599142, 1357599141, 1357599140, 1357599138, 1357599137, 1357599102, 1357599101, 1357599100, 1357599099, 1357599098, 1357599069, 1357599067, 1357599066, 1357599065, 1357599064, 1357599032, 1357599031, 1357599029, 1357599027, 1357599006, 1357599005, 1357599004, 1357599003, 1357599000]} final : False mtd_id 4302 list_pids : [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] Looping around the photos to save general results len do output : 1 /22871877. 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, '2819378') ('4302', '22871877', '1357599507', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599506', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599505', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599504', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599502', None, None, None, None, None, '2819378') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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, '22871877', "{'kraft': 22871902, 'environnement': 22871903, 'papier': 22871904, 'cartonnette': 22871905, 'mal_croppe': 22871906, 'Teint_Dans_La_Masse': 22871907, 'flou': 22871908, 'Carton_gris': 22871909, 'autre_refus': 22871910, 'Carton_brun': 22871911, 'metal': 22871912, 'plastique': 22871913}", None, None, None, None, '2819378'), ('4302', '22871877', '1357599507', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599506', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599505', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599504', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599502', None, None, None, None, None, '2819378')] time used for this insertion : 0.013826131820678711 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4490010738372803 time spend to save output : 0.014069557189941406 total time spend for step 1 : 0.4630706310272217 step2:final Mon May 12 06:30:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22871877) 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 22871877 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1357599006,1357599005,1357599004,1357599003,1357599000,1357599032,1357599031,1357599029,1357599027,1357599069,1357599067,1357599066,1357599065,1357599064,1357599102,1357599101,1357599100,1357599099,1357599098,1357599142,1357599141,1357599140,1357599138,1357599137,1357599200,1357599198,1357599197,1357599196,1357599194,1357599189,1357599241,1357599240,1357599239,1357599292,1357599289,1357599286,1357599284,1357599282,1357599327,1357599325,1357599323,1357599322,1357599321,1357599319,1357599362,1357599360,1357599359,1357599357,1357599403,1357599393,1357599392,1357599391,1357599389,1357599429,1357599427,1357599426,1357599425,1357599423,1357599420,1357599473,1357599472,1357599471,1357599468,1357599507,1357599506,1357599505,1357599504,1357599502); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22871877]) Inside saveOutput : final : False verbose : True original output for save of step final : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} new output for save of step final : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] map_info['map_portfolio_photo'] : {22871877: [1357599507, 1357599506, 1357599505, 1357599504, 1357599502, 1357599473, 1357599472, 1357599471, 1357599468, 1357599429, 1357599427, 1357599426, 1357599425, 1357599423, 1357599420, 1357599403, 1357599393, 1357599392, 1357599391, 1357599389, 1357599362, 1357599360, 1357599359, 1357599357, 1357599327, 1357599325, 1357599323, 1357599322, 1357599321, 1357599319, 1357599292, 1357599289, 1357599286, 1357599284, 1357599282, 1357599241, 1357599240, 1357599239, 1357599200, 1357599198, 1357599197, 1357599196, 1357599194, 1357599189, 1357599142, 1357599141, 1357599140, 1357599138, 1357599137, 1357599102, 1357599101, 1357599100, 1357599099, 1357599098, 1357599069, 1357599067, 1357599066, 1357599065, 1357599064, 1357599032, 1357599031, 1357599029, 1357599027, 1357599006, 1357599005, 1357599004, 1357599003, 1357599000]} final : False mtd_id 4302 list_pids : [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] Looping around the photos to save general results len do output : 5 /1357599507.Didn't retrieve data . /1357599506.Didn't retrieve data . /1357599505.Didn't retrieve data . /1357599504.Didn't retrieve data . /1357599502.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, '2819378') ('4302', '22871877', '1357599507', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599506', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599505', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599504', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599502', None, None, None, None, None, '2819378') 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', '22871877', '1357599507', '0.04724385683637626', None, None, None, None, '2819378'), ('4302', '22871877', '1357599506', '0.04724385683637626', None, None, None, None, '2819378'), ('4302', '22871877', '1357599505', '0.04724385683637626', None, None, None, None, '2819378'), ('4302', '22871877', '1357599504', '0.04724385683637626', None, None, None, None, '2819378'), ('4302', '22871877', '1357599502', '0.04724385683637626', None, None, None, None, '2819378')] time used for this insertion : 0.01358485221862793 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06802940368652344 time spend to save output : 0.013926506042480469 total time spend for step 2 : 0.0819559097290039 step3:velours_tree Mon May 12 06:30: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 : {22871877: [{'kraft': 22871902, 'environnement': 22871903, 'papier': 22871904, 'cartonnette': 22871905, 'mal_croppe': 22871906, 'Teint_Dans_La_Masse': 22871907, 'flou': 22871908, 'Carton_gris': 22871909, 'autre_refus': 22871910, 'Carton_brun': 22871911, 'metal': 22871912, 'plastique': 22871913}]} input_args_next_step : {22871877: ()} output_args : {22871877: [{'kraft': 22871902, 'environnement': 22871903, 'papier': 22871904, 'cartonnette': 22871905, 'mal_croppe': 22871906, 'Teint_Dans_La_Masse': 22871907, 'flou': 22871908, 'Carton_gris': 22871909, 'autre_refus': 22871910, 'Carton_brun': 22871911, 'metal': 22871912, 'plastique': 22871913}]} args : 22871877 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 : ({'kraft': 22871902, 'environnement': 22871903, 'papier': 22871904, 'cartonnette': 22871905, 'mal_croppe': 22871906, 'Teint_Dans_La_Masse': 22871907, 'flou': 22871908, 'Carton_gris': 22871909, 'autre_refus': 22871910, 'Carton_brun': 22871911, 'metal': 22871912, 'plastique': 22871913},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22871877) 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([22871877]) 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.312274694442749 time spend to save output : 4.458427429199219e-05 total time spend for step 3 : 0.312319278717041 step4:send_mail_cod Mon May 12 06:30:31 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} input_args_next_step : {1357599507: ()} output_args : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} args : 1357599507 depend.output_id : 0 input_args_next_step : {1357599507: ('0.04724385683637626',), 1357599506: ()} output_args : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} args : 1357599506 depend.output_id : 0 input_args_next_step : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ()} output_args : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} args : 1357599505 depend.output_id : 0 input_args_next_step : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ()} output_args : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} args : 1357599504 depend.output_id : 0 input_args_next_step : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ()} output_args : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',)} args : 1357599502 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 : {22871877: [{'kraft': 22871902, 'environnement': 22871903, 'papier': 22871904, 'cartonnette': 22871905, 'mal_croppe': 22871906, 'Teint_Dans_La_Masse': 22871907, 'flou': 22871908, 'Carton_gris': 22871909, 'autre_refus': 22871910, 'Carton_brun': 22871911, 'metal': 22871912, 'plastique': 22871913}]} input_args_next_step : {1357599507: ('0.04724385683637626',), 1357599506: ('0.04724385683637626',), 1357599505: ('0.04724385683637626',), 1357599504: ('0.04724385683637626',), 1357599502: ('0.04724385683637626',), 22871877: ()} output_args : {22871877: [{'kraft': 22871902, 'environnement': 22871903, 'papier': 22871904, 'cartonnette': 22871905, 'mal_croppe': 22871906, 'Teint_Dans_La_Masse': 22871907, 'flou': 22871908, 'Carton_gris': 22871909, 'autre_refus': 22871910, 'Carton_brun': 22871911, 'metal': 22871912, 'plastique': 22871913}]} args : 22871877 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 :6, first value : ('0.04724385683637626',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22871877) 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 (1357599507,1357599506,1357599505,1357599504,1357599502) Found this number of photos: 5 ##### Call download_photos : nb_thread : 5 begin to download photo : 1357599502 begin to download photo : 1357599505 begin to download photo : 1357599507 download finish for photo 1357599505 begin to download photo : 1357599506 download finish for photo 1357599502 begin to download photo : 1357599504 download finish for photo 1357599504 download finish for photo 1357599506 download finish for photo 1357599507 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette228719021747024234/ length of list_filenames : 5 ; length of list_pids : 5 ; length of list_args : 5 results_Auto_P22871877_12-05-2025_06_30_34.pdf 22871902 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=22871902 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228719021747024234 22871905 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=22871905 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1357599411: '1747023987_2727728_1357599282_964c527866437b62cfe797a97ba83cf5_rle_crop_3793827747_0.png', 1357599456: '1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827941_0.png', 1357599457: '1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827945_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/a9f554a77f8b73fded14decee11d4f9e_70902789.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/1790007ca8720346e83cedc52a8ebf24_99345997.png change filename to text .imagette228719051747024234/ imagette228719051747024234/1747023987_2727728_1357599282_964c527866437b62cfe797a97ba83cf5_rle_crop_3793827747_0.png.png imagette228719051747024234/1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827941_0.png.png imagette228719051747024234/1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827945_0.png.png imagette228719061747024234/ imagette228719081747024234/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/97401830dd92ee1e63cd38a3f15c12c8_11102317.png imagette228719051747024234 22871906 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=22871906 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228719061747024234 22871908 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=22871908 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228719081747024234 22871910 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=22871910 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1357599308: '1747023804_2721272_1357599138_34158f89f32361b4b92dc8a286e78cff_rle_crop_3793827467_0.png', 1357599451: '1747024045_2729689_1357599198_bf0e9c0ca9899b7b7b6b286872a222dc_rle_crop_3793827927_0.png', 1357599527: '1747024165_2732453_1357599099_2adb5d840170f547a46ca615efea952b_rle_crop_3793828132_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/bc7499a5229aa81efb165005d653d72b_24989248.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/8cfc5e71b0d9497e91cb623ac2f3a3a2_88417607.png change filename to text .imagette228719101747024234/ imagette228719101747024234/1747024045_2729689_1357599198_bf0e9c0ca9899b7b7b6b286872a222dc_rle_crop_3793827927_0.png.png imagette228719101747024234/1747024165_2732453_1357599099_2adb5d840170f547a46ca615efea952b_rle_crop_3793828132_0.png.png imagette228719101747024234/1747023804_2721272_1357599138_34158f89f32361b4b92dc8a286e78cff_rle_crop_3793827467_0.png.png imagette228719121747024234/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/55cbfcac12d1b7d86cc39dc10caab343_90755101.png imagette228719101747024234 22871912 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=22871912 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette228719121747024234 22871913 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=22871913 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1357599414: '1747023987_2727728_1357599289_41adbc98099800b186cb6a95ec2b7778_rle_crop_3793827728_0.png', 1357599459: '1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827938_0.png', 1357599460: '1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827940_0.png', 1357599461: '1747024045_2729689_1357599196_8a639a9f1bb143690f180fdc7e68cb78_rle_crop_3793827958_0.png', 1357599462: '1747024045_2729689_1357599196_8a639a9f1bb143690f180fdc7e68cb78_rle_crop_3793827955_0.png', 1357599463: '1747024045_2729689_1357599194_a62e164b0e2f39cf81793e67d124aad9_rle_crop_3793827967_0.png', 1357599464: '1747024045_2729689_1357599189_e223c343d31c6e683cc07352b8f1fb71_rle_crop_3793827977_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/638f397dd562affab4526a230a2be67e_66359353.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/ed1031aca54db8cd73f8dcb4db0b9492_98360854.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/c26c831295d04f3ceb118ad5cb20c99c_67341721.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/aa9122520177d422905959138b7f40b9_59270406.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/24c24198cfa13d9c58f4395ce9b4e6db_30604460.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/6fbafc63fca74082acf3f3b7b2222631_14127034.png change filename to text .imagette228719131747024234/ imagette228719131747024234/1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827940_0.png.png imagette228719131747024234/1747024045_2729689_1357599196_8a639a9f1bb143690f180fdc7e68cb78_rle_crop_3793827958_0.png.png imagette228719131747024234/1747024045_2729689_1357599189_e223c343d31c6e683cc07352b8f1fb71_rle_crop_3793827977_0.png.png imagette228719131747024234/1747024045_2729689_1357599194_a62e164b0e2f39cf81793e67d124aad9_rle_crop_3793827967_0.png.png imagette228719131747024234/1747024045_2729689_1357599196_8a639a9f1bb143690f180fdc7e68cb78_rle_crop_3793827955_0.png.png imagette228719131747024234/1747024045_2729689_1357599197_608187082d0fc11339eaa18462f7997c_rle_crop_3793827938_0.png.png imagette228719131747024234/1747023987_2727728_1357599289_41adbc98099800b186cb6a95ec2b7778_rle_crop_3793827728_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/1d0cf592a9c7acb33e440506ba2387f4_89559714.png imagette228719131747024234 22871907 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=22871907 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1357599306: '1747023804_2721272_1357599137_0cbf74cbbc6ee706705bfbdd70b5a0cc_rle_crop_3793827478_0.png', 1357599450: '1747024045_2729689_1357599189_e223c343d31c6e683cc07352b8f1fb71_rle_crop_3793827982_0.png', 1357599525: '1747024165_2732453_1357599100_1cfaa4d14d3daa41e9d8175420b38129_rle_crop_3793828117_0.png', 1357599526: '1747024165_2732453_1357599099_2adb5d840170f547a46ca615efea952b_rle_crop_3793828127_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/fbc5052cb9b682bde7f5734336be1c67_51688395.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/8f233c4d7eecf78b6f6361e7076ba463_92452567.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/320019e87f0ee39c1515562438983f58_31576074.png change filename to text .imagette228719071747024234/ imagette228719071747024234/1747023804_2721272_1357599137_0cbf74cbbc6ee706705bfbdd70b5a0cc_rle_crop_3793827478_0.png.png imagette228719071747024234/1747024165_2732453_1357599100_1cfaa4d14d3daa41e9d8175420b38129_rle_crop_3793828117_0.png.png imagette228719071747024234/1747024045_2729689_1357599189_e223c343d31c6e683cc07352b8f1fb71_rle_crop_3793827982_0.png.png imagette228719071747024234/1747024165_2732453_1357599099_2adb5d840170f547a46ca615efea952b_rle_crop_3793828127_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/f8ecdae2dc58aed48904c46a2ee6f00a_29197849.png imagette228719071747024234 22871909 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=22871909 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1357599373: '1747023927_2725113_1357599240_ee2cdd25e442920a7ceef274dd6d01ab_rle_crop_3793827628_0.png', 1357599374: '1747023927_2725113_1357599239_b793a8b0b96f5f3fd923c230bbc2c035_rle_crop_3793827634_0.png', 1357599453: '1747024045_2729689_1357599198_bf0e9c0ca9899b7b7b6b286872a222dc_rle_crop_3793827928_0.png', 1357599454: '1747024045_2729689_1357599194_a62e164b0e2f39cf81793e67d124aad9_rle_crop_3793827971_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/442a772cd6f164f690e1ec7273a0a153_21288570.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/0328949b2b537ad099afca6763aad3ae_38086517.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/1a220d92f2d1a18fe8cc08b41fd76658_81137335.png change filename to text .imagette228719091747024235/ imagette228719091747024235/1747024045_2729689_1357599194_a62e164b0e2f39cf81793e67d124aad9_rle_crop_3793827971_0.png.png imagette228719091747024235/1747024045_2729689_1357599198_bf0e9c0ca9899b7b7b6b286872a222dc_rle_crop_3793827928_0.png.png imagette228719091747024235/1747023927_2725113_1357599240_ee2cdd25e442920a7ceef274dd6d01ab_rle_crop_3793827628_0.png.png imagette228719091747024235/1747023927_2725113_1357599239_b793a8b0b96f5f3fd923c230bbc2c035_rle_crop_3793827634_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/9865e87abf16860aa4d4abe0b049a75d_44453743.png imagette228719091747024235 22871911 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=22871911 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1357599310: '1747023804_2721272_1357599137_0cbf74cbbc6ee706705bfbdd70b5a0cc_rle_crop_3793827477_0.png'} change filename to text .imagette228719111747024235/ imagette228719111747024235/1747023804_2721272_1357599137_0cbf74cbbc6ee706705bfbdd70b5a0cc_rle_crop_3793827477_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/f91d5818e053aeb54b273cec1b5a5752_11640858.png imagette228719111747024235 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22871877 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22871914,22871915,22871916,22871917,22871918,22871919,22871920,22871921,22871922,22871923,22871924,22871925?tags=kraft,environnement,papier,cartonnette,mal_croppe,Teint_Dans_La_Masse,flou,Carton_gris,autre_refus,Carton_brun,metal,plastique your option no_mail is active, we will not send the real mail to your client args[1357599507] : ('0.04724385683637626',) no score found for photo 1357599507 We are sending mail with results at report@fotonower.com args[1357599506] : ('0.04724385683637626',) no score found for photo 1357599506 We are sending mail with results at report@fotonower.com args[1357599505] : ('0.04724385683637626',) no score found for photo 1357599505 We are sending mail with results at report@fotonower.com args[1357599504] : ('0.04724385683637626',) no score found for photo 1357599504 We are sending mail with results at report@fotonower.com args[1357599502] : ('0.04724385683637626',) no score found for photo 1357599502 We are sending mail with results at report@fotonower.com refus_total : 0.04724385683637626 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=22871877 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_P22871877_12-05-2025_06_30_34.pdf results_Auto_P22871877_12-05-2025_06_30_34.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871877_12-05-2025_06_30_34.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','22871877','results_Auto_P22871877_12-05-2025_06_30_34.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871877_12-05-2025_06_30_34.pdf','pdf','','0.13','0.04724385683637626') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22871877]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] map_info['map_portfolio_photo'] : {22871877: [1357599507, 1357599506, 1357599505, 1357599504, 1357599502, 1357599473, 1357599472, 1357599471, 1357599468, 1357599429, 1357599427, 1357599426, 1357599425, 1357599423, 1357599420, 1357599403, 1357599393, 1357599392, 1357599391, 1357599389, 1357599362, 1357599360, 1357599359, 1357599357, 1357599327, 1357599325, 1357599323, 1357599322, 1357599321, 1357599319, 1357599292, 1357599289, 1357599286, 1357599284, 1357599282, 1357599241, 1357599240, 1357599239, 1357599200, 1357599198, 1357599197, 1357599196, 1357599194, 1357599189, 1357599142, 1357599141, 1357599140, 1357599138, 1357599137, 1357599102, 1357599101, 1357599100, 1357599099, 1357599098, 1357599069, 1357599067, 1357599066, 1357599065, 1357599064, 1357599032, 1357599031, 1357599029, 1357599027, 1357599006, 1357599005, 1357599004, 1357599003, 1357599000]} final : False mtd_id 4302 list_pids : [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] 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, '2819378') ('4302', '22871877', '1357599507', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599506', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599505', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599504', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599502', None, None, None, None, None, '2819378') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 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', '22871877', '1357599507', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599506', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599505', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599504', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599502', None, None, None, None, None, '2819378')] time used for this insertion : 0.012583494186401367 save_final save missing photos in datou_result : time spend for datou_step_exec : 7.219658851623535 time spend to save output : 0.012786626815795898 total time spend for step 4 : 7.232445478439331 step5:split_time_score Mon May 12 06:30:38 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 : ['22871877'] 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 : [('22871877',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22871877) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1357599502: {'path': 'temp/1747024231_941110_1357599502_46deaf559686d604b3f3446af30caac5.jpg', 'extension': 'jpg'}, 1357599504: {'path': 'temp/1747024231_941110_1357599504_a57fb140f314a3c110bf3e99b351c007.jpg', 'extension': 'jpg'}, 1357599505: {'path': 'temp/1747024231_941110_1357599505_0b05d75addafbcdd85b6e91ac1837c98.jpg', 'extension': 'jpg'}, 1357599506: {'path': 'temp/1747024231_941110_1357599506_4924f2b83a0b2123084e5cdfbb1a2dab.jpg', 'extension': 'jpg'}, 1357599507: {'path': 'temp/1747024231_941110_1357599507_b9bf9b69ea6c8841f0e42f951a6ed65d.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 = 22871877; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22871877 group by h (('06', 68),) 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=22871877 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 (22871877) 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 (22871877) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 12052025 22871877 Nombre de photos uploadées : 68 / 23040 (0%) 12052025 22871877 Nombre de photos taguées (types de déchets): 0 / 68 (0%) 12052025 22871877 Nombre de photos taguées (volume) : 0 / 68 (0%) [{'photo_id': 1357599006, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/e203c821c0fc0da4c5e5c9bb8e13886e.jpg', 'username': None, 'uploaded_at': 1747023367, 'text': 'image_12052025_06_15_03_10167.jpg'}, {'photo_id': 1357599005, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/c076e4c5b286cf9d44bc10d2384f2bbf.jpg', 'username': None, 'uploaded_at': 1747023367, 'text': 'image_12052025_06_15_13_10137.jpg'}, {'photo_id': 1357599004, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/475ab750a9b673fcd4a9f32bb078e701.jpg', 'username': None, 'uploaded_at': 1747023367, 'text': 'image_12052025_06_15_23_10141.jpg'}, {'photo_id': 1357599003, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/5/12/33c3cf423d6dcfcfc539bd71589c83fe.jpg', 'username': None, 'uploaded_at': 1747023367, 'text': 'image_12052025_06_15_33_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.6689300537109375e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ???????????????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.005078554153442383 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22871877, '2025-05-12' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1796783,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02278423309326172 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= 1796783 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1796783, 'dashboard_run_id': 1804282, 'mtr_portfolio_id': 22870938, 'dashboard_result_id': 10478887, '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_P22870938_12-05-2025_05_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22870939, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22870940, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22870941, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22870942, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22870943, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22870944, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22870945, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22870946, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22870947, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22870948, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22870949, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22870950, 'pht': 3726}}"}, {'dashboat_entry_day': 1796783, 'dashboard_run_id': 1804282, 'mtr_portfolio_id': 22871209, 'dashboard_result_id': 10478888, '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_P22871209_12-05-2025_06_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871249, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871250, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871251, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871252, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871253, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871254, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871255, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871257, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871258, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871259, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871260, 'pht': 3726}}"}, {'dashboat_entry_day': 1796783, 'dashboard_run_id': 1804282, 'mtr_portfolio_id': 22871504, 'dashboard_result_id': 10478889, '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_P22871504_12-05-2025_06_18_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871506, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871507, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871508, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871509, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871510, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871511, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871512, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871514, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871515, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871517, 'pht': 3726}}"}, {'dashboat_entry_day': 1796783, 'dashboard_run_id': 1804282, 'mtr_portfolio_id': 22871877, 'dashboard_result_id': 10478890, '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_P22871877_12-05-2025_06_26_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871902, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871903, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871904, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871905, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871906, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871907, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871908, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871909, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871910, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871911, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871912, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871913, '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 = 22870938 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': 2819063, 'mtr_portfolio_id': 22870938, 'created_at': datetime.datetime(2025, 5, 12, 5, 48, 58), 'result': '0.03705420816309158', 'result_long': None, 'result_double': None}] Qualite : 0.03705420816309158 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22870938 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22870938_12-05-2025_05_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22870938 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_P22870938_12-05-2025_05_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22870939, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22870940, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22870941, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22870942, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22870943, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22870944, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22870945, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22870946, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22870947, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22870948, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22870949, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22870950, 'pht': 3726}}" where mtr_portfolio_id = 22870938 and dashboard_run_id = 1804282 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`=22870938 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10478887, 0.03705420816309158, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22870938_12-05-2025_05_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22870939, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22870940, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22870941, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22870942, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22870943, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22870944, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22870945, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22870946, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22870947, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22870948, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22870949, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22870950, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22871209 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': 2819134, 'mtr_portfolio_id': 22871209, 'created_at': datetime.datetime(2025, 5, 12, 6, 2, 59), 'result': '0.05509775094935961', 'result_long': None, 'result_double': None}] Qualite : 0.05509775094935961 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22871209 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871209_12-05-2025_06_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22871209 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_P22871209_12-05-2025_06_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871249, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871250, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871251, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871252, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871253, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871254, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871255, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871257, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871258, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871259, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871260, 'pht': 3726}}" where mtr_portfolio_id = 22871209 and dashboard_run_id = 1804283 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`=22871209 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10478888, 0.05509775094935961, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871209_12-05-2025_06_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871249, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871250, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871251, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871252, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871253, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871254, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871255, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871256, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871257, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871258, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871259, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871260, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22871504 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': 2819232, 'mtr_portfolio_id': 22871504, 'created_at': datetime.datetime(2025, 5, 12, 6, 18, 58), 'result': '0.05746300343567093', 'result_long': None, 'result_double': None}] Qualite : 0.05746300343567093 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22871504 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871504_12-05-2025_06_18_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22871504 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_P22871504_12-05-2025_06_18_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871506, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871507, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871508, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871509, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871510, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871511, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871512, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871514, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871515, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871517, 'pht': 3726}}" where mtr_portfolio_id = 22871504 and dashboard_run_id = 1804283 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`=22871504 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10478889, 0.05746300343567093, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871504_12-05-2025_06_18_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871506, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871507, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871508, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871509, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871510, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871511, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871512, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871513, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871514, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871515, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871517, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22871877 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': 2819378, 'mtr_portfolio_id': 22871877, 'created_at': datetime.datetime(2025, 5, 12, 6, 30, 30), 'result': '0.04724385683637626', 'result_long': None, 'result_double': None}] Qualite : 0.04724385683637626 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22871877 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871877_12-05-2025_06_30_34.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22871877 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_P22871877_12-05-2025_06_30_34.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871902, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871903, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871904, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871905, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871906, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871907, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871908, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871909, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871910, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871911, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871912, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871913, 'pht': 3726}}" where mtr_portfolio_id = 22871877 and dashboard_run_id = 1804283 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`=22871877 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10478890, 0.04724385683637626, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22871877_12-05-2025_06_30_34.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22871902, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22871903, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22871904, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22871905, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22871906, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22871907, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22871908, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22871909, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22871910, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22871911, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22871912, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22871913, '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 (22870938,22871209,22871504,22871877) result : ((1357597599,), (1357597601,), (1357597602,), (1357597633,), (1357597636,), (1357597637,), (1357597638,), (1357597639,), (1357597656,), (1357597659,), (1357597660,), (1357597661,), (1357597662,), (1357597663,), (1357597681,), (1357597684,), (1357597686,), (1357597687,), (1357597707,), (1357597709,), (1357597714,), (1357597715,), (1357597731,), (1357597737,), (1357597741,), (1357597744,), (1357597747,), (1357597760,), (1357597764,), (1357597766,), (1357597792,), (1357597795,), (1357597797,), (1357597799,), (1357597801,), (1357597815,), (1357597818,), (1357597845,), (1357597846,), (1357597847,), (1357597848,), (1357597849,), (1357597890,), (1357597892,), (1357597893,), (1357597894,), (1357597922,), (1357597923,), (1357597924,), (1357597925,), (1357597946,), (1357597951,), (1357597954,), (1357597957,), (1357597960,), (1357597972,), (1357597975,), (1357597977,), (1357597978,), (1357597979,), (1357597980,), (1357597998,), (1357598003,), (1357598004,), (1357598006,), (1357598007,), (1357598044,), (1357598037,), (1357598038,), (1357598039,), (1357598040,), (1357598041,), (1357598059,), (1357598061,), (1357598062,), (1357598063,), (1357598065,), (1357598088,), (1357598091,), (1357598115,), (1357598117,), (1357598119,), (1357598121,), (1357598123,), (1357598125,), (1357598143,), (1357598147,), (1357598150,), (1357598152,), (1357598153,), (1357598154,), (1357598189,), (1357598192,), (1357598194,), (1357598223,), (1357598226,), (1357598228,), (1357598229,), (1357598244,), (1357598248,), (1357598250,), (1357598253,), (1357598279,), (1357598295,), (1357598296,), (1357598297,), (1357598299,), (1357598315,), (1357598318,), (1357598320,), (1357598322,), (1357598352,), (1357598354,), (1357598357,), (1357598360,), (1357598362,), (1357598375,), (1357598378,), (1357598381,), (1357598384,), (1357598386,), (1357598413,), (1357598416,), (1357598418,), (1357598420,), (1357598422,), (1357598450,), (1357598454,), (1357598461,), (1357598465,), (1357598475,), (1357598476,), (1357598477,), (1357598478,), (1357598480,), (1357598481,), (1357598482,), (1357598485,), (1357598486,), (1357598492,), (1357598520,), (1357598512,), (1357598514,), (1357598516,), (1357598518,), (1357598535,), (1357598538,), (1357598541,), (1357598543,), (1357598545,), (1357598547,), (1357598569,), (1357598570,), (1357598593,), (1357598596,), (1357598615,), (1357598618,), (1357598621,), (1357598647,), (1357598648,), (1357598651,), (1357598654,), (1357598658,), (1357598684,), (1357598685,), (1357598687,), (1357598689,), (1357598692,), (1357598718,), (1357598719,), (1357598720,), (1357598721,), (1357598722,), (1357598724,), (1357598748,), (1357598749,), (1357598751,), (1357598778,), (1357598779,), (1357598780,), (1357598781,), (1357598782,), (1357598835,), (1357598836,), (1357598837,), (1357598838,), (1357598839,), (1357598840,), (1357598866,), (1357598868,), (1357598869,), (1357598870,), (1357598897,), (1357598900,), (1357598904,), (1357598909,), (1357598912,), (1357598914,), (1357598934,), (1357598935,), (1357598936,), (1357598937,), (1357598957,), (1357598970,), (1357598973,), (1357598974,), (1357598975,), (1357598977,), (1357599007,), (1357599000,), (1357599003,), (1357599004,), (1357599005,), (1357599006,), (1357599027,), (1357599029,), (1357599031,), (1357599032,), (1357599064,), (1357599065,), (1357599066,), (1357599067,), (1357599069,), (1357599098,), (1357599099,), (1357599100,), (1357599101,), (1357599102,), (1357599137,), (1357599138,), (1357599140,), (1357599141,), (1357599142,), (1357599189,), (1357599194,), (1357599196,), (1357599197,), (1357599198,), (1357599200,), (1357599239,), (1357599240,), (1357599241,), (1357599282,), (1357599284,), (1357599286,), (1357599289,), (1357599292,), (1357599319,), (1357599321,), (1357599322,), (1357599323,), (1357599325,), (1357599327,), (1357599357,), (1357599359,), (1357599360,), (1357599362,), (1357599389,), (1357599391,), (1357599392,), (1357599393,), (1357599403,), (1357599420,), (1357599423,), (1357599425,), (1357599426,), (1357599427,), (1357599429,), (1357599468,), (1357599471,), (1357599472,), (1357599473,), (1357599502,), (1357599504,), (1357599505,), (1357599506,), (1357599507,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'12052025': {'nb_upload': 68, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22871877]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] map_info['map_portfolio_photo'] : {22871877: [1357599507, 1357599506, 1357599505, 1357599504, 1357599502, 1357599473, 1357599472, 1357599471, 1357599468, 1357599429, 1357599427, 1357599426, 1357599425, 1357599423, 1357599420, 1357599403, 1357599393, 1357599392, 1357599391, 1357599389, 1357599362, 1357599360, 1357599359, 1357599357, 1357599327, 1357599325, 1357599323, 1357599322, 1357599321, 1357599319, 1357599292, 1357599289, 1357599286, 1357599284, 1357599282, 1357599241, 1357599240, 1357599239, 1357599200, 1357599198, 1357599197, 1357599196, 1357599194, 1357599189, 1357599142, 1357599141, 1357599140, 1357599138, 1357599137, 1357599102, 1357599101, 1357599100, 1357599099, 1357599098, 1357599069, 1357599067, 1357599066, 1357599065, 1357599064, 1357599032, 1357599031, 1357599029, 1357599027, 1357599006, 1357599005, 1357599004, 1357599003, 1357599000]} final : True mtd_id 4302 list_pids : [1357599507, 1357599506, 1357599505, 1357599504, 1357599502] Looping around the photos to save general results len do output : 1 /22871877Didn'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, '2819378') ('4302', '22871877', '1357599507', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599506', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599505', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599504', None, None, None, None, None, '2819378') ('4302', None, None, None, None, None, None, None, '2819378') ('4302', '22871877', '1357599502', None, None, None, None, None, '2819378') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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, '22871877', 'None', None, None, None, None, '2819378'), ('4302', '22871877', '1357599507', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599506', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599505', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599504', None, None, None, None, None, '2819378'), ('4302', '22871877', '1357599502', None, None, None, None, None, '2819378')] time used for this insertion : 0.011910676956176758 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3412892818450928 time spend to save output : 0.012135744094848633 total time spend for step 5 : 0.3534250259399414 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 (2819378) 2.35user 1.57system 0:13.42elapsed 29%CPU (0avgtext+0avgdata 158956maxresident)k 168inputs+6552outputs (0major+71772minor)pagefaults 0swaps