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 : 2236352 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 (3424708) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3424708) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596080 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3424708'] with mtr_portfolio_ids : ['25596080'] and first list_photo_ids : [] new path : /proc/2236352/ Name: python3 Umask: 0002 State: R (running) Tgid: 2236352 Ngid: 0 Pid: 2236352 PPid: 2236351 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2236352 NSpid: 2236352 NSpgid: 2235589 NSsid: 2235589 VmPeak: 1106860 kB VmSize: 1106860 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99332 kB VmRSS: 99332 kB RssAnon: 59812 kB RssFile: 39520 kB RssShmem: 0 kB VmData: 865612 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 600 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 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: 53 nonvoluntary_ctxt_switches: 97 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2236352', 'Ngid': '0', 'Pid': '2236352', 'PPid': '2236351', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2236352', 'NSpid': '2236352', 'NSpgid': '2235589', 'NSsid': '2235589', 'VmPeak': '1106860 kB', 'VmSize': '1106860 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99332 kB', 'VmRSS': '99332 kB', 'RssAnon': '59812 kB', 'RssFile': '39520 kB', 'RssShmem': '0 kB', 'VmData': '865612 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '600 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', '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': '53', 'nonvoluntary_ctxt_switches': '97'} ('datou_batch_current', '2236352', '1106860', '0', '1106860', '865612', '99332', b'', 'marlene', '3424708') 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 (25596080) 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 (3424708 ) ) 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 (25596080) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1374842022, 'portfolio_id': 25596080}, {'photo_id': 1374842021, 'portfolio_id': 25596080}, {'photo_id': 1374842019, 'portfolio_id': 25596080}, {'photo_id': 1374842017, 'portfolio_id': 25596080}, {'photo_id': 1374842015, 'portfolio_id': 25596080}, {'photo_id': 1374842005, 'portfolio_id': 25596080}, {'photo_id': 1374842003, 'portfolio_id': 25596080}, {'photo_id': 1374842000, 'portfolio_id': 25596080}, {'photo_id': 1374841997, 'portfolio_id': 25596080}, {'photo_id': 1374841996, 'portfolio_id': 25596080}, {'photo_id': 1374841995, 'portfolio_id': 25596080}, {'photo_id': 1374841991, 'portfolio_id': 25596080}, {'photo_id': 1374841989, 'portfolio_id': 25596080}, {'photo_id': 1374841987, 'portfolio_id': 25596080}, {'photo_id': 1374841986, 'portfolio_id': 25596080}, {'photo_id': 1374841985, 'portfolio_id': 25596080}, {'photo_id': 1374841984, 'portfolio_id': 25596080}, {'photo_id': 1374841953, 'portfolio_id': 25596080}, {'photo_id': 1374841952, 'portfolio_id': 25596080}] map_portfolio_id_photo_id: {25596080: [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984, 1374841953, 1374841952]} ##### 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.01596975326538086 #### 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 Sat Aug 2 00:34: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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25596080) 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 : 25596080 get user id for portfolio 25596080 get sub ptf for main ptf 25596080, type 3726 and hashtags ['Carton_brun', 'Teint_Dans_La_Masse', 'flou', 'Carton_gris', 'papier', 'kraft', 'plastique', 'autre_refus', 'metal', 'environnement', 'mal_croppe', 'cartonnette'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25596080 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','Teint_Dans_La_Masse','flou','Carton_gris','papier','kraft','plastique','autre_refus','metal','environnement','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25596080 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','Teint_Dans_La_Masse','flou','Carton_gris','papier','kraft','plastique','autre_refus','metal','environnement','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 25596080, 'sub_port_id': 25596101, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258080, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'flou': {'main_port_id': 25596080, 'sub_port_id': 25596102, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258081, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'cartonnette': {'main_port_id': 25596080, 'sub_port_id': 25596103, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258082, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'environnement': {'main_port_id': 25596080, 'sub_port_id': 25596104, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258083, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'plastique': {'main_port_id': 25596080, 'sub_port_id': 25596105, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258084, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'papier': {'main_port_id': 25596080, 'sub_port_id': 25596106, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258085, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'Carton_brun': {'main_port_id': 25596080, 'sub_port_id': 25596107, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258086, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'kraft': {'main_port_id': 25596080, 'sub_port_id': 25596108, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258087, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'mal_croppe': {'main_port_id': 25596080, 'sub_port_id': 25596109, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258088, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'autre_refus': {'main_port_id': 25596080, 'sub_port_id': 25596110, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258089, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'Carton_gris': {'main_port_id': 25596080, 'sub_port_id': 25596111, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258090, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}, 'metal': {'main_port_id': 25596080, 'sub_port_id': 25596112, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258091, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25596101 , 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=25596080 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 (25596101) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596102 , 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=25596080 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 (25596102) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596103 , 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=25596080 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 (25596103) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596104 , 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=25596080 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 (25596104) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596105 , 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=25596080 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 (25596105) result : ((1374842012,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596106 , 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=25596080 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 (25596106) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596107 , 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=25596080 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 (25596107) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596108 , 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=25596080 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 (25596108) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596109 , 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=25596080 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 (25596109) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596110 , 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=25596080 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 (25596110) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596111 , 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=25596080 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 (25596111) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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 25596112 , 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=25596080 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 (25596112) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25596080) result : ((1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) 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 (1374842000) 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`=25596080 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','Teint_Dans_La_Masse','flou','Carton_gris','papier','kraft','plastique','autre_refus','metal','environnement','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=25596080 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_brun','Teint_Dans_La_Masse','flou','Carton_gris','papier','kraft','plastique','autre_refus','metal','environnement','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 25596080, 'sub_port_id': 25596113, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258092, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'flou': {'main_port_id': 25596080, 'sub_port_id': 25596114, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258093, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'cartonnette': {'main_port_id': 25596080, 'sub_port_id': 25596115, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258094, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'environnement': {'main_port_id': 25596080, 'sub_port_id': 25596116, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258095, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'plastique': {'main_port_id': 25596080, 'sub_port_id': 25596117, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258096, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'papier': {'main_port_id': 25596080, 'sub_port_id': 25596118, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258097, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'Carton_brun': {'main_port_id': 25596080, 'sub_port_id': 25596119, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258098, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'kraft': {'main_port_id': 25596080, 'sub_port_id': 25596120, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258099, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'mal_croppe': {'main_port_id': 25596080, 'sub_port_id': 25596121, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258100, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'autre_refus': {'main_port_id': 25596080, 'sub_port_id': 25596122, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258101, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'Carton_gris': {'main_port_id': 25596080, 'sub_port_id': 25596123, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258102, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}, 'metal': {'main_port_id': 25596080, 'sub_port_id': 25596124, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17258103, 'last_updated_at': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_desc': datetime.datetime(2025, 8, 2, 0, 33, 30), 'last_updated_at_asc': datetime.datetime(2025, 8, 2, 0, 33, 30)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596113,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596101 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596114,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596102 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596115,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596103 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596116,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596104 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596117,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596105 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596118,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596106 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596119,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596107 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596120,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596108 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596121,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596109 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596122,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596110 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596123,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596111 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25596124,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25596112 lien utilise dans velours : https://www.fotonower.com/velours/25596113,25596114,25596115,25596116,25596117,25596118,25596119,25596120,25596121,25596122,25596123,25596124?tags=Teint_Dans_La_Masse,flou,cartonnette,environnement,plastique,papier,Carton_brun,kraft,mal_croppe,autre_refus,Carton_gris,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25596080]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] map_info['map_portfolio_photo'] : {25596080: [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984, 1374841953, 1374841952]} final : False mtd_id 4302 list_pids : [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] Looping around the photos to save general results len do output : 1 /25596080. 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, '3424708') ('4302', '25596080', '1374842022', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842021', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842019', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842017', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842015', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842005', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842003', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842000', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841997', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841996', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841995', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841991', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841989', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841987', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841986', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841985', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841984', None, None, None, None, None, '3424708') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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, '25596080', "{'Teint_Dans_La_Masse': 25596101, 'flou': 25596102, 'cartonnette': 25596103, 'environnement': 25596104, 'plastique': 25596105, 'papier': 25596106, 'Carton_brun': 25596107, 'kraft': 25596108, 'mal_croppe': 25596109, 'autre_refus': 25596110, 'Carton_gris': 25596111, 'metal': 25596112}", None, None, None, None, '3424708'), ('4302', '25596080', '1374842022', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842021', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842019', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842017', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842015', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842005', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842003', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842000', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841997', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841996', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841995', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841991', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841989', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841987', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841986', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841985', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841984', None, None, None, None, None, '3424708')] time used for this insertion : 0.22564363479614258 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.431687593460083 time spend to save output : 0.22599411010742188 total time spend for step 1 : 0.6576817035675049 step2:final Sat Aug 2 00:34:58 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 (25596080) 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 25596080 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1374841953,1374841952,1374842022,1374841991,1374841989,1374842021,1374841987,1374842019,1374841986,1374842017,1374841985,1374842015,1374842005,1374841984,1374842003,1374842000,1374841997,1374841996,1374841995); 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([25596080]) Inside saveOutput : final : False verbose : True original output for save of step final : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} new output for save of step final : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] map_info['map_portfolio_photo'] : {25596080: [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984, 1374841953, 1374841952]} final : False mtd_id 4302 list_pids : [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] Looping around the photos to save general results len do output : 17 /1374842022.Didn't retrieve data . /1374842021.Didn't retrieve data . /1374842019.Didn't retrieve data . /1374842017.Didn't retrieve data . /1374842015.Didn't retrieve data . /1374842005.Didn't retrieve data . /1374842003.Didn't retrieve data . /1374842000.Didn't retrieve data . /1374841997.Didn't retrieve data . /1374841996.Didn't retrieve data . /1374841995.Didn't retrieve data . /1374841991.Didn't retrieve data . /1374841989.Didn't retrieve data . /1374841987.Didn't retrieve data . /1374841986.Didn't retrieve data . /1374841985.Didn't retrieve data . /1374841984.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, '3424708') ('4302', '25596080', '1374842022', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842021', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842019', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842017', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842015', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842005', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842003', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842000', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841997', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841996', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841995', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841991', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841989', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841987', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841986', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841985', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841984', None, None, None, None, None, '3424708') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 51 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', '25596080', '1374842022', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374842021', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374842019', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374842017', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374842015', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374842005', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374842003', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374842000', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841997', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841996', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841995', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841991', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841989', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841987', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841986', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841985', '0.021069108073365133', None, None, None, None, '3424708'), ('4302', '25596080', '1374841984', '0.021069108073365133', None, None, None, None, '3424708')] time used for this insertion : 0.08039736747741699 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.11091160774230957 time spend to save output : 0.08120846748352051 total time spend for step 2 : 0.19212007522583008 step3:velours_tree Sat Aug 2 00:34:58 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 : {25596080: [{'Teint_Dans_La_Masse': 25596101, 'flou': 25596102, 'cartonnette': 25596103, 'environnement': 25596104, 'plastique': 25596105, 'papier': 25596106, 'Carton_brun': 25596107, 'kraft': 25596108, 'mal_croppe': 25596109, 'autre_refus': 25596110, 'Carton_gris': 25596111, 'metal': 25596112}]} input_args_next_step : {25596080: ()} output_args : {25596080: [{'Teint_Dans_La_Masse': 25596101, 'flou': 25596102, 'cartonnette': 25596103, 'environnement': 25596104, 'plastique': 25596105, 'papier': 25596106, 'Carton_brun': 25596107, 'kraft': 25596108, 'mal_croppe': 25596109, 'autre_refus': 25596110, 'Carton_gris': 25596111, 'metal': 25596112}]} args : 25596080 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Teint_Dans_La_Masse': 25596101, 'flou': 25596102, 'cartonnette': 25596103, 'environnement': 25596104, 'plastique': 25596105, 'papier': 25596106, 'Carton_brun': 25596107, 'kraft': 25596108, 'mal_croppe': 25596109, 'autre_refus': 25596110, 'Carton_gris': 25596111, 'metal': 25596112},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25596080) 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([25596080]) 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.3057267665863037 time spend to save output : 6.341934204101562e-05 total time spend for step 3 : 0.3057901859283447 step4:send_mail_cod Sat Aug 2 00:34:58 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 : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} input_args_next_step : {1374842022: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842022 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842021 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842019 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842017 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842015 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842005 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842003 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374842000 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841997 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841996 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841995 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841991 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841989 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841987 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841986 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841985 depend.output_id : 0 input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ()} output_args : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',)} args : 1374841984 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 : {25596080: [{'Teint_Dans_La_Masse': 25596101, 'flou': 25596102, 'cartonnette': 25596103, 'environnement': 25596104, 'plastique': 25596105, 'papier': 25596106, 'Carton_brun': 25596107, 'kraft': 25596108, 'mal_croppe': 25596109, 'autre_refus': 25596110, 'Carton_gris': 25596111, 'metal': 25596112}]} input_args_next_step : {1374842022: ('0.021069108073365133',), 1374842021: ('0.021069108073365133',), 1374842019: ('0.021069108073365133',), 1374842017: ('0.021069108073365133',), 1374842015: ('0.021069108073365133',), 1374842005: ('0.021069108073365133',), 1374842003: ('0.021069108073365133',), 1374842000: ('0.021069108073365133',), 1374841997: ('0.021069108073365133',), 1374841996: ('0.021069108073365133',), 1374841995: ('0.021069108073365133',), 1374841991: ('0.021069108073365133',), 1374841989: ('0.021069108073365133',), 1374841987: ('0.021069108073365133',), 1374841986: ('0.021069108073365133',), 1374841985: ('0.021069108073365133',), 1374841984: ('0.021069108073365133',), 25596080: ()} output_args : {25596080: [{'Teint_Dans_La_Masse': 25596101, 'flou': 25596102, 'cartonnette': 25596103, 'environnement': 25596104, 'plastique': 25596105, 'papier': 25596106, 'Carton_brun': 25596107, 'kraft': 25596108, 'mal_croppe': 25596109, 'autre_refus': 25596110, 'Carton_gris': 25596111, 'metal': 25596112}]} args : 25596080 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 :18, first value : ('0.021069108073365133',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25596080) 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 (1374842022,1374842021,1374842019,1374842017,1374842015,1374842005,1374842003,1374842000,1374841997,1374841996,1374841995,1374841991,1374841989,1374841987,1374841986,1374841985,1374841984) Found this number of photos: 17 ##### Call download_photos : nb_thread : 5 begin to download photo : 1374841984 begin to download photo : 1374841989 begin to download photo : 1374841997 begin to download photo : 1374842015 begin to download photo : 1374842022 download finish for photo 1374842015 begin to download photo : 1374842017 download finish for photo 1374842022 download finish for photo 1374841989 begin to download photo : 1374841991 download finish for photo 1374841984 begin to download photo : 1374841985 download finish for photo 1374841997 begin to download photo : 1374842000 download finish for photo 1374842017 begin to download photo : 1374842019 download finish for photo 1374841985 begin to download photo : 1374841986 download finish for photo 1374841991 begin to download photo : 1374841995 download finish for photo 1374842000 begin to download photo : 1374842003 download finish for photo 1374842019 begin to download photo : 1374842021 download finish for photo 1374841986 begin to download photo : 1374841987 download finish for photo 1374841995 begin to download photo : 1374841996 download finish for photo 1374842003 begin to download photo : 1374842005 download finish for photo 1374842021 download finish for photo 1374841996 download finish for photo 1374841987 download finish for photo 1374842005 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette255961021754087699/ imagette255961031754087699/ length of list_filenames : 17 ; length of list_pids : 17 ; length of list_args : 17 results_Auto_P25596080_02-08-2025_00_34_59.pdf 25596102 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=25596102 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961021754087699 25596103 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=25596103 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961031754087699 25596105 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=25596105 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1374842012: '1754087606_538094_1374841952_9b4a35b2642b7d41cd276415254deee7_rle_crop_3900955557_0.png'} change filename to text .imagette255961051754087699/ imagette255961051754087699/1754087606_538094_1374841952_9b4a35b2642b7d41cd276415254deee7_rle_crop_3900955557_0.png.png imagette255961081754087699/ imagette255961091754087699/ imagette255961101754087699/ imagette255961121754087699/ imagette255961011754087699/ imagette255961071754087699/ imagette255961111754087699/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/ac391a677f21254c30d0706d3c1ee203_30364312.png imagette255961051754087699 25596108 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=25596108 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961081754087699 25596109 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=25596109 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961091754087699 25596110 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=25596110 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961101754087699 25596112 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=25596112 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961121754087699 25596101 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=25596101 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961011754087699 25596107 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=25596107 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961071754087699 25596111 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=25596111 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette255961111754087699 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25596080 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25596113,25596114,25596115,25596116,25596117,25596118,25596119,25596120,25596121,25596122,25596123,25596124?tags=Teint_Dans_La_Masse,flou,cartonnette,environnement,plastique,papier,Carton_brun,kraft,mal_croppe,autre_refus,Carton_gris,metal your option no_mail is active, we will not send the real mail to your client args[1374842022] : ('0.021069108073365133',) no score found for photo 1374842022 We are sending mail with results at report@fotonower.com args[1374842021] : ('0.021069108073365133',) no score found for photo 1374842021 We are sending mail with results at report@fotonower.com args[1374842019] : ('0.021069108073365133',) no score found for photo 1374842019 We are sending mail with results at report@fotonower.com args[1374842017] : ('0.021069108073365133',) no score found for photo 1374842017 We are sending mail with results at report@fotonower.com args[1374842015] : ('0.021069108073365133',) no score found for photo 1374842015 We are sending mail with results at report@fotonower.com args[1374842005] : ('0.021069108073365133',) no score found for photo 1374842005 We are sending mail with results at report@fotonower.com args[1374842003] : ('0.021069108073365133',) no score found for photo 1374842003 We are sending mail with results at report@fotonower.com args[1374842000] : ('0.021069108073365133',) no score found for photo 1374842000 We are sending mail with results at report@fotonower.com args[1374841997] : ('0.021069108073365133',) no score found for photo 1374841997 We are sending mail with results at report@fotonower.com args[1374841996] : ('0.021069108073365133',) no score found for photo 1374841996 We are sending mail with results at report@fotonower.com args[1374841995] : ('0.021069108073365133',) no score found for photo 1374841995 We are sending mail with results at report@fotonower.com args[1374841991] : ('0.021069108073365133',) no score found for photo 1374841991 We are sending mail with results at report@fotonower.com args[1374841989] : ('0.021069108073365133',) no score found for photo 1374841989 We are sending mail with results at report@fotonower.com args[1374841987] : ('0.021069108073365133',) no score found for photo 1374841987 We are sending mail with results at report@fotonower.com args[1374841986] : ('0.021069108073365133',) no score found for photo 1374841986 We are sending mail with results at report@fotonower.com args[1374841985] : ('0.021069108073365133',) no score found for photo 1374841985 We are sending mail with results at report@fotonower.com args[1374841984] : ('0.021069108073365133',) no score found for photo 1374841984 We are sending mail with results at report@fotonower.com refus_total : 0.021069108073365133 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=25596080 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_P25596080_02-08-2025_00_34_59.pdf results_Auto_P25596080_02-08-2025_00_34_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596080_02-08-2025_00_34_59.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','25596080','results_Auto_P25596080_02-08-2025_00_34_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596080_02-08-2025_00_34_59.pdf','pdf','','0.15','0.021069108073365133') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25596080]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] map_info['map_portfolio_photo'] : {25596080: [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984, 1374841953, 1374841952]} final : False mtd_id 4302 list_pids : [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] 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, '3424708') ('4302', '25596080', '1374842022', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842021', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842019', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842017', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842015', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842005', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842003', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842000', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841997', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841996', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841995', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841991', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841989', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841987', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841986', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841985', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841984', None, None, None, None, None, '3424708') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 17 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', '25596080', '1374842022', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842021', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842019', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842017', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842015', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842005', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842003', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842000', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841997', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841996', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841995', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841991', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841989', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841987', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841986', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841985', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841984', None, None, None, None, None, '3424708')] time used for this insertion : 0.015800952911376953 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.8321568965911865 time spend to save output : 0.016057729721069336 total time spend for step 4 : 1.8482146263122559 step5:split_time_score Sat Aug 2 00:35: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 : ['25596080'] 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 : [('25596080',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25596080) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1374842022: {'path': 'temp/1754087698_2236352_1374842022_c1ab22fe176f57be044b46606505d81a.jpg', 'extension': 'jpg'}, 1374842015: {'path': 'temp/1754087698_2236352_1374842015_9e48e4d92dd21d3d1647478f8e3daa43.jpg', 'extension': 'jpg'}, 1374842017: {'path': 'temp/1754087698_2236352_1374842017_32fe5172454b8dca07bc5827c9b1bb3c.jpg', 'extension': 'jpg'}, 1374842019: {'path': 'temp/1754087698_2236352_1374842019_8cd2a13f78e9794297cf4a067e87c0c7.jpg', 'extension': 'jpg'}, 1374842021: {'path': 'temp/1754087698_2236352_1374842021_e76878868afa2663f525053821e794e0.jpg', 'extension': 'jpg'}, 1374841989: {'path': 'temp/1754087698_2236352_1374841989_f2be3c2dc2b393fc4155300b09d26dfd.jpg', 'extension': 'jpg'}, 1374841991: {'path': 'temp/1754087698_2236352_1374841991_2617227361322240b0a7fafb27a681c3.jpg', 'extension': 'jpg'}, 1374841995: {'path': 'temp/1754087698_2236352_1374841995_0b7d562f90c197e19be2a9efe20f3bf0.jpg', 'extension': 'jpg'}, 1374841996: {'path': 'temp/1754087698_2236352_1374841996_fc22a01464860e7cbad35cea360baf05.jpg', 'extension': 'jpg'}, 1374841984: {'path': 'temp/1754087698_2236352_1374841984_f658560e788d5615fc9bcd232b2d352f.jpg', 'extension': 'jpg'}, 1374841985: {'path': 'temp/1754087698_2236352_1374841985_3f917d536df6f21015403a3528b0bc71.jpg', 'extension': 'jpg'}, 1374841986: {'path': 'temp/1754087698_2236352_1374841986_5d15c7bf9add3ab946a30b93c6613f0e.jpg', 'extension': 'jpg'}, 1374841987: {'path': 'temp/1754087698_2236352_1374841987_f25ab5fa9fa782150996f3349c0c9dc5.jpg', 'extension': 'jpg'}, 1374841997: {'path': 'temp/1754087698_2236352_1374841997_db02a83be8f8bec2a749f7e3b53dc98c.jpg', 'extension': 'jpg'}, 1374842000: {'path': 'temp/1754087698_2236352_1374842000_4238bd46d523318ea6e28a8c2343b2f2.jpg', 'extension': 'jpg'}, 1374842003: {'path': 'temp/1754087698_2236352_1374842003_e90452aaba95081102a4f3508a59344e.jpg', 'extension': 'jpg'}, 1374842005: {'path': 'temp/1754087698_2236352_1374842005_d09797ccbce30b1673f18a57b795eef6.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 = 25596080; (('arc_en_ciel_jrm_live',),) 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 = 25596080 group by h (('00', 19),) 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=25596080 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 (25596080) 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 (25596080) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02082025 25596080 Nombre de photos uploadées : 19 / 23040 (0%) 02082025 25596080 Nombre de photos taguées (types de déchets): 0 / 19 (0%) 02082025 25596080 Nombre de photos taguées (volume) : 0 / 19 (0%) [{'photo_id': 1374841953, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/b5f6e09c0fc239d8e8a2d50be2326118.jpg', 'username': None, 'uploaded_at': 1754087468, 'text': 'image_02082025_00_30_03_010143m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1374841952, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/9b4a35b2642b7d41cd276415254deee7.jpg', 'username': None, 'uploaded_at': 1754087468, 'text': 'image_02082025_00_30_44_010136m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1374842022, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/c1ab22fe176f57be044b46606505d81a.jpg', 'username': None, 'uploaded_at': 1754087632, 'text': 'image_02082025_00_30_54_10141.jpg'}, {'photo_id': 1374841991, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/2/2617227361322240b0a7fafb27a681c3.jpg', 'username': None, 'uploaded_at': 1754087528, 'text': 'image_02082025_00_30_54_10141.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ??????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.000946044921875 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 25596080, '2025-08-02' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-08-02' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2049513,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2118213176727295 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= 2049513 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2049513, 'dashboard_run_id': 2057069, 'mtr_portfolio_id': 25595390, 'dashboard_result_id': 13492181, '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_P25595390_02-08-2025_00_16_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595399, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595401, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595405, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595407, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595409, 'pht': 3726}}"}, {'dashboat_entry_day': 2049513, 'dashboard_run_id': 2057069, 'mtr_portfolio_id': 25595654, 'dashboard_result_id': 13492182, '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_P25595654_02-08-2025_00_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595660, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595663, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595666, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595670, 'pht': 3726}}"}, {'dashboat_entry_day': 2049513, 'dashboard_run_id': 2057069, 'mtr_portfolio_id': 25596080, 'dashboard_result_id': 13492183, '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_P25596080_02-08-2025_00_33_31.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596101, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596103, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596106, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596108, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596110, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596112, '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 = 25595390 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': 3424620, 'mtr_portfolio_id': 25595390, 'created_at': datetime.datetime(2025, 8, 2, 0, 16, 57), 'result': '0.06380500763912292', 'result_long': None, 'result_double': None}] Qualite : 0.06380500763912292 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25595390 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595390_02-08-2025_00_16_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25595390 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_P25595390_02-08-2025_00_16_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595399, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595401, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595405, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595407, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595409, 'pht': 3726}}" where mtr_portfolio_id = 25595390 and dashboard_run_id = 2057069 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`=25595390 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13492181, 0.06380500763912292, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595390_02-08-2025_00_16_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595398, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595399, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595400, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595401, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595402, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595403, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595404, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595405, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595406, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595407, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595408, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595409, '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 = 25595654 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': 3424660, 'mtr_portfolio_id': 25595654, 'created_at': datetime.datetime(2025, 8, 2, 0, 32, 59), 'result': '0.052064631463634055', 'result_long': None, 'result_double': None}] Qualite : 0.052064631463634055 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25595654 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595654_02-08-2025_00_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25595654 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_P25595654_02-08-2025_00_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595660, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595663, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595666, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595670, 'pht': 3726}}" where mtr_portfolio_id = 25595654 and dashboard_run_id = 2057069 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`=25595654 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13492182, 0.052064631463634055, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25595654_02-08-2025_00_33_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25595659, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25595660, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25595661, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25595662, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25595663, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25595664, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25595665, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25595666, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25595667, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25595668, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25595669, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25595670, '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 = 25596080 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': 3424708, 'mtr_portfolio_id': 25596080, 'created_at': datetime.datetime(2025, 8, 2, 0, 34, 58), 'result': '0.021069108073365133', 'result_long': None, 'result_double': None}] Qualite : 0.021069108073365133 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25596080 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596080_02-08-2025_00_34_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25596080 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_P25596080_02-08-2025_00_34_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596101, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596103, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596106, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596108, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596110, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596112, 'pht': 3726}}" where mtr_portfolio_id = 25596080 and dashboard_run_id = 2057069 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`=25596080 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13492183, 0.021069108073365133, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25596080_02-08-2025_00_34_59.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25596101, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25596102, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25596103, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25596104, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25596105, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25596106, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25596107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25596108, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25596109, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25596110, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25596111, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25596112, '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 (25595390,25595654,25596080) result : ((1374836743,), (1374836744,), (1374836745,), (1374836750,), (1374836751,), (1374836752,), (1374836754,), (1374836756,), (1374836764,), (1374836765,), (1374836766,), (1374836767,), (1374836774,), (1374836775,), (1374836776,), (1374836777,), (1374836778,), (1374836781,), (1374836782,), (1374836783,), (1374836784,), (1374836786,), (1374836787,), (1374836795,), (1374836796,), (1374836798,), (1374836812,), (1374836813,), (1374836814,), (1374836816,), (1374836817,), (1374836820,), (1374836832,), (1374836833,), (1374836834,), (1374836835,), (1374836855,), (1374836906,), (1374836907,), (1374836908,), (1374836909,), (1374837060,), (1374837061,), (1374837075,), (1374837099,), (1374837110,), (1374837114,), (1374837159,), (1374837160,), (1374837164,), (1374837184,), (1374837209,), (1374837234,), (1374837303,), (1374837304,), (1374837305,), (1374837307,), (1374837318,), (1374837319,), (1374837320,), (1374837322,), (1374837324,), (1374837334,), (1374837335,), (1374837336,), (1374837337,), (1374837338,), (1374837340,), (1374837348,), (1374837350,), (1374837351,), (1374837352,), (1374837370,), (1374837368,), (1374837369,), (1374837388,), (1374837389,), (1374837390,), (1374837391,), (1374837394,), (1374837414,), (1374837416,), (1374837441,), (1374837463,), (1374837484,), (1374837751,), (1374837778,), (1374837802,), (1374837827,), (1374838017,), (1374838019,), (1374838020,), (1374838028,), (1374838034,), (1374838035,), (1374838036,), (1374838037,), (1374838040,), (1374838041,), (1374838042,), (1374838044,), (1374838248,), (1374838277,), (1374838300,), (1374838323,), (1374838971,), (1374839003,), (1374839030,), (1374839053,), (1374839099,), (1374839206,), (1374839247,), (1374839280,), (1374839302,), (1374839327,), (1374839502,), (1374839537,), (1374839588,), (1374839629,), (1374840397,), (1374840475,), (1374840536,), (1374840588,), (1374840631,), (1374840681,), (1374841103,), (1374841125,), (1374841148,), (1374841170,), (1374841183,), (1374841284,), (1374841327,), (1374841373,), (1374841418,), (1374841806,), (1374841807,), (1374841839,), (1374841889,), (1374841901,), (1374841907,), (1374841920,), (1374841922,), (1374841923,), (1374841924,), (1374841928,), (1374841929,), (1374841954,), (1374841952,), (1374841953,), (1374841984,), (1374841985,), (1374841986,), (1374841987,), (1374841989,), (1374841991,), (1374841995,), (1374841996,), (1374841997,), (1374842000,), (1374842003,), (1374842005,), (1374842015,), (1374842017,), (1374842019,), (1374842021,), (1374842022,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02082025': {'nb_upload': 19, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25596080]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] map_info['map_portfolio_photo'] : {25596080: [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984, 1374841953, 1374841952]} final : True mtd_id 4302 list_pids : [1374842022, 1374842021, 1374842019, 1374842017, 1374842015, 1374842005, 1374842003, 1374842000, 1374841997, 1374841996, 1374841995, 1374841991, 1374841989, 1374841987, 1374841986, 1374841985, 1374841984] Looping around the photos to save general results len do output : 1 /25596080Didn'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, '3424708') ('4302', '25596080', '1374842022', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842021', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842019', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842017', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842015', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842005', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842003', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374842000', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841997', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841996', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841995', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841991', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841989', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841987', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841986', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841985', None, None, None, None, None, '3424708') ('4302', None, None, None, None, None, None, None, '3424708') ('4302', '25596080', '1374841984', None, None, None, None, None, '3424708') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 18 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, '25596080', 'None', None, None, None, None, '3424708'), ('4302', '25596080', '1374842022', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842021', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842019', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842017', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842015', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842005', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842003', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374842000', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841997', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841996', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841995', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841991', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841989', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841987', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841986', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841985', None, None, None, None, None, '3424708'), ('4302', '25596080', '1374841984', None, None, None, None, None, '3424708')] time used for this insertion : 0.016398906707763672 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4562969207763672 time spend to save output : 0.01665639877319336 total time spend for step 5 : 0.47295331954956055 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 (3424708) 2.06user 2.59system 0:05.11elapsed 91%CPU (0avgtext+0avgdata 162160maxresident)k 240inputs+10752outputs (4major+64295minor)pagefaults 0swaps