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 : 1809418 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 (2570759) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2570759) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397393 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2570759'] with mtr_portfolio_ids : ['20397393'] and first list_photo_ids : [] new path : /proc/1809418/ Name: python3 Umask: 0002 State: R (running) Tgid: 1809418 Ngid: 0 Pid: 1809418 PPid: 1809417 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1809418 NSpid: 1809418 NSpgid: 1807289 NSsid: 1807289 VmPeak: 1106584 kB VmSize: 1106572 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98624 kB VmRSS: 98624 kB RssAnon: 59736 kB RssFile: 38888 kB RssShmem: 0 kB VmData: 865324 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 624 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: 41 nonvoluntary_ctxt_switches: 119 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1809418', 'Ngid': '0', 'Pid': '1809418', 'PPid': '1809417', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1809418', 'NSpid': '1809418', 'NSpgid': '1807289', 'NSsid': '1807289', 'VmPeak': '1106584 kB', 'VmSize': '1106572 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98624 kB', 'VmRSS': '98624 kB', 'RssAnon': '59736 kB', 'RssFile': '38888 kB', 'RssShmem': '0 kB', 'VmData': '865324 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '624 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': '41', 'nonvoluntary_ctxt_switches': '119'} ('datou_batch_current', '1809418', '1106584', '0', '1106572', '865324', '98624', b'', 'marlene', '2570759') 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 (20397393) 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 (2570759 ) ) 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 (20397393) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1336455083, 'portfolio_id': 20397393}, {'photo_id': 1336455081, 'portfolio_id': 20397393}, {'photo_id': 1336455078, 'portfolio_id': 20397393}, {'photo_id': 1336455075, 'portfolio_id': 20397393}, {'photo_id': 1336455073, 'portfolio_id': 20397393}, {'photo_id': 1336455069, 'portfolio_id': 20397393}, {'photo_id': 1336455035, 'portfolio_id': 20397393}, {'photo_id': 1336455033, 'portfolio_id': 20397393}, {'photo_id': 1336455031, 'portfolio_id': 20397393}, {'photo_id': 1336455028, 'portfolio_id': 20397393}, {'photo_id': 1336455025, 'portfolio_id': 20397393}, {'photo_id': 1336455022, 'portfolio_id': 20397393}, {'photo_id': 1336454858, 'portfolio_id': 20397393}, {'photo_id': 1336454769, 'portfolio_id': 20397393}, {'photo_id': 1336454656, 'portfolio_id': 20397393}, {'photo_id': 1336454630, 'portfolio_id': 20397393}, {'photo_id': 1336454622, 'portfolio_id': 20397393}, {'photo_id': 1336454615, 'portfolio_id': 20397393}, {'photo_id': 1336454613, 'portfolio_id': 20397393}, {'photo_id': 1336454452, 'portfolio_id': 20397393}, {'photo_id': 1336454367, 'portfolio_id': 20397393}, {'photo_id': 1336454213, 'portfolio_id': 20397393}, {'photo_id': 1336454107, 'portfolio_id': 20397393}, {'photo_id': 1336454085, 'portfolio_id': 20397393}, {'photo_id': 1336454063, 'portfolio_id': 20397393}, {'photo_id': 1336453815, 'portfolio_id': 20397393}, {'photo_id': 1336453725, 'portfolio_id': 20397393}, {'photo_id': 1336453619, 'portfolio_id': 20397393}, {'photo_id': 1336453537, 'portfolio_id': 20397393}, {'photo_id': 1336453444, 'portfolio_id': 20397393}, {'photo_id': 1336453100, 'portfolio_id': 20397393}, {'photo_id': 1336453095, 'portfolio_id': 20397393}, {'photo_id': 1336453092, 'portfolio_id': 20397393}, {'photo_id': 1336453090, 'portfolio_id': 20397393}, {'photo_id': 1336453014, 'portfolio_id': 20397393}, {'photo_id': 1336453008, 'portfolio_id': 20397393}, {'photo_id': 1336452845, 'portfolio_id': 20397393}, {'photo_id': 1336452843, 'portfolio_id': 20397393}, {'photo_id': 1336452831, 'portfolio_id': 20397393}, {'photo_id': 1336452827, 'portfolio_id': 20397393}, {'photo_id': 1336452098, 'portfolio_id': 20397393}, {'photo_id': 1336452097, 'portfolio_id': 20397393}, {'photo_id': 1336452095, 'portfolio_id': 20397393}, {'photo_id': 1336452093, 'portfolio_id': 20397393}, {'photo_id': 1336452092, 'portfolio_id': 20397393}, {'photo_id': 1336452055, 'portfolio_id': 20397393}, {'photo_id': 1336452053, 'portfolio_id': 20397393}, {'photo_id': 1336452052, 'portfolio_id': 20397393}, {'photo_id': 1336452049, 'portfolio_id': 20397393}, {'photo_id': 1336451999, 'portfolio_id': 20397393}, {'photo_id': 1336451996, 'portfolio_id': 20397393}, {'photo_id': 1336451991, 'portfolio_id': 20397393}, {'photo_id': 1336451988, 'portfolio_id': 20397393}] map_portfolio_id_photo_id: {20397393: [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022, 1336454858, 1336454769, 1336454656, 1336454630, 1336454622, 1336454615, 1336454613, 1336454452, 1336454367, 1336454213, 1336454107, 1336454085, 1336454063, 1336453815, 1336453725, 1336453619, 1336453537, 1336453444, 1336453100, 1336453095, 1336453092, 1336453090, 1336453014, 1336453008, 1336452845, 1336452843, 1336452831, 1336452827, 1336452098, 1336452097, 1336452095, 1336452093, 1336452092, 1336452055, 1336452053, 1336452052, 1336452049, 1336451999, 1336451996, 1336451991, 1336451988]} ##### 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.016075611114501953 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Feb 10 10:42:56 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 (20397393) 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 : 20397393 get user id for portfolio 20397393 get sub ptf for main ptf 20397393, type 3726 and hashtags ['Carton_gris', 'Teint_Dans_La_Masse', 'Carton_brun', 'environnement', 'papier', 'plastique', 'autre_refus', 'flou', 'mal_croppe', 'metal', 'cartonnette', 'kraft'] 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`=20397393 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','papier','plastique','autre_refus','flou','mal_croppe','metal','cartonnette','kraft')) 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`=20397393 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','papier','plastique','autre_refus','flou','mal_croppe','metal','cartonnette','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 20397393, 'sub_port_id': 20397424, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076787, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'metal': {'main_port_id': 20397393, 'sub_port_id': 20397425, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076788, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'Carton_gris': {'main_port_id': 20397393, 'sub_port_id': 20397426, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076789, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'autre_refus': {'main_port_id': 20397393, 'sub_port_id': 20397427, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076790, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'plastique': {'main_port_id': 20397393, 'sub_port_id': 20397428, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076791, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 20397393, 'sub_port_id': 20397429, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076792, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'kraft': {'main_port_id': 20397393, 'sub_port_id': 20397430, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076793, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'flou': {'main_port_id': 20397393, 'sub_port_id': 20397431, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076794, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'cartonnette': {'main_port_id': 20397393, 'sub_port_id': 20397432, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076795, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'papier': {'main_port_id': 20397393, 'sub_port_id': 20397433, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076796, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'environnement': {'main_port_id': 20397393, 'sub_port_id': 20397434, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076797, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}, 'Carton_brun': {'main_port_id': 20397393, 'sub_port_id': 20397435, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076798, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 28)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20397424 , 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=20397393 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 (20397424) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397425 , 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=20397393 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 (20397425) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397426 , 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=20397393 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 (20397426) result : ((1336452835,), (1336452836,), (1336452837,), (1336453140,), (1336454625,), (1336455016,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397427 , 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=20397393 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 (20397427) result : ((1336452832,), (1336452833,), (1336452834,), (1336454623,), (1336455048,), (1336455049,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397428 , 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=20397393 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 (20397428) result : ((1336452841,), (1336452842,), (1336454629,), (1336455019,), (1336455062,), (1336455208,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397429 , 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=20397393 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 (20397429) result : ((1336452829,), (1336452830,), (1336453139,), (1336454618,), (1336454619,), (1336454620,), (1336454621,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397430 , 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=20397393 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 (20397430) result : ((1336455020,), (1336455054,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397431 , 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=20397393 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 (20397431) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397432 , 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=20397393 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 (20397432) result : ((1336452838,), (1336454627,), (1336455018,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397433 , 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=20397393 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 (20397433) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397434 , 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=20397393 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 (20397434) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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 20397435 , 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=20397393 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 (20397435) result : ((1336452839,), (1336453141,), (1336454628,), (1336455052,), (1336455053,), (1336455060,), (1336455061,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20397393) result : ((1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) 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 (1336453100) 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`=20397393 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','papier','plastique','autre_refus','flou','mal_croppe','metal','cartonnette','kraft')) 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`=20397393 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','Teint_Dans_La_Masse','Carton_brun','environnement','papier','plastique','autre_refus','flou','mal_croppe','metal','cartonnette','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 20397393, 'sub_port_id': 20397436, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076799, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'metal': {'main_port_id': 20397393, 'sub_port_id': 20397437, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076800, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'Carton_gris': {'main_port_id': 20397393, 'sub_port_id': 20397438, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076801, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'autre_refus': {'main_port_id': 20397393, 'sub_port_id': 20397439, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076802, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'plastique': {'main_port_id': 20397393, 'sub_port_id': 20397440, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076803, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 20397393, 'sub_port_id': 20397441, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076804, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'kraft': {'main_port_id': 20397393, 'sub_port_id': 20397442, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076805, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'flou': {'main_port_id': 20397393, 'sub_port_id': 20397443, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076806, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'cartonnette': {'main_port_id': 20397393, 'sub_port_id': 20397444, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076807, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'papier': {'main_port_id': 20397393, 'sub_port_id': 20397445, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076808, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'environnement': {'main_port_id': 20397393, 'sub_port_id': 20397446, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076809, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}, 'Carton_brun': {'main_port_id': 20397393, 'sub_port_id': 20397447, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13076810, 'last_updated_at': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 10, 10, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 10, 10, 33, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397436,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397424 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397437,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397425 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397438,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397426 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397439,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397427 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397440,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397428 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397441,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397429 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397442,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397430 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397443,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397431 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397444,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397432 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397445,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397433 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397446,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397434 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20397447,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20397435 lien utilise dans velours : https://www.fotonower.com/velours/20397436,20397437,20397438,20397439,20397440,20397441,20397442,20397443,20397444,20397445,20397446,20397447?tags=mal_croppe,metal,Carton_gris,autre_refus,plastique,Teint_Dans_La_Masse,kraft,flou,cartonnette,papier,environnement,Carton_brun After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20397393]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] map_info['map_portfolio_photo'] : {20397393: [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022, 1336454858, 1336454769, 1336454656, 1336454630, 1336454622, 1336454615, 1336454613, 1336454452, 1336454367, 1336454213, 1336454107, 1336454085, 1336454063, 1336453815, 1336453725, 1336453619, 1336453537, 1336453444, 1336453100, 1336453095, 1336453092, 1336453090, 1336453014, 1336453008, 1336452845, 1336452843, 1336452831, 1336452827, 1336452098, 1336452097, 1336452095, 1336452093, 1336452092, 1336452055, 1336452053, 1336452052, 1336452049, 1336451999, 1336451996, 1336451991, 1336451988]} final : False mtd_id 4302 list_pids : [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] Looping around the photos to save general results len do output : 1 /20397393. 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, '2570759') ('4302', '20397393', '1336455083', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455081', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455078', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455075', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455073', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455069', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455035', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455033', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455031', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455028', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455025', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455022', None, None, None, None, None, '2570759') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '20397393', "{'mal_croppe': 20397424, 'metal': 20397425, 'Carton_gris': 20397426, 'autre_refus': 20397427, 'plastique': 20397428, 'Teint_Dans_La_Masse': 20397429, 'kraft': 20397430, 'flou': 20397431, 'cartonnette': 20397432, 'papier': 20397433, 'environnement': 20397434, 'Carton_brun': 20397435}", None, None, None, None, '2570759'), ('4302', '20397393', '1336455083', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455081', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455078', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455075', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455073', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455069', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455035', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455033', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455031', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455028', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455025', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455022', None, None, None, None, None, '2570759')] time used for this insertion : 0.013705015182495117 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.45070457458496094 time spend to save output : 0.014023303985595703 total time spend for step 1 : 0.46472787857055664 step2:final Mon Feb 10 10:42:56 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 (20397393) 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 20397393 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1336451999,1336451996,1336451991,1336451988,1336452055,1336452053,1336452052,1336452049,1336452098,1336452097,1336452095,1336452093,1336452092,1336453014,1336453008,1336452845,1336452843,1336452831,1336452827,1336453100,1336453095,1336453092,1336453090,1336453815,1336453725,1336453619,1336453537,1336453444,1336454452,1336454367,1336454213,1336454107,1336454085,1336454063,1336454630,1336454622,1336454615,1336454613,1336454858,1336454769,1336454656,1336455035,1336455033,1336455031,1336455028,1336455025,1336455022,1336455083,1336455081,1336455078,1336455075,1336455073,1336455069); 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([20397393]) Inside saveOutput : final : False verbose : True original output for save of step final : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} new output for save of step final : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] map_info['map_portfolio_photo'] : {20397393: [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022, 1336454858, 1336454769, 1336454656, 1336454630, 1336454622, 1336454615, 1336454613, 1336454452, 1336454367, 1336454213, 1336454107, 1336454085, 1336454063, 1336453815, 1336453725, 1336453619, 1336453537, 1336453444, 1336453100, 1336453095, 1336453092, 1336453090, 1336453014, 1336453008, 1336452845, 1336452843, 1336452831, 1336452827, 1336452098, 1336452097, 1336452095, 1336452093, 1336452092, 1336452055, 1336452053, 1336452052, 1336452049, 1336451999, 1336451996, 1336451991, 1336451988]} final : False mtd_id 4302 list_pids : [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] Looping around the photos to save general results len do output : 12 /1336455083.Didn't retrieve data . /1336455081.Didn't retrieve data . /1336455078.Didn't retrieve data . /1336455075.Didn't retrieve data . /1336455073.Didn't retrieve data . /1336455069.Didn't retrieve data . /1336455035.Didn't retrieve data . /1336455033.Didn't retrieve data . /1336455031.Didn't retrieve data . /1336455028.Didn't retrieve data . /1336455025.Didn't retrieve data . /1336455022.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, '2570759') ('4302', '20397393', '1336455083', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455081', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455078', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455075', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455073', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455069', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455035', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455033', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455031', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455028', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455025', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455022', None, None, None, None, None, '2570759') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '20397393', '1336455083', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455081', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455078', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455075', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455073', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455069', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455035', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455033', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455031', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455028', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455025', '0.028809089075987716', None, None, None, None, '2570759'), ('4302', '20397393', '1336455022', '0.028809089075987716', None, None, None, None, '2570759')] time used for this insertion : 0.013586759567260742 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06581974029541016 time spend to save output : 0.014031410217285156 total time spend for step 2 : 0.07985115051269531 step3:velours_tree Mon Feb 10 10:42:56 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 : {20397393: [{'mal_croppe': 20397424, 'metal': 20397425, 'Carton_gris': 20397426, 'autre_refus': 20397427, 'plastique': 20397428, 'Teint_Dans_La_Masse': 20397429, 'kraft': 20397430, 'flou': 20397431, 'cartonnette': 20397432, 'papier': 20397433, 'environnement': 20397434, 'Carton_brun': 20397435}]} input_args_next_step : {20397393: ()} output_args : {20397393: [{'mal_croppe': 20397424, 'metal': 20397425, 'Carton_gris': 20397426, 'autre_refus': 20397427, 'plastique': 20397428, 'Teint_Dans_La_Masse': 20397429, 'kraft': 20397430, 'flou': 20397431, 'cartonnette': 20397432, 'papier': 20397433, 'environnement': 20397434, 'Carton_brun': 20397435}]} args : 20397393 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 : ({'mal_croppe': 20397424, 'metal': 20397425, 'Carton_gris': 20397426, 'autre_refus': 20397427, 'plastique': 20397428, 'Teint_Dans_La_Masse': 20397429, 'kraft': 20397430, 'flou': 20397431, 'cartonnette': 20397432, 'papier': 20397433, 'environnement': 20397434, 'Carton_brun': 20397435},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20397393) 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([20397393]) 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.29624438285827637 time spend to save output : 7.796287536621094e-05 total time spend for step 3 : 0.2963223457336426 step4:send_mail_cod Mon Feb 10 10:42:57 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 : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} input_args_next_step : {1336455083: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455083 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455081 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455078 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455075 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455073 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455069 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455035 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455033 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455031 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455028 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455025 depend.output_id : 0 input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ()} output_args : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',)} args : 1336455022 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 : {20397393: [{'mal_croppe': 20397424, 'metal': 20397425, 'Carton_gris': 20397426, 'autre_refus': 20397427, 'plastique': 20397428, 'Teint_Dans_La_Masse': 20397429, 'kraft': 20397430, 'flou': 20397431, 'cartonnette': 20397432, 'papier': 20397433, 'environnement': 20397434, 'Carton_brun': 20397435}]} input_args_next_step : {1336455083: ('0.028809089075987716',), 1336455081: ('0.028809089075987716',), 1336455078: ('0.028809089075987716',), 1336455075: ('0.028809089075987716',), 1336455073: ('0.028809089075987716',), 1336455069: ('0.028809089075987716',), 1336455035: ('0.028809089075987716',), 1336455033: ('0.028809089075987716',), 1336455031: ('0.028809089075987716',), 1336455028: ('0.028809089075987716',), 1336455025: ('0.028809089075987716',), 1336455022: ('0.028809089075987716',), 20397393: ()} output_args : {20397393: [{'mal_croppe': 20397424, 'metal': 20397425, 'Carton_gris': 20397426, 'autre_refus': 20397427, 'plastique': 20397428, 'Teint_Dans_La_Masse': 20397429, 'kraft': 20397430, 'flou': 20397431, 'cartonnette': 20397432, 'papier': 20397433, 'environnement': 20397434, 'Carton_brun': 20397435}]} args : 20397393 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.028809089075987716',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20397393) 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 (1336455083,1336455081,1336455078,1336455075,1336455073,1336455069,1336455035,1336455033,1336455031,1336455028,1336455025,1336455022) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1336455022 begin to download photo : 1336455031 begin to download photo : 1336455069 begin to download photo : 1336455078 download finish for photo 1336455078 begin to download photo : 1336455081 download finish for photo 1336455069 begin to download photo : 1336455073 download finish for photo 1336455022 begin to download photo : 1336455025 download finish for photo 1336455031 begin to download photo : 1336455033 download finish for photo 1336455081 begin to download photo : 1336455083 download finish for photo 1336455073 begin to download photo : 1336455075 download finish for photo 1336455033 begin to download photo : 1336455035 download finish for photo 1336455025 begin to download photo : 1336455028 download finish for photo 1336455083 download finish for photo 1336455035 download finish for photo 1336455075 download finish for photo 1336455028 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette203974241739180577/ imagette203974251739180577/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P20397393_10-02-2025_10_42_57.pdf 20397424 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=20397424 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203974241739180577 20397425 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=20397425 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203974251739180577 20397427 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=20397427 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1336452832: '1739179994_3920265_1336451999_f021b4ed57876f5a0fa29d0dbd10f1de_rle_crop_3667715854_0.png', 1336452833: '1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715892_0.png', 1336452834: '1739180013_3920612_1336452049_dc89d19dcbdbbc56d39861bc8a5d6d70_rle_crop_3667715951_0.png', 1336454623: '1739180232_3923743_1336453100_2db0fffc0b39e31fdaa327120e8ea778_rle_crop_3667719037_0.png', 1336455048: '1739180373_3925061_1336454213_3a23bd7f54f6fa1b494d9fe231d304f5_rle_crop_3667720342_0.png', 1336455049: '1739180373_3925061_1336454107_4e8b72cac23a582dc2c850f94ad7fc37_rle_crop_3667720354_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/89998e37ef2ac1c9694b4c963765a46b_92871444.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/aa45eeb91210326926d21b83b5e7736b_83134709.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/1a415271002f2a01ffee0f284ceae085_66686257.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/92c15f60d058c00e3b6ec073272672cc_13490405.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/79f7b606a172d0fb9255bf2fa7872b38_88292363.png change filename to text .imagette203974271739180577/ imagette203974271739180577/1739179994_3920265_1336451999_f021b4ed57876f5a0fa29d0dbd10f1de_rle_crop_3667715854_0.png.png imagette203974271739180577/1739180013_3920612_1336452049_dc89d19dcbdbbc56d39861bc8a5d6d70_rle_crop_3667715951_0.png.png imagette203974271739180577/1739180373_3925061_1336454107_4e8b72cac23a582dc2c850f94ad7fc37_rle_crop_3667720354_0.png.png imagette203974271739180577/1739180373_3925061_1336454213_3a23bd7f54f6fa1b494d9fe231d304f5_rle_crop_3667720342_0.png.png imagette203974271739180577/1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715892_0.png.png imagette203974271739180577/1739180232_3923743_1336453100_2db0fffc0b39e31fdaa327120e8ea778_rle_crop_3667719037_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/fa58b126f78507bcf773805b253f21e0_7459617.png imagette203974271739180577 20397428 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=20397428 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1336452841: '1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715896_0.png', 1336452842: '1739179994_3920265_1336451988_061be52ae86bb348194974314362adc1_rle_crop_3667715933_0.png', 1336454629: '1739180232_3923743_1336452831_a9716cb53ad0ed8ea73fbabd64555180_rle_crop_3667719112_0.png', 1336455019: '1739180353_3924875_1336454615_22306207a1dd1ea1684a676e160a22c3_rle_crop_3667719948_0.png', 1336455062: '1739180392_3925254_1336453725_f22fc01b7bd5807f187e2434b121f916_rle_crop_3667720457_0.png', 1336455208: '1739180464_3926116_1336454769_c7301f1223e6695d01832f97c26891f7_rle_crop_3667722258_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/74bc24e2a972e972123c05feded95c5d_55136609.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/f58453fb711ccb4aa955a0cafb9cea98_84534789.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/1376a71b3f900f5fdc4b72c48849e0cd_54981727.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/a6c0daa2a570c9d43d48a98b13c4b2f6_22066827.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/47a30b4140dc9a36f105a01a78c66337_33393917.png change filename to text .imagette203974281739180577/ imagette203974281739180577/1739180464_3926116_1336454769_c7301f1223e6695d01832f97c26891f7_rle_crop_3667722258_0.png.png imagette203974281739180577/1739179994_3920265_1336451988_061be52ae86bb348194974314362adc1_rle_crop_3667715933_0.png.png imagette203974281739180577/1739180392_3925254_1336453725_f22fc01b7bd5807f187e2434b121f916_rle_crop_3667720457_0.png.png imagette203974281739180577/1739180232_3923743_1336452831_a9716cb53ad0ed8ea73fbabd64555180_rle_crop_3667719112_0.png.png imagette203974281739180577/1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715896_0.png.png imagette203974281739180577/1739180353_3924875_1336454615_22306207a1dd1ea1684a676e160a22c3_rle_crop_3667719948_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/29411798969c8f158b9cc90c3517387c_99949705.png imagette203974281739180577 20397430 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=20397430 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1336455020: '1739180353_3924875_1336454622_26a23217f92fc15dcb6fe90ea329547f_rle_crop_3667719924_0.png', 1336455054: '1739180373_3925061_1336454630_aed19cfb9c795338350d3e4947816b5b_rle_crop_3667720315_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/eb84600261dc5e2258db73e7ee442c8a_20870699.png change filename to text .imagette203974301739180578/ imagette203974301739180578/1739180353_3924875_1336454622_26a23217f92fc15dcb6fe90ea329547f_rle_crop_3667719924_0.png.png imagette203974301739180578/1739180373_3925061_1336454630_aed19cfb9c795338350d3e4947816b5b_rle_crop_3667720315_0.png.png imagette203974311739180578/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/b2a74db73b34338afed5c89b7beebe10_31595038.png imagette203974301739180578 20397431 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=20397431 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette203974311739180578 20397432 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=20397432 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1336452838: '1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715893_0.png', 1336454627: '1739180232_3923743_1336452845_8860b755077bf804ba7686cb34ba970e_rle_crop_3667719087_0.png', 1336455018: '1739180353_3924875_1336454613_4602ef15dcc316007355dd69f7255593_rle_crop_3667719954_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/c0d2b55f002865fd70d5b3f79ac8142f_35102390.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/06c4a85cbcc79a3d46b1ddae7cef304b_96455144.png change filename to text .imagette203974321739180578/ imagette203974321739180578/1739180353_3924875_1336454613_4602ef15dcc316007355dd69f7255593_rle_crop_3667719954_0.png.png imagette203974321739180578/1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715893_0.png.png imagette203974321739180578/1739180232_3923743_1336452845_8860b755077bf804ba7686cb34ba970e_rle_crop_3667719087_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/f0efcd298b9f941f363aca5f2cc51c77_48048217.png imagette203974321739180578 20397426 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=20397426 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1336452835: '1739179994_3920265_1336451996_87c336da0c1ee501f4657df743f30728_rle_crop_3667715871_0.png', 1336452836: '1739180013_3920612_1336452052_e56bb9ffcb4f114e1c1cb40f4bc15cf3_rle_crop_3667715941_0.png', 1336452837: '1739180013_3920612_1336452049_dc89d19dcbdbbc56d39861bc8a5d6d70_rle_crop_3667715954_0.png', 1336453140: '1739180113_3922142_1336452092_d024f9176b2e59aa45ce4f52fd1b9abf_rle_crop_3667716623_0.png', 1336454625: '1739180232_3923743_1336453100_2db0fffc0b39e31fdaa327120e8ea778_rle_crop_3667719044_0.png', 1336455016: '1739180353_3924875_1336454613_4602ef15dcc316007355dd69f7255593_rle_crop_3667719955_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/001296cdc60c447eb41a5805d501c2a7_17046251.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/0b9f81486c07a0862bb7f6cdcec0ea6b_45762054.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/2bcdb1e191fbb5fd06292d6cb4996a30_37667912.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/34c26dee5b16f87c8a08cdee24340774_21036078.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/62cab60303262b32ac29f80bb47cf8cb_63070528.png change filename to text .imagette203974261739180578/ imagette203974261739180578/1739179994_3920265_1336451996_87c336da0c1ee501f4657df743f30728_rle_crop_3667715871_0.png.png imagette203974261739180578/1739180232_3923743_1336453100_2db0fffc0b39e31fdaa327120e8ea778_rle_crop_3667719044_0.png.png imagette203974261739180578/1739180113_3922142_1336452092_d024f9176b2e59aa45ce4f52fd1b9abf_rle_crop_3667716623_0.png.png imagette203974261739180578/1739180013_3920612_1336452049_dc89d19dcbdbbc56d39861bc8a5d6d70_rle_crop_3667715954_0.png.png imagette203974261739180578/1739180013_3920612_1336452052_e56bb9ffcb4f114e1c1cb40f4bc15cf3_rle_crop_3667715941_0.png.png imagette203974261739180578/1739180353_3924875_1336454613_4602ef15dcc316007355dd69f7255593_rle_crop_3667719955_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/fe0ae564492f73368511935e8287d3e8_62168809.png imagette203974261739180578 20397429 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=20397429 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1336452829: '1739179994_3920265_1336451996_87c336da0c1ee501f4657df743f30728_rle_crop_3667715878_0.png', 1336452830: '1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715895_0.png', 1336453139: '1739180113_3922142_1336452093_72b37658a764110f6090834e89005a67_rle_crop_3667716614_0.png', 1336454618: '1739180232_3923743_1336453100_2db0fffc0b39e31fdaa327120e8ea778_rle_crop_3667719042_0.png', 1336454619: '1739180232_3923743_1336453008_1d37190652edbbeadae6ab5d3232496a_rle_crop_3667719070_0.png', 1336454620: '1739180232_3923743_1336452843_a4ae4dda5ad38ff2b6122a2807cad30c_rle_crop_3667719100_0.png', 1336454621: '1739180232_3923743_1336452831_a9716cb53ad0ed8ea73fbabd64555180_rle_crop_3667719118_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/77c5a903584adf1ceb3af2eb6323235f_10041298.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/82c4ddc300295cf0258d9b154f49ab1f_72524901.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/91bef5651d68dd13bedc86cf7b70fc2d_69335700.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/f6b22fe4bcae44568fff9f0b43078b75_92543505.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/91019b4bcbfc4c64f445de80a43d5960_84633645.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/b26c20208d672619d14a6cda91b772fc_66181756.png change filename to text .imagette203974291739180578/ imagette203974291739180578/1739180232_3923743_1336453100_2db0fffc0b39e31fdaa327120e8ea778_rle_crop_3667719042_0.png.png imagette203974291739180578/1739180232_3923743_1336452831_a9716cb53ad0ed8ea73fbabd64555180_rle_crop_3667719118_0.png.png imagette203974291739180578/1739180113_3922142_1336452093_72b37658a764110f6090834e89005a67_rle_crop_3667716614_0.png.png imagette203974291739180578/1739180232_3923743_1336452843_a4ae4dda5ad38ff2b6122a2807cad30c_rle_crop_3667719100_0.png.png imagette203974291739180578/1739179994_3920265_1336451996_87c336da0c1ee501f4657df743f30728_rle_crop_3667715878_0.png.png imagette203974291739180578/1739179994_3920265_1336451991_e7e0493af053548447bead1a688291e6_rle_crop_3667715895_0.png.png imagette203974291739180578/1739180232_3923743_1336453008_1d37190652edbbeadae6ab5d3232496a_rle_crop_3667719070_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/5e5230718c0f5dd8ff0fd37de0c4e43e_50945656.png imagette203974291739180578 20397435 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=20397435 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1336452839: '1739179994_3920265_1336451999_f021b4ed57876f5a0fa29d0dbd10f1de_rle_crop_3667715860_0.png', 1336453141: '1739180113_3922142_1336452097_371e27552f05d324ff84a9652a7d0580_rle_crop_3667716591_0.png', 1336454628: '1739180232_3923743_1336452843_a4ae4dda5ad38ff2b6122a2807cad30c_rle_crop_3667719099_0.png', 1336455052: '1739180373_3925061_1336454367_21f19b37a1898e07e2d34b710aad70f3_rle_crop_3667720332_0.png', 1336455053: '1739180373_3925061_1336454213_3a23bd7f54f6fa1b494d9fe231d304f5_rle_crop_3667720346_0.png', 1336455060: '1739180392_3925254_1336454452_9defc09a38f444136b2336136ab694ee_rle_crop_3667720370_0.png', 1336455061: '1739180392_3925254_1336453444_ae10ab996d87df91720bafde189a2b8e_rle_crop_3667720502_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/a84b000e862adc0a8a001bfe2b4ce662_48170095.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/8544df29cf9607cee54c11ef4cee746a_3524799.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/51f9a5c0ce6f34b94da51b029a82690d_90461279.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/6b929343f0a4a294a516d96a7dfd410e_94575867.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/7fe56aef7b9d3587a2eb314d70ae33d4_78228589.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/5d384567d0904ec129f2eff6b0a7395b_95826635.png change filename to text .imagette203974351739180579/ imagette203974351739180579/1739180232_3923743_1336452843_a4ae4dda5ad38ff2b6122a2807cad30c_rle_crop_3667719099_0.png.png imagette203974351739180579/1739180392_3925254_1336454452_9defc09a38f444136b2336136ab694ee_rle_crop_3667720370_0.png.png imagette203974351739180579/1739180373_3925061_1336454367_21f19b37a1898e07e2d34b710aad70f3_rle_crop_3667720332_0.png.png imagette203974351739180579/1739180113_3922142_1336452097_371e27552f05d324ff84a9652a7d0580_rle_crop_3667716591_0.png.png imagette203974351739180579/1739179994_3920265_1336451999_f021b4ed57876f5a0fa29d0dbd10f1de_rle_crop_3667715860_0.png.png imagette203974351739180579/1739180392_3925254_1336453444_ae10ab996d87df91720bafde189a2b8e_rle_crop_3667720502_0.png.png imagette203974351739180579/1739180373_3925061_1336454213_3a23bd7f54f6fa1b494d9fe231d304f5_rle_crop_3667720346_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/00cac39207d6c719db497e886dbfc81d_43952935.png imagette203974351739180579 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20397393 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20397436,20397437,20397438,20397439,20397440,20397441,20397442,20397443,20397444,20397445,20397446,20397447?tags=mal_croppe,metal,Carton_gris,autre_refus,plastique,Teint_Dans_La_Masse,kraft,flou,cartonnette,papier,environnement,Carton_brun your option no_mail is active, we will not send the real mail to your client args[1336455083] : ('0.028809089075987716',) no score found for photo 1336455083 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455081] : ('0.028809089075987716',) no score found for photo 1336455081 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455078] : ('0.028809089075987716',) no score found for photo 1336455078 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455075] : ('0.028809089075987716',) no score found for photo 1336455075 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455073] : ('0.028809089075987716',) no score found for photo 1336455073 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455069] : ('0.028809089075987716',) no score found for photo 1336455069 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455035] : ('0.028809089075987716',) no score found for photo 1336455035 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455033] : ('0.028809089075987716',) no score found for photo 1336455033 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455031] : ('0.028809089075987716',) no score found for photo 1336455031 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455028] : ('0.028809089075987716',) no score found for photo 1336455028 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455025] : ('0.028809089075987716',) no score found for photo 1336455025 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com args[1336455022] : ('0.028809089075987716',) no score found for photo 1336455022 apple ('0.028809089075987716',) We are sending mail with results at report@fotonower.com refus_total : 0.028809089075987716 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=20397393 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_P20397393_10-02-2025_10_42_57.pdf results_Auto_P20397393_10-02-2025_10_42_57.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20397393_10-02-2025_10_42_57.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','20397393','results_Auto_P20397393_10-02-2025_10_42_57.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20397393_10-02-2025_10_42_57.pdf','pdf','','0.22','0.028809089075987716') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20397393]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] map_info['map_portfolio_photo'] : {20397393: [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022, 1336454858, 1336454769, 1336454656, 1336454630, 1336454622, 1336454615, 1336454613, 1336454452, 1336454367, 1336454213, 1336454107, 1336454085, 1336454063, 1336453815, 1336453725, 1336453619, 1336453537, 1336453444, 1336453100, 1336453095, 1336453092, 1336453090, 1336453014, 1336453008, 1336452845, 1336452843, 1336452831, 1336452827, 1336452098, 1336452097, 1336452095, 1336452093, 1336452092, 1336452055, 1336452053, 1336452052, 1336452049, 1336451999, 1336451996, 1336451991, 1336451988]} final : False mtd_id 4302 list_pids : [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] 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, '2570759') ('4302', '20397393', '1336455083', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455081', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455078', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455075', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455073', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455069', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455035', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455033', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455031', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455028', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455025', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455022', None, None, None, None, None, '2570759') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '20397393', '1336455083', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455081', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455078', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455075', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455073', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455069', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455035', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455033', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455031', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455028', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455025', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455022', None, None, None, None, None, '2570759')] time used for this insertion : 0.01368570327758789 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.5486695766448975 time spend to save output : 0.013941764831542969 total time spend for step 4 : 3.5626113414764404 step5:split_time_score Mon Feb 10 10:43:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['20397393'] 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 : [('20397393',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20397393) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1336455078: {'path': 'temp/1739180577_1809418_1336455078_e9feb4a6488c7ca7717172263114b99b.jpg', 'extension': 'jpg'}, 1336455081: {'path': 'temp/1739180577_1809418_1336455081_a0ca3810e85977239746395eed84613b.jpg', 'extension': 'jpg'}, 1336455083: {'path': 'temp/1739180577_1809418_1336455083_0892289c28627555c14458375b2aaac8.jpg', 'extension': 'jpg'}, 1336455031: {'path': 'temp/1739180577_1809418_1336455031_42f418cfd0c5924dfdcc072c8eb68407.jpg', 'extension': 'jpg'}, 1336455033: {'path': 'temp/1739180577_1809418_1336455033_9f85546d3d02629ceb53747ed8aee3b1.jpg', 'extension': 'jpg'}, 1336455035: {'path': 'temp/1739180577_1809418_1336455035_0a9b02478904a49c48d34ab112924bec.jpg', 'extension': 'jpg'}, 1336455069: {'path': 'temp/1739180577_1809418_1336455069_793ddb899f96c358e5b9fe4ce6ae4f8c.jpg', 'extension': 'jpg'}, 1336455073: {'path': 'temp/1739180577_1809418_1336455073_e4d4c959cc6bea2ec7ee1224c5932994.jpg', 'extension': 'jpg'}, 1336455075: {'path': 'temp/1739180577_1809418_1336455075_34dff2271c67943539d222eec9520005.jpg', 'extension': 'jpg'}, 1336455022: {'path': 'temp/1739180577_1809418_1336455022_b68e0c59bd1c3b196a6072cf0d037406.jpg', 'extension': 'jpg'}, 1336455025: {'path': 'temp/1739180577_1809418_1336455025_3114bcc5d73eb644b07ae05e5083febd.jpg', 'extension': 'jpg'}, 1336455028: {'path': 'temp/1739180577_1809418_1336455028_54a0fc183485e91926f7040c8cbefdb4.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 = 20397393; (('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 = 20397393 group by h (('10', 53),) 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=20397393 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 (20397393) 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 (20397393) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 10022025 20397393 Nombre de photos uploadées : 53 / 23040 (0%) 10022025 20397393 Nombre de photos taguées (types de déchets): 0 / 53 (0%) 10022025 20397393 Nombre de photos taguées (volume) : 0 / 53 (0%) [{'photo_id': 1336451999, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/f021b4ed57876f5a0fa29d0dbd10f1de.jpg', 'username': None, 'uploaded_at': 1739179867, 'text': 'image_10022025_10_30_03_010138m0.jpg 1e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1336451996, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/87c336da0c1ee501f4657df743f30728.jpg', 'username': None, 'uploaded_at': 1739179867, 'text': 'image_10022025_10_30_13_010139m0.jpg 2e-05 for time 1, id_amount 1 this amount prod time diff : 1e-05'}, {'photo_id': 1336451991, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/e7e0493af053548447bead1a688291e6.jpg', 'username': None, 'uploaded_at': 1739179867, 'text': 'image_10022025_10_30_24_010135m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1336451988, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/10/061be52ae86bb348194974314362adc1.jpg', 'username': None, 'uploaded_at': 1739179867, 'text': 'image_10022025_10_30_34_010134m0.jpg 4e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.291534423828125e-06 ????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0017566680908203125 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20397393, '2025-02-10' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1590566,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.022228240966796875 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= 1590566 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1590566, 'dashboard_run_id': 1598664, 'mtr_portfolio_id': 20395726, 'dashboard_result_id': 8786638, '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_P20395726_10-02-2025_10_02_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20395730, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20395731, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20395732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20395733, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20395734, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20395735, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20395736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20395737, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20395738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20395739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20395740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20395741, 'pht': 3726}}"}, {'dashboat_entry_day': 1590566, 'dashboard_run_id': 1598664, 'mtr_portfolio_id': 20396366, 'dashboard_result_id': 8786639, '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_P20396366_10-02-2025_10_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20396369, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20396370, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20396371, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20396372, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20396373, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20396374, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20396375, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20396376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20396377, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20396378, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20396379, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20396380, 'pht': 3726}}"}, {'dashboat_entry_day': 1590566, 'dashboard_run_id': 1598664, 'mtr_portfolio_id': 20396893, 'dashboard_result_id': 8786640, '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_P20396893_10-02-2025_10_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20396895, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20396896, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20396897, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20396898, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20396899, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20396900, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20396901, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20396902, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20396903, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20396904, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20396905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20396906, 'pht': 3726}}"}, {'dashboat_entry_day': 1590566, 'dashboard_run_id': 1598664, 'mtr_portfolio_id': 20397393, 'dashboard_result_id': 8786641, '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_P20397393_10-02-2025_10_41_00.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20397424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20397425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20397426, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20397427, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20397428, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20397429, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20397430, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20397431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20397432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20397433, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20397434, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20397435, '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 = 20395726 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': 2570650, 'mtr_portfolio_id': 20395726, 'created_at': datetime.datetime(2025, 2, 10, 10, 2, 57), 'result': '0.044456337169473906', 'result_long': None, 'result_double': None}] Qualite : 0.044456337169473906 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20395726 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20395726_10-02-2025_10_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20395726 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_P20395726_10-02-2025_10_02_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20395730, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20395731, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20395732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20395733, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20395734, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20395735, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20395736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20395737, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20395738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20395739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20395740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20395741, 'pht': 3726}}" where mtr_portfolio_id = 20395726 and dashboard_run_id = 1598664 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`=20395726 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8786638, 0.044456337169473906, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20395726_10-02-2025_10_02_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20395730, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20395731, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20395732, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20395733, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20395734, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20395735, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20395736, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20395737, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20395738, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20395739, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20395740, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20395741, '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 = 20396366 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': 2570689, 'mtr_portfolio_id': 20396366, 'created_at': datetime.datetime(2025, 2, 10, 10, 16, 58), 'result': '0.04118415370043225', 'result_long': None, 'result_double': None}] Qualite : 0.04118415370043225 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20396366 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20396366_10-02-2025_10_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20396366 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_P20396366_10-02-2025_10_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20396369, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20396370, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20396371, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20396372, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20396373, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20396374, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20396375, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20396376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20396377, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20396378, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20396379, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20396380, 'pht': 3726}}" where mtr_portfolio_id = 20396366 and dashboard_run_id = 1598664 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`=20396366 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8786639, 0.04118415370043225, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20396366_10-02-2025_10_16_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20396369, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20396370, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20396371, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20396372, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20396373, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20396374, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20396375, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20396376, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20396377, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20396378, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20396379, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20396380, '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 = 20396893 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': 2570719, 'mtr_portfolio_id': 20396893, 'created_at': datetime.datetime(2025, 2, 10, 10, 32, 59), 'result': '0.03383714306070083', 'result_long': None, 'result_double': None}] Qualite : 0.03383714306070083 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20396893 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20396893_10-02-2025_10_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20396893 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_P20396893_10-02-2025_10_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20396895, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20396896, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20396897, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20396898, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20396899, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20396900, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20396901, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20396902, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20396903, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20396904, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20396905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20396906, 'pht': 3726}}" where mtr_portfolio_id = 20396893 and dashboard_run_id = 1598664 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`=20396893 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8786640, 0.03383714306070083, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20396893_10-02-2025_10_32_59.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20396895, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20396896, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20396897, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20396898, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20396899, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20396900, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20396901, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20396902, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20396903, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20396904, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20396905, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20396906, '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 = 20397393 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': 2570759, 'mtr_portfolio_id': 20397393, 'created_at': datetime.datetime(2025, 2, 10, 10, 42, 56), 'result': '0.028809089075987716', 'result_long': None, 'result_double': None}] Qualite : 0.028809089075987716 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20397393 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20397393_10-02-2025_10_42_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20397393 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_P20397393_10-02-2025_10_42_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20397424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20397425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20397426, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20397427, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20397428, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20397429, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20397430, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20397431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20397432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20397433, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20397434, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20397435, 'pht': 3726}}" where mtr_portfolio_id = 20397393 and dashboard_run_id = 1598664 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`=20397393 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8786641, 0.028809089075987716, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20397393_10-02-2025_10_42_57.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20397424, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20397425, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20397426, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20397427, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20397428, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20397429, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20397430, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20397431, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20397432, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20397433, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20397434, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20397435, '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 (20395726,20396366,20396893,20397393) result : ((1336440471,), (1336440557,), (1336440608,), (1336440696,), (1336440697,), (1336440698,), (1336440705,), (1336441256,), (1336441258,), (1336441259,), (1336441328,), (1336441331,), (1336442175,), (1336442261,), (1336442352,), (1336443402,), (1336443404,), (1336443407,), (1336443485,), (1336443581,), (1336443631,), (1336443724,), (1336443726,), (1336443729,), (1336443731,), (1336443818,), (1336444179,), (1336444295,), (1336444297,), (1336444299,), (1336444301,), (1336444314,), (1336444316,), (1336444320,), (1336444324,), (1336444327,), (1336444331,), (1336444538,), (1336444540,), (1336444555,), (1336444557,), (1336444560,), (1336444563,), (1336444603,), (1336444605,), (1336444608,), (1336444620,), (1336444842,), (1336444843,), (1336444845,), (1336444846,), (1336444847,), (1336445090,), (1336445092,), (1336445094,), (1336445383,), (1336445388,), (1336445393,), (1336445397,), (1336445406,), (1336445407,), (1336445410,), (1336445412,), (1336445414,), (1336445504,), (1336445500,), (1336445501,), (1336445502,), (1336445731,), (1336445733,), (1336445772,), (1336445779,), (1336445801,), (1336445802,), (1336445805,), (1336445808,), (1336445880,), (1336446531,), (1336446533,), (1336446535,), (1336446587,), (1336446647,), (1336446648,), (1336446650,), (1336446652,), (1336446696,), (1336446699,), (1336446746,), (1336446748,), (1336446823,), (1336446825,), (1336446828,), (1336446831,), (1336446861,), (1336446862,), (1336446864,), (1336446866,), (1336446869,), (1336446894,), (1336446897,), (1336446899,), (1336446902,), (1336446905,), (1336447098,), (1336447104,), (1336447105,), (1336447107,), (1336447109,), (1336447135,), (1336447137,), (1336447141,), (1336447165,), (1336447208,), (1336447320,), (1336447323,), (1336447327,), (1336447330,), (1336447333,), (1336447358,), (1336447360,), (1336447362,), (1336447366,), (1336447368,), (1336447396,), (1336447398,), (1336447404,), (1336447407,), (1336447436,), (1336447438,), (1336447440,), (1336447443,), (1336447446,), (1336447487,), (1336447484,), (1336447725,), (1336447767,), (1336447771,), (1336447774,), (1336447776,), (1336447778,), (1336447856,), (1336447859,), (1336447898,), (1336447900,), (1336447903,), (1336448700,), (1336448701,), (1336448704,), (1336448771,), (1336448861,), (1336448862,), (1336448866,), (1336448868,), (1336448872,), (1336448898,), (1336448900,), (1336448903,), (1336449441,), (1336449526,), (1336449613,), (1336449697,), (1336450511,), (1336450613,), (1336450615,), (1336451018,), (1336451020,), (1336451045,), (1336451079,), (1336451083,), (1336451088,), (1336451572,), (1336451662,), (1336451676,), (1336451720,), (1336451741,), (1336451758,), (1336451811,), (1336451812,), (1336451816,), (1336451819,), (1336451823,), (1336451825,), (1336451855,), (1336451859,), (1336451861,), (1336451887,), (1336451889,), (1336451891,), (1336451893,), (1336451927,), (1336451930,), (1336451932,), (1336451934,), (1336451942,), (1336452002,), (1336451988,), (1336451991,), (1336451996,), (1336451999,), (1336452049,), (1336452052,), (1336452053,), (1336452055,), (1336452092,), (1336452093,), (1336452095,), (1336452097,), (1336452098,), (1336452827,), (1336452831,), (1336452843,), (1336452845,), (1336453008,), (1336453014,), (1336453090,), (1336453092,), (1336453095,), (1336453100,), (1336453444,), (1336453537,), (1336453619,), (1336453725,), (1336453815,), (1336454063,), (1336454085,), (1336454107,), (1336454213,), (1336454367,), (1336454452,), (1336454613,), (1336454615,), (1336454622,), (1336454630,), (1336454656,), (1336454769,), (1336454858,), (1336455022,), (1336455025,), (1336455028,), (1336455031,), (1336455033,), (1336455035,), (1336455069,), (1336455073,), (1336455075,), (1336455078,), (1336455081,), (1336455083,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'10022025': {'nb_upload': 53, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20397393]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] map_info['map_portfolio_photo'] : {20397393: [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022, 1336454858, 1336454769, 1336454656, 1336454630, 1336454622, 1336454615, 1336454613, 1336454452, 1336454367, 1336454213, 1336454107, 1336454085, 1336454063, 1336453815, 1336453725, 1336453619, 1336453537, 1336453444, 1336453100, 1336453095, 1336453092, 1336453090, 1336453014, 1336453008, 1336452845, 1336452843, 1336452831, 1336452827, 1336452098, 1336452097, 1336452095, 1336452093, 1336452092, 1336452055, 1336452053, 1336452052, 1336452049, 1336451999, 1336451996, 1336451991, 1336451988]} final : True mtd_id 4302 list_pids : [1336455083, 1336455081, 1336455078, 1336455075, 1336455073, 1336455069, 1336455035, 1336455033, 1336455031, 1336455028, 1336455025, 1336455022] Looping around the photos to save general results len do output : 1 /20397393Didn'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, '2570759') ('4302', '20397393', '1336455083', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455081', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455078', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455075', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455073', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455069', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455035', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455033', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455031', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455028', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455025', None, None, None, None, None, '2570759') ('4302', None, None, None, None, None, None, None, '2570759') ('4302', '20397393', '1336455022', None, None, None, None, None, '2570759') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '20397393', 'None', None, None, None, None, '2570759'), ('4302', '20397393', '1336455083', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455081', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455078', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455075', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455073', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455069', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455035', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455033', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455031', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455028', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455025', None, None, None, None, None, '2570759'), ('4302', '20397393', '1336455022', None, None, None, None, None, '2570759')] time used for this insertion : 0.013038873672485352 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.33374452590942383 time spend to save output : 0.013277053833007812 total time spend for step 5 : 0.34702157974243164 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 (2570759) 2.28user 2.16system 0:06.78elapsed 65%CPU (0avgtext+0avgdata 160736maxresident)k 40inputs+13024outputs (0major+64151minor)pagefaults 0swaps