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 : 3007221 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 (2727572) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2727572) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088566 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2727572'] with mtr_portfolio_ids : ['22088566'] and first list_photo_ids : [] new path : /proc/3007221/ Name: python3 Umask: 0002 State: R (running) Tgid: 3007221 Ngid: 0 Pid: 3007221 PPid: 3007220 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3007221 NSpid: 3007221 NSpgid: 3004633 NSsid: 3004633 VmPeak: 1106932 kB VmSize: 1106932 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98176 kB VmRSS: 98176 kB RssAnon: 59796 kB RssFile: 38380 kB RssShmem: 0 kB VmData: 865680 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 620 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 48 nonvoluntary_ctxt_switches: 108 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3007221', 'Ngid': '0', 'Pid': '3007221', 'PPid': '3007220', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3007221', 'NSpid': '3007221', 'NSpgid': '3004633', 'NSsid': '3004633', 'VmPeak': '1106932 kB', 'VmSize': '1106932 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98176 kB', 'VmRSS': '98176 kB', 'RssAnon': '59796 kB', 'RssFile': '38380 kB', 'RssShmem': '0 kB', 'VmData': '865680 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '620 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '48', 'nonvoluntary_ctxt_switches': '108'} ('datou_batch_current', '3007221', '1106932', '0', '1106932', '865680', '98176', b'', 'marlene', '2727572') 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 (22088566) 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 (2727572 ) ) 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 (22088566) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350238836, 'portfolio_id': 22088566}, {'photo_id': 1350238833, 'portfolio_id': 22088566}, {'photo_id': 1350238828, 'portfolio_id': 22088566}, {'photo_id': 1350238826, 'portfolio_id': 22088566}, {'photo_id': 1350238795, 'portfolio_id': 22088566}, {'photo_id': 1350238792, 'portfolio_id': 22088566}, {'photo_id': 1350238784, 'portfolio_id': 22088566}, {'photo_id': 1350238749, 'portfolio_id': 22088566}, {'photo_id': 1350238747, 'portfolio_id': 22088566}, {'photo_id': 1350238745, 'portfolio_id': 22088566}, {'photo_id': 1350238742, 'portfolio_id': 22088566}, {'photo_id': 1350238718, 'portfolio_id': 22088566}, {'photo_id': 1350238715, 'portfolio_id': 22088566}, {'photo_id': 1350238713, 'portfolio_id': 22088566}, {'photo_id': 1350238710, 'portfolio_id': 22088566}, {'photo_id': 1350238708, 'portfolio_id': 22088566}, {'photo_id': 1350238588, 'portfolio_id': 22088566}, {'photo_id': 1350238585, 'portfolio_id': 22088566}, {'photo_id': 1350238582, 'portfolio_id': 22088566}, {'photo_id': 1350238489, 'portfolio_id': 22088566}, {'photo_id': 1350238486, 'portfolio_id': 22088566}, {'photo_id': 1350238482, 'portfolio_id': 22088566}, {'photo_id': 1350238422, 'portfolio_id': 22088566}, {'photo_id': 1350238354, 'portfolio_id': 22088566}, {'photo_id': 1350238351, 'portfolio_id': 22088566}, {'photo_id': 1350238348, 'portfolio_id': 22088566}, {'photo_id': 1350238308, 'portfolio_id': 22088566}, {'photo_id': 1350238305, 'portfolio_id': 22088566}, {'photo_id': 1350238281, 'portfolio_id': 22088566}, {'photo_id': 1350238280, 'portfolio_id': 22088566}, {'photo_id': 1350238279, 'portfolio_id': 22088566}, {'photo_id': 1350238278, 'portfolio_id': 22088566}, {'photo_id': 1350238207, 'portfolio_id': 22088566}, {'photo_id': 1350238205, 'portfolio_id': 22088566}, {'photo_id': 1350238204, 'portfolio_id': 22088566}, {'photo_id': 1350238200, 'portfolio_id': 22088566}, {'photo_id': 1350238159, 'portfolio_id': 22088566}, {'photo_id': 1350238157, 'portfolio_id': 22088566}] map_portfolio_id_photo_id: {22088566: [1350238836, 1350238833, 1350238828, 1350238826, 1350238795, 1350238792, 1350238784, 1350238749, 1350238747, 1350238745, 1350238742, 1350238718, 1350238715, 1350238713, 1350238710, 1350238708, 1350238588, 1350238585, 1350238582, 1350238489, 1350238486, 1350238482, 1350238422, 1350238354, 1350238351, 1350238348, 1350238308, 1350238305, 1350238281, 1350238280, 1350238279, 1350238278, 1350238207, 1350238205, 1350238204, 1350238200, 1350238159, 1350238157]} ##### 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.015111446380615234 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Apr 7 06:30: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 (22088566) 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 : 22088566 get user id for portfolio 22088566 get sub ptf for main ptf 22088566, type 3726 and hashtags ['Teint_Dans_La_Masse', 'flou', 'environnement', 'Carton_brun', 'metal', 'plastique', 'cartonnette', 'papier', 'kraft', 'autre_refus', 'mal_croppe', 'Carton_gris'] 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`=22088566 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','environnement','Carton_brun','metal','plastique','cartonnette','papier','kraft','autre_refus','mal_croppe','Carton_gris')) 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`=22088566 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','environnement','Carton_brun','metal','plastique','cartonnette','papier','kraft','autre_refus','mal_croppe','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 22088566, 'sub_port_id': 22088569, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573028, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'environnement': {'main_port_id': 22088566, 'sub_port_id': 22088570, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573029, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'plastique': {'main_port_id': 22088566, 'sub_port_id': 22088571, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573030, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'kraft': {'main_port_id': 22088566, 'sub_port_id': 22088572, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573031, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'Carton_gris': {'main_port_id': 22088566, 'sub_port_id': 22088573, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573032, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'metal': {'main_port_id': 22088566, 'sub_port_id': 22088574, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573033, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'autre_refus': {'main_port_id': 22088566, 'sub_port_id': 22088575, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573034, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'cartonnette': {'main_port_id': 22088566, 'sub_port_id': 22088576, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573035, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'mal_croppe': {'main_port_id': 22088566, 'sub_port_id': 22088577, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573036, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'Carton_brun': {'main_port_id': 22088566, 'sub_port_id': 22088578, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573037, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'flou': {'main_port_id': 22088566, 'sub_port_id': 22088579, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573038, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 22088566, 'sub_port_id': 22088580, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573039, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22088569 , 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=22088566 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 (22088569) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088570 , 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=22088566 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 (22088570) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088571 , 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=22088566 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 (22088571) result : ((1350238258,), (1350238259,), (1350238260,), (1350238767,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088572 , 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=22088566 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 (22088572) result : ((1350238340,), (1350238341,), (1350238887,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088573 , 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=22088566 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 (22088573) result : ((1350238254,), (1350238255,), (1350238314,), (1350238315,), (1350238388,), (1350238785,), (1350238786,), (1350238787,), (1350238788,), (1350238789,), (1350238794,), (1350238885,), (1350238906,), (1350238907,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088574 , 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=22088566 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 (22088574) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088575 , 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=22088566 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 (22088575) result : ((1350238334,), (1350238387,), (1350238411,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088576 , 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=22088566 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 (22088576) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088577 , 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=22088566 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 (22088577) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088578 , 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=22088566 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 (22088578) result : ((1350238257,), (1350238316,), (1350238317,), (1350238336,), (1350238337,), (1350238338,), (1350238339,), (1350238418,), (1350238791,), (1350238886,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088579 , 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=22088566 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 (22088579) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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 22088580 , 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=22088566 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 (22088580) result : ((1350238249,), (1350238312,), (1350238313,), (1350238332,), (1350238333,), (1350238783,), (1350238881,), (1350238882,), (1350238883,), (1350238884,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22088566) result : ((1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) 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 (1350238200) 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`=22088566 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','environnement','Carton_brun','metal','plastique','cartonnette','papier','kraft','autre_refus','mal_croppe','Carton_gris')) 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`=22088566 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','flou','environnement','Carton_brun','metal','plastique','cartonnette','papier','kraft','autre_refus','mal_croppe','Carton_gris')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 22088566, 'sub_port_id': 22088581, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573040, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'environnement': {'main_port_id': 22088566, 'sub_port_id': 22088582, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573041, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'plastique': {'main_port_id': 22088566, 'sub_port_id': 22088583, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573042, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'kraft': {'main_port_id': 22088566, 'sub_port_id': 22088584, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573043, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'Carton_gris': {'main_port_id': 22088566, 'sub_port_id': 22088585, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573044, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'metal': {'main_port_id': 22088566, 'sub_port_id': 22088586, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573045, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'autre_refus': {'main_port_id': 22088566, 'sub_port_id': 22088587, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573046, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'cartonnette': {'main_port_id': 22088566, 'sub_port_id': 22088588, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573047, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'mal_croppe': {'main_port_id': 22088566, 'sub_port_id': 22088589, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573048, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'Carton_brun': {'main_port_id': 22088566, 'sub_port_id': 22088590, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573049, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'flou': {'main_port_id': 22088566, 'sub_port_id': 22088591, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573050, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 18, 58), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 22088566, 'sub_port_id': 22088592, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14573051, 'last_updated_at': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 7, 6, 28, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 7, 6, 18, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088581,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088569 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088582,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088570 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088583,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088571 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088584,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088572 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088585,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088573 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088586,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088574 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088587,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088575 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088588,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088576 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088589,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088577 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088590,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088578 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088591,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088579 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22088592,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22088580 lien utilise dans velours : https://www.fotonower.com/velours/22088581,22088582,22088583,22088584,22088585,22088586,22088587,22088588,22088589,22088590,22088591,22088592?tags=papier,environnement,plastique,kraft,Carton_gris,metal,autre_refus,cartonnette,mal_croppe,Carton_brun,flou,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22088566]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350238836, 1350238833, 1350238828, 1350238826] map_info['map_portfolio_photo'] : {22088566: [1350238836, 1350238833, 1350238828, 1350238826, 1350238795, 1350238792, 1350238784, 1350238749, 1350238747, 1350238745, 1350238742, 1350238718, 1350238715, 1350238713, 1350238710, 1350238708, 1350238588, 1350238585, 1350238582, 1350238489, 1350238486, 1350238482, 1350238422, 1350238354, 1350238351, 1350238348, 1350238308, 1350238305, 1350238281, 1350238280, 1350238279, 1350238278, 1350238207, 1350238205, 1350238204, 1350238200, 1350238159, 1350238157]} final : False mtd_id 4302 list_pids : [1350238836, 1350238833, 1350238828, 1350238826] Looping around the photos to save general results len do output : 1 /22088566. 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, '2727572') ('4302', '22088566', '1350238836', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238833', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238828', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238826', None, None, None, None, None, '2727572') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22088566', "{'papier': 22088569, 'environnement': 22088570, 'plastique': 22088571, 'kraft': 22088572, 'Carton_gris': 22088573, 'metal': 22088574, 'autre_refus': 22088575, 'cartonnette': 22088576, 'mal_croppe': 22088577, 'Carton_brun': 22088578, 'flou': 22088579, 'Teint_Dans_La_Masse': 22088580}", None, None, None, None, '2727572'), ('4302', '22088566', '1350238836', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238833', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238828', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238826', None, None, None, None, None, '2727572')] time used for this insertion : 0.020238161087036133 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.49938106536865234 time spend to save output : 0.02051544189453125 total time spend for step 1 : 0.5198965072631836 step2:final Mon Apr 7 06:30: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 (22088566) 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 22088566 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350238159,1350238157,1350238207,1350238205,1350238204,1350238200,1350238281,1350238280,1350238279,1350238278,1350238308,1350238305,1350238354,1350238351,1350238348,1350238489,1350238422,1350238486,1350238482,1350238588,1350238585,1350238582,1350238718,1350238715,1350238713,1350238710,1350238708,1350238749,1350238747,1350238745,1350238742,1350238795,1350238792,1350238784,1350238836,1350238833,1350238828,1350238826); 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([22088566]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',)} new output for save of step final : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',)} [1350238836, 1350238833, 1350238828, 1350238826] map_info['map_portfolio_photo'] : {22088566: [1350238836, 1350238833, 1350238828, 1350238826, 1350238795, 1350238792, 1350238784, 1350238749, 1350238747, 1350238745, 1350238742, 1350238718, 1350238715, 1350238713, 1350238710, 1350238708, 1350238588, 1350238585, 1350238582, 1350238489, 1350238486, 1350238482, 1350238422, 1350238354, 1350238351, 1350238348, 1350238308, 1350238305, 1350238281, 1350238280, 1350238279, 1350238278, 1350238207, 1350238205, 1350238204, 1350238200, 1350238159, 1350238157]} final : False mtd_id 4302 list_pids : [1350238836, 1350238833, 1350238828, 1350238826] Looping around the photos to save general results len do output : 4 /1350238836.Didn't retrieve data . /1350238833.Didn't retrieve data . /1350238828.Didn't retrieve data . /1350238826.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, '2727572') ('4302', '22088566', '1350238836', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238833', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238828', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238826', None, None, None, None, None, '2727572') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22088566', '1350238836', '0.06100071537749247', None, None, None, None, '2727572'), ('4302', '22088566', '1350238833', '0.06100071537749247', None, None, None, None, '2727572'), ('4302', '22088566', '1350238828', '0.06100071537749247', None, None, None, None, '2727572'), ('4302', '22088566', '1350238826', '0.06100071537749247', None, None, None, None, '2727572')] time used for this insertion : 0.01083517074584961 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07388138771057129 time spend to save output : 0.01108241081237793 total time spend for step 2 : 0.08496379852294922 step3:velours_tree Mon Apr 7 06:30: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 : {22088566: [{'papier': 22088569, 'environnement': 22088570, 'plastique': 22088571, 'kraft': 22088572, 'Carton_gris': 22088573, 'metal': 22088574, 'autre_refus': 22088575, 'cartonnette': 22088576, 'mal_croppe': 22088577, 'Carton_brun': 22088578, 'flou': 22088579, 'Teint_Dans_La_Masse': 22088580}]} input_args_next_step : {22088566: ()} output_args : {22088566: [{'papier': 22088569, 'environnement': 22088570, 'plastique': 22088571, 'kraft': 22088572, 'Carton_gris': 22088573, 'metal': 22088574, 'autre_refus': 22088575, 'cartonnette': 22088576, 'mal_croppe': 22088577, 'Carton_brun': 22088578, 'flou': 22088579, 'Teint_Dans_La_Masse': 22088580}]} args : 22088566 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 : ({'papier': 22088569, 'environnement': 22088570, 'plastique': 22088571, 'kraft': 22088572, 'Carton_gris': 22088573, 'metal': 22088574, 'autre_refus': 22088575, 'cartonnette': 22088576, 'mal_croppe': 22088577, 'Carton_brun': 22088578, 'flou': 22088579, 'Teint_Dans_La_Masse': 22088580},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22088566) 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([22088566]) 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.35442686080932617 time spend to save output : 5.1021575927734375e-05 total time spend for step 3 : 0.3544778823852539 step4:send_mail_cod Mon Apr 7 06:30: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 : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',)} input_args_next_step : {1350238836: ()} output_args : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',)} args : 1350238836 depend.output_id : 0 input_args_next_step : {1350238836: ('0.06100071537749247',), 1350238833: ()} output_args : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',)} args : 1350238833 depend.output_id : 0 input_args_next_step : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ()} output_args : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',)} args : 1350238828 depend.output_id : 0 input_args_next_step : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ()} output_args : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',)} args : 1350238826 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 : {22088566: [{'papier': 22088569, 'environnement': 22088570, 'plastique': 22088571, 'kraft': 22088572, 'Carton_gris': 22088573, 'metal': 22088574, 'autre_refus': 22088575, 'cartonnette': 22088576, 'mal_croppe': 22088577, 'Carton_brun': 22088578, 'flou': 22088579, 'Teint_Dans_La_Masse': 22088580}]} input_args_next_step : {1350238836: ('0.06100071537749247',), 1350238833: ('0.06100071537749247',), 1350238828: ('0.06100071537749247',), 1350238826: ('0.06100071537749247',), 22088566: ()} output_args : {22088566: [{'papier': 22088569, 'environnement': 22088570, 'plastique': 22088571, 'kraft': 22088572, 'Carton_gris': 22088573, 'metal': 22088574, 'autre_refus': 22088575, 'cartonnette': 22088576, 'mal_croppe': 22088577, 'Carton_brun': 22088578, 'flou': 22088579, 'Teint_Dans_La_Masse': 22088580}]} args : 22088566 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 :5, first value : ('0.06100071537749247',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22088566) 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 (1350238836,1350238833,1350238828,1350238826) Found this number of photos: 4 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350238826 begin to download photo : 1350238828 begin to download photo : 1350238833 begin to download photo : 1350238836 download finish for photo 1350238836 download finish for photo 1350238833 download finish for photo 1350238826 download finish for photo 1350238828 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 4 ; length of list_pids : 4 ; length of list_args : 4 results_Auto_P22088566_07-04-2025_06_30_58.pdf 22088571 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=22088571 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350238258: '1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551152_0.png', 1350238259: '1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551144_0.png', 1350238260: '1743999423_626514_1350238157_74b0603ca863ed57abfce86d376dbe36_rle_crop_3748551250_0.png', 1350238767: '1744000031_634103_1350238713_af6eafa81d4db0ad9781a4a8e3b11300_rle_crop_3748555558_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/6dd49f136e4f4c041635f6ea59a6ed0b_92512682.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/6a62d60520eb5aab49bf475f703c76dd_46053029.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/60482955a3c62ffd47647108206315cf_56685351.png change filename to text .imagette220885711744000258/ imagette220885711744000258/1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551152_0.png.png imagette220885711744000258/1743999423_626514_1350238157_74b0603ca863ed57abfce86d376dbe36_rle_crop_3748551250_0.png.png imagette220885711744000258/1744000031_634103_1350238713_af6eafa81d4db0ad9781a4a8e3b11300_rle_crop_3748555558_0.png.png imagette220885711744000258/1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551144_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/839c52ac7beb2deb333d6af3810baca8_56355180.png imagette220885711744000258 22088572 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=22088572 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350238340: '1743999552_629783_1350238281_f184c22e7bcd9e1e1a9431573506267a_rle_crop_3748554185_0.png', 1350238341: '1743999552_629783_1350238205_d5f74c41b59774aa002cdbe19ebe764e_rle_crop_3748554201_0.png', 1350238887: '1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556430_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/b84492ad3a3b2ad24a790b400a82f3cd_17536025.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/d55eaf79c9e199a3aad64fe98540bae6_60298007.png change filename to text .imagette220885721744000258/ imagette220885721744000258/1743999552_629783_1350238205_d5f74c41b59774aa002cdbe19ebe764e_rle_crop_3748554201_0.png.png imagette220885721744000258/1743999552_629783_1350238281_f184c22e7bcd9e1e1a9431573506267a_rle_crop_3748554185_0.png.png imagette220885721744000258/1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556430_0.png.png imagette220885741744000259/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/84db7f948a3dd3cdfb06e1b3ace89d07_99538851.png imagette220885721744000258 22088574 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=22088574 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220885741744000259 22088575 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=22088575 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350238334: '1743999552_629783_1350238204_e3c978ff3140a63ca1aed518ff860940_rle_crop_3748554210_0.png', 1350238387: '1743999652_630819_1350238351_ee4490fc4907bcc4e16c8cdb31d596f8_rle_crop_3748554533_0.png', 1350238411: '1743999671_631086_1350238305_613bc6aef68d3b4b3ae1900a990e571a_rle_crop_3748554647_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/96dfbf57f5e913b58110a229e8c33ed9_80571157.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/431b1d58ab8c7ed7f25422927752f7fd_10523910.png change filename to text .imagette220885751744000259/ imagette220885751744000259/1743999671_631086_1350238305_613bc6aef68d3b4b3ae1900a990e571a_rle_crop_3748554647_0.png.png imagette220885751744000259/1743999552_629783_1350238204_e3c978ff3140a63ca1aed518ff860940_rle_crop_3748554210_0.png.png imagette220885751744000259/1743999652_630819_1350238351_ee4490fc4907bcc4e16c8cdb31d596f8_rle_crop_3748554533_0.png.png imagette220885761744000259/ imagette220885771744000259/ imagette220885791744000259/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/b908cce31067b208f41282487af7b86c_93999541.png imagette220885751744000259 22088576 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=22088576 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220885761744000259 22088577 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=22088577 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220885771744000259 22088579 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=22088579 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette220885791744000259 22088573 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=22088573 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350238254: '1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551143_0.png', 1350238255: '1743999423_626514_1350238157_74b0603ca863ed57abfce86d376dbe36_rle_crop_3748551254_0.png', 1350238314: '1743999533_629333_1350238279_ab4756937fdf12d8104647a9b82f438e_rle_crop_3748554017_0.png', 1350238315: '1743999533_629333_1350238279_ab4756937fdf12d8104647a9b82f438e_rle_crop_3748554013_0.png', 1350238388: '1743999652_630819_1350238351_ee4490fc4907bcc4e16c8cdb31d596f8_rle_crop_3748554532_0.png', 1350238785: '1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556004_0.png', 1350238786: '1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556002_0.png', 1350238787: '1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556001_0.png', 1350238788: '1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556000_0.png', 1350238789: '1744000052_634338_1350238582_c024555e0f0cb7f351a9f1490f9e3f04_rle_crop_3748556028_0.png', 1350238794: '1744000072_634584_1350238588_eef489db38dd1fbe96da6dab09789792_rle_crop_3748556111_0.png', 1350238885: '1744000170_635655_1350238745_d284398e9f87d621211c383be1569c31_rle_crop_3748556423_0.png', 1350238906: '1744000191_635904_1350238749_c2647cd2002b4a826752e9f4cf0cd914_rle_crop_3748556474_0.png', 1350238907: '1744000191_635904_1350238749_c2647cd2002b4a826752e9f4cf0cd914_rle_crop_3748556477_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/1c6d4e281bad255df52d7fc679c5165c_6535598.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/b3cd79b9813fafa7af5a4608e831609c_22563328.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/072a48b7ba9ecb4fde9f48c13c87bb68_43311542.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/208b7b5e4041782eed44b4759f18ae71_42030896.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/d6e0a34f46912aeb7555f1ad60d27257_52891440.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/fada063e9c24be926ec6fd38fca1aff8_64881048.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/d681c6b745352dd6bc871947e797ccce_68368262.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/5cfa4bc8f9766b25b3d3917303e5e4e4_10593560.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/4eda72be52dce28e44fcc2551be1acf9_94602556.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/647fc37f59d77392935cc591259b8902_761283.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/9395d13c13ccbbca22233810c6b79b7a_9741919.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/14057b26a49b3c38d723a64c60901837_47126665.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/6ef2f36ba56d5401762404ad2185e5e8_23533566.png change filename to text .imagette220885731744000259/ imagette220885731744000259/1743999533_629333_1350238279_ab4756937fdf12d8104647a9b82f438e_rle_crop_3748554017_0.png.png imagette220885731744000259/1743999652_630819_1350238351_ee4490fc4907bcc4e16c8cdb31d596f8_rle_crop_3748554532_0.png.png imagette220885731744000259/1743999423_626514_1350238157_74b0603ca863ed57abfce86d376dbe36_rle_crop_3748551254_0.png.png imagette220885731744000259/1744000072_634584_1350238588_eef489db38dd1fbe96da6dab09789792_rle_crop_3748556111_0.png.png imagette220885731744000259/1744000052_634338_1350238582_c024555e0f0cb7f351a9f1490f9e3f04_rle_crop_3748556028_0.png.png imagette220885731744000259/1744000191_635904_1350238749_c2647cd2002b4a826752e9f4cf0cd914_rle_crop_3748556477_0.png.png imagette220885731744000259/1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556000_0.png.png imagette220885731744000259/1744000191_635904_1350238749_c2647cd2002b4a826752e9f4cf0cd914_rle_crop_3748556474_0.png.png imagette220885731744000259/1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556002_0.png.png imagette220885731744000259/1744000170_635655_1350238745_d284398e9f87d621211c383be1569c31_rle_crop_3748556423_0.png.png imagette220885731744000259/1743999533_629333_1350238279_ab4756937fdf12d8104647a9b82f438e_rle_crop_3748554013_0.png.png imagette220885731744000259/1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556001_0.png.png imagette220885731744000259/1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551143_0.png.png imagette220885731744000259/1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556004_0.png.png wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/84f8cdf84cf47dd8509db2302355fd08_47986600.png imagette220885731744000259 22088578 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=22088578 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350238257: '1743999423_626514_1350238157_74b0603ca863ed57abfce86d376dbe36_rle_crop_3748551263_0.png', 1350238316: '1743999533_629333_1350238280_785ecef9b53c5668e701e0f6c9a51099_rle_crop_3748554011_0.png', 1350238317: '1743999533_629333_1350238278_4c3f819829302860fbd1383792c41230_rle_crop_3748554031_0.png', 1350238336: '1743999552_629783_1350238281_f184c22e7bcd9e1e1a9431573506267a_rle_crop_3748554181_0.png', 1350238337: '1743999552_629783_1350238205_d5f74c41b59774aa002cdbe19ebe764e_rle_crop_3748554198_0.png', 1350238338: '1743999552_629783_1350238205_d5f74c41b59774aa002cdbe19ebe764e_rle_crop_3748554203_0.png', 1350238339: '1743999552_629783_1350238200_85c132c18d27c734f8bf15d65e2f1c50_rle_crop_3748554234_0.png', 1350238418: '1743999691_631389_1350238308_f1a9d84d74a8efa6a92f087ad6dafb2f_rle_crop_3748554676_0.png', 1350238791: '1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556007_0.png', 1350238886: '1744000170_635655_1350238745_d284398e9f87d621211c383be1569c31_rle_crop_3748556426_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/a36b37aaa64fc916a40f5b85f244186e_80368532.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/a4300dd303d06e54a72e54bd69c0dcae_89069319.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/516997029bfcf5629b70ed22c8760130_48294311.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/c44d426bd6dd390e92be277e3f7fe081_19483661.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/341d409a12a344eafdd0c033949e9835_37499400.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/d60646f61c24b1c6e3f8675c8305bf50_12316793.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/a92be0e65bd2533c169ad2affea8a654_86521190.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/1ac2e92fd127ed31f6ea06a9b715b546_12004483.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/572985f31c6a9d8aab3e407bf2e80aff_86239247.png change filename to text .imagette220885781744000260/ imagette220885781744000260/1743999552_629783_1350238205_d5f74c41b59774aa002cdbe19ebe764e_rle_crop_3748554198_0.png.png imagette220885781744000260/1743999423_626514_1350238157_74b0603ca863ed57abfce86d376dbe36_rle_crop_3748551263_0.png.png imagette220885781744000260/1743999533_629333_1350238280_785ecef9b53c5668e701e0f6c9a51099_rle_crop_3748554011_0.png.png imagette220885781744000260/1743999552_629783_1350238200_85c132c18d27c734f8bf15d65e2f1c50_rle_crop_3748554234_0.png.png imagette220885781744000260/1744000052_634338_1350238585_bfb6a093f0f480538dcf3bceeb350dcb_rle_crop_3748556007_0.png.png imagette220885781744000260/1743999552_629783_1350238205_d5f74c41b59774aa002cdbe19ebe764e_rle_crop_3748554203_0.png.png imagette220885781744000260/1743999533_629333_1350238278_4c3f819829302860fbd1383792c41230_rle_crop_3748554031_0.png.png imagette220885781744000260/1743999691_631389_1350238308_f1a9d84d74a8efa6a92f087ad6dafb2f_rle_crop_3748554676_0.png.png imagette220885781744000260/1743999552_629783_1350238281_f184c22e7bcd9e1e1a9431573506267a_rle_crop_3748554181_0.png.png imagette220885781744000260/1744000170_635655_1350238745_d284398e9f87d621211c383be1569c31_rle_crop_3748556426_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/7da9d47693deab5b9c2489570e10ebac_24417811.png imagette220885781744000260 22088580 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=22088580 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350238249: '1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551150_0.png', 1350238312: '1743999533_629333_1350238278_4c3f819829302860fbd1383792c41230_rle_crop_3748554034_0.png', 1350238313: '1743999533_629333_1350238278_4c3f819829302860fbd1383792c41230_rle_crop_3748554030_0.png', 1350238332: '1743999552_629783_1350238200_85c132c18d27c734f8bf15d65e2f1c50_rle_crop_3748554233_0.png', 1350238333: '1743999552_629783_1350238200_85c132c18d27c734f8bf15d65e2f1c50_rle_crop_3748554231_0.png', 1350238783: '1744000052_634338_1350238582_c024555e0f0cb7f351a9f1490f9e3f04_rle_crop_3748556025_0.png', 1350238881: '1744000170_635655_1350238745_d284398e9f87d621211c383be1569c31_rle_crop_3748556427_0.png', 1350238882: '1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556436_0.png', 1350238883: '1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556433_0.png', 1350238884: '1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556437_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/30f74e335cb53a46948e12b519687eae_19444606.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/fc58d9bcc545acb4d0f84f38100e13f5_82564019.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/bfddc0a8e2e56259034ea74ad2f588ad_38330512.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/044e63c211bcd76a9151fe24872d925d_40545556.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/1c5b1b79512050d0a3d5c3d1a2bbedb9_24858585.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/bae277d17a586f6876395c2f20eda169_14483766.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/a4481eedf935bde2315695425330da8a_92578516.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/7d20c525ec61b09677949c9efbb9d507_40054058.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/2d39c12cc4649271030ef45558c25940_2498929.png change filename to text .imagette220885801744000260/ imagette220885801744000260/1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556437_0.png.png imagette220885801744000260/1743999552_629783_1350238200_85c132c18d27c734f8bf15d65e2f1c50_rle_crop_3748554231_0.png.png imagette220885801744000260/1744000170_635655_1350238745_d284398e9f87d621211c383be1569c31_rle_crop_3748556427_0.png.png imagette220885801744000260/1743999423_626514_1350238159_3bd6f7b73073a88d1973b623fba2651c_rle_crop_3748551150_0.png.png imagette220885801744000260/1744000052_634338_1350238582_c024555e0f0cb7f351a9f1490f9e3f04_rle_crop_3748556025_0.png.png imagette220885801744000260/1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556436_0.png.png imagette220885801744000260/1743999533_629333_1350238278_4c3f819829302860fbd1383792c41230_rle_crop_3748554034_0.png.png imagette220885801744000260/1744000170_635655_1350238742_7f444007c418bdf26744610fed15b21c_rle_crop_3748556433_0.png.png imagette220885801744000260/1743999533_629333_1350238278_4c3f819829302860fbd1383792c41230_rle_crop_3748554030_0.png.png imagette220885801744000260/1743999552_629783_1350238200_85c132c18d27c734f8bf15d65e2f1c50_rle_crop_3748554233_0.png.png wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/d5113c1747f360dda53e00eeede36ee8_70505941.png imagette220885801744000260 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22088566 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22088581,22088582,22088583,22088584,22088585,22088586,22088587,22088588,22088589,22088590,22088591,22088592?tags=papier,environnement,plastique,kraft,Carton_gris,metal,autre_refus,cartonnette,mal_croppe,Carton_brun,flou,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1350238836] : ('0.06100071537749247',) no score found for photo 1350238836 We are sending mail with results at report@fotonower.com args[1350238833] : ('0.06100071537749247',) no score found for photo 1350238833 We are sending mail with results at report@fotonower.com args[1350238828] : ('0.06100071537749247',) no score found for photo 1350238828 We are sending mail with results at report@fotonower.com args[1350238826] : ('0.06100071537749247',) no score found for photo 1350238826 We are sending mail with results at report@fotonower.com refus_total : 0.06100071537749247 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=22088566 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_P22088566_07-04-2025_06_30_58.pdf results_Auto_P22088566_07-04-2025_06_30_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22088566_07-04-2025_06_30_58.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','22088566','results_Auto_P22088566_07-04-2025_06_30_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22088566_07-04-2025_06_30_58.pdf','pdf','','0.17','0.06100071537749247') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22088566]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350238836, 1350238833, 1350238828, 1350238826] map_info['map_portfolio_photo'] : {22088566: [1350238836, 1350238833, 1350238828, 1350238826, 1350238795, 1350238792, 1350238784, 1350238749, 1350238747, 1350238745, 1350238742, 1350238718, 1350238715, 1350238713, 1350238710, 1350238708, 1350238588, 1350238585, 1350238582, 1350238489, 1350238486, 1350238482, 1350238422, 1350238354, 1350238351, 1350238348, 1350238308, 1350238305, 1350238281, 1350238280, 1350238279, 1350238278, 1350238207, 1350238205, 1350238204, 1350238200, 1350238159, 1350238157]} final : False mtd_id 4302 list_pids : [1350238836, 1350238833, 1350238828, 1350238826] 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, '2727572') ('4302', '22088566', '1350238836', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238833', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238828', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238826', None, None, None, None, None, '2727572') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 4 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', '22088566', '1350238836', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238833', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238828', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238826', None, None, None, None, None, '2727572')] time used for this insertion : 0.013736963272094727 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.5359303951263428 time spend to save output : 0.014010906219482422 total time spend for step 4 : 3.549941301345825 step5:split_time_score Mon Apr 7 06:31:02 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 : ['22088566'] 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 : [('22088566',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22088566) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350238836: {'path': 'temp/1744000258_3007221_1350238836_3f859e6a80666c3f1122a71180113c44.jpg', 'extension': 'jpg'}, 1350238833: {'path': 'temp/1744000258_3007221_1350238833_680ac948376a734e5519e052b78335b9.jpg', 'extension': 'jpg'}, 1350238826: {'path': 'temp/1744000258_3007221_1350238826_757210456a7b6e68aa58a5198d0771b2.jpg', 'extension': 'jpg'}, 1350238828: {'path': 'temp/1744000258_3007221_1350238828_8b6632ee26ca48a3db33239952d0019a.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 = 22088566; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22088566 group by h (('06', 38),) 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=22088566 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 (22088566) 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 (22088566) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 07042025 22088566 Nombre de photos uploadées : 38 / 23040 (0%) 07042025 22088566 Nombre de photos taguées (types de déchets): 0 / 38 (0%) 07042025 22088566 Nombre de photos taguées (volume) : 0 / 38 (0%) [{'photo_id': 1350238159, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/3bd6f7b73073a88d1973b623fba2651c.jpg', 'username': None, 'uploaded_at': 1743999367, 'text': 'image_07042025_06_15_04_10137.jpg'}, {'photo_id': 1350238157, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/74b0603ca863ed57abfce86d376dbe36.jpg', 'username': None, 'uploaded_at': 1743999367, 'text': 'image_07042025_06_15_25_10143.jpg'}, {'photo_id': 1350238207, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/e73a9045eabc34b000cff505d8bfb9cf.jpg', 'username': None, 'uploaded_at': 1743999427, 'text': 'image_07042025_06_15_54_10137.jpg'}, {'photo_id': 1350238205, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/7/d5f74c41b59774aa002cdbe19ebe764e.jpg', 'username': None, 'uploaded_at': 1743999427, 'text': 'image_07042025_06_16_04_010157m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 5.0067901611328125e-06 elapsed_time : order_list_meta_photo_and_scores 1.0013580322265625e-05 ?????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0029866695404052734 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22088566, '2025-04-07' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1719143,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 1.1481812000274658 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= 1719143 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1719143, 'dashboard_run_id': 1726719, 'mtr_portfolio_id': 22087245, 'dashboard_result_id': 9896011, '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_P22087245_07-04-2025_05_49_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087246, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087247, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087248, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087249, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087251, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087253, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22087254, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087256, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087257, 'pht': 3726}}"}, {'dashboat_entry_day': 1719143, 'dashboard_run_id': 1726719, 'mtr_portfolio_id': 22087563, 'dashboard_result_id': 9896012, '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_P22087563_07-04-2025_06_02_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087564, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087565, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22087566, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087567, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087571, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087573, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087574, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087575, 'pht': 3726}}"}, {'dashboat_entry_day': 1719143, 'dashboard_run_id': 1726719, 'mtr_portfolio_id': 22087885, 'dashboard_result_id': 9896013, '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_P22087885_07-04-2025_06_16_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22087926, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087927, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087928, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087931, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087932, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087933, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087934, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087935, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087937, 'pht': 3726}}"}, {'dashboat_entry_day': 1719143, 'dashboard_run_id': 1726719, 'mtr_portfolio_id': 22088566, 'dashboard_result_id': 9896014, '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_P22088566_07-04-2025_06_29_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22088569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22088570, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22088571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22088572, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22088573, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22088574, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22088575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22088576, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22088577, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22088578, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22088579, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22088580, '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 = 22087245 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': 2727478, 'mtr_portfolio_id': 22087245, 'created_at': datetime.datetime(2025, 4, 7, 5, 49), 'result': '0.03997068240926823', 'result_long': None, 'result_double': None}] Qualite : 0.03997068240926823 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22087245 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22087245_07-04-2025_05_49_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22087245 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_P22087245_07-04-2025_05_49_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087246, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087247, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087248, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087249, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087251, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087253, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22087254, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087256, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087257, 'pht': 3726}}" where mtr_portfolio_id = 22087245 and dashboard_run_id = 1726719 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`=22087245 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9896011, 0.03997068240926823, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22087245_07-04-2025_05_49_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087246, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087247, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087248, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087249, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087250, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087251, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087253, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22087254, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087256, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087257, '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 = 22087563 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': 2727504, 'mtr_portfolio_id': 22087563, 'created_at': datetime.datetime(2025, 4, 7, 6, 2, 29), 'result': '0.10703512741841285', 'result_long': None, 'result_double': None}] Qualite : 0.10703512741841285 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22087563 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22087563_07-04-2025_06_02_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22087563 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_P22087563_07-04-2025_06_02_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087564, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087565, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22087566, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087567, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087571, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087573, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087574, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087575, 'pht': 3726}}" where mtr_portfolio_id = 22087563 and dashboard_run_id = 1726719 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`=22087563 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9896012, 0.10703512741841285, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22087563_07-04-2025_06_02_30.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087564, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087565, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22087566, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087567, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087568, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087569, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087570, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087571, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087572, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087573, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087574, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087575, '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 = 22087885 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': 2727546, 'mtr_portfolio_id': 22087885, 'created_at': datetime.datetime(2025, 4, 7, 6, 16, 28), 'result': '0.0626938594760417', 'result_long': None, 'result_double': None}] Qualite : 0.0626938594760417 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22087885 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22087885_07-04-2025_06_16_28.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22087885 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_P22087885_07-04-2025_06_16_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22087926, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087927, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087928, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087931, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087932, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087933, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087934, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087935, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087937, 'pht': 3726}}" where mtr_portfolio_id = 22087885 and dashboard_run_id = 1726719 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`=22087885 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9896013, 0.0626938594760417, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22087885_07-04-2025_06_16_28.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22087926, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22087927, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22087928, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22087929, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22087930, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22087931, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22087932, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22087933, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22087934, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22087935, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22087936, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22087937, '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 = 22088566 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': 2727572, 'mtr_portfolio_id': 22088566, 'created_at': datetime.datetime(2025, 4, 7, 6, 30, 58), 'result': '0.06100071537749247', 'result_long': None, 'result_double': None}] Qualite : 0.06100071537749247 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22088566 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22088566_07-04-2025_06_30_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22088566 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_P22088566_07-04-2025_06_30_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22088569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22088570, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22088571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22088572, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22088573, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22088574, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22088575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22088576, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22088577, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22088578, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22088579, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22088580, 'pht': 3726}}" where mtr_portfolio_id = 22088566 and dashboard_run_id = 1726719 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`=22088566 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9896014, 0.06100071537749247, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22088566_07-04-2025_06_30_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22088569, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22088570, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22088571, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22088572, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22088573, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22088574, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22088575, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22088576, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22088577, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22088578, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22088579, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22088580, '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 (22087245,22087563,22087885,22088566) result : ((1350234507,), (1350234570,), (1350234574,), (1350234577,), (1350234614,), (1350234617,), (1350234620,), (1350234622,), (1350234724,), (1350234726,), (1350234728,), (1350234730,), (1350234747,), (1350234748,), (1350234749,), (1350234752,), (1350234754,), (1350234758,), (1350234769,), (1350234780,), (1350234791,), (1350234821,), (1350234825,), (1350234828,), (1350234861,), (1350234862,), (1350234915,), (1350234918,), (1350235079,), (1350235276,), (1350235324,), (1350235579,), (1350235754,), (1350235814,), (1350235811,), (1350235885,), (1350235924,), (1350235929,), (1350235935,), (1350235944,), (1350236046,), (1350236081,), (1350236143,), (1350236173,), (1350236178,), (1350236180,), (1350236205,), (1350236335,), (1350236338,), (1350236341,), (1350236345,), (1350236351,), (1350236774,), (1350236760,), (1350236763,), (1350236770,), (1350236798,), (1350236800,), (1350236803,), (1350236844,), (1350236848,), (1350236853,), (1350236858,), (1350236863,), (1350236868,), (1350236904,), (1350236908,), (1350236914,), (1350236953,), (1350236964,), (1350237392,), (1350237410,), (1350237424,), (1350237608,), (1350237718,), (1350237723,), (1350237725,), (1350237727,), (1350237731,), (1350237734,), (1350237752,), (1350237757,), (1350237761,), (1350237781,), (1350237861,), (1350237864,), (1350237866,), (1350237905,), (1350237907,), (1350237984,), (1350237987,), (1350237989,), (1350238019,), (1350238024,), (1350238027,), (1350238030,), (1350238059,), (1350238095,), (1350238097,), (1350238099,), (1350238101,), (1350238128,), (1350238130,), (1350238162,), (1350238157,), (1350238159,), (1350238200,), (1350238204,), (1350238205,), (1350238207,), (1350238278,), (1350238279,), (1350238280,), (1350238281,), (1350238305,), (1350238308,), (1350238348,), (1350238351,), (1350238354,), (1350238422,), (1350238482,), (1350238486,), (1350238489,), (1350238582,), (1350238585,), (1350238588,), (1350238708,), (1350238710,), (1350238713,), (1350238715,), (1350238718,), (1350238742,), (1350238745,), (1350238747,), (1350238749,), (1350238784,), (1350238792,), (1350238795,), (1350238826,), (1350238828,), (1350238833,), (1350238836,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'07042025': {'nb_upload': 38, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22088566]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350238836, 1350238833, 1350238828, 1350238826] map_info['map_portfolio_photo'] : {22088566: [1350238836, 1350238833, 1350238828, 1350238826, 1350238795, 1350238792, 1350238784, 1350238749, 1350238747, 1350238745, 1350238742, 1350238718, 1350238715, 1350238713, 1350238710, 1350238708, 1350238588, 1350238585, 1350238582, 1350238489, 1350238486, 1350238482, 1350238422, 1350238354, 1350238351, 1350238348, 1350238308, 1350238305, 1350238281, 1350238280, 1350238279, 1350238278, 1350238207, 1350238205, 1350238204, 1350238200, 1350238159, 1350238157]} final : True mtd_id 4302 list_pids : [1350238836, 1350238833, 1350238828, 1350238826] Looping around the photos to save general results len do output : 1 /22088566Didn'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, '2727572') ('4302', '22088566', '1350238836', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238833', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238828', None, None, None, None, None, '2727572') ('4302', None, None, None, None, None, None, None, '2727572') ('4302', '22088566', '1350238826', None, None, None, None, None, '2727572') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 5 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22088566', 'None', None, None, None, None, '2727572'), ('4302', '22088566', '1350238836', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238833', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238828', None, None, None, None, None, '2727572'), ('4302', '22088566', '1350238826', None, None, None, None, None, '2727572')] time used for this insertion : 0.016520023345947266 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.4688074588775635 time spend to save output : 0.016756296157836914 total time spend for step 5 : 1.4855637550354004 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 (2727572) 2.12user 2.36system 0:08.91elapsed 50%CPU (0avgtext+0avgdata 158332maxresident)k 21832inputs+7864outputs (109major+70609minor)pagefaults 0swaps