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 : 2008788 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 (2733121) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2733121) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148225 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2733121'] with mtr_portfolio_ids : ['22148225'] and first list_photo_ids : [] new path : /proc/2008788/ Name: python3 Umask: 0002 State: R (running) Tgid: 2008788 Ngid: 0 Pid: 2008788 PPid: 2008787 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2008788 NSpid: 2008788 NSpgid: 2007556 NSsid: 2007556 VmPeak: 1106844 kB VmSize: 1106844 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99044 kB VmRSS: 99044 kB RssAnon: 59776 kB RssFile: 39268 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 540 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: 51 nonvoluntary_ctxt_switches: 155 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2008788', 'Ngid': '0', 'Pid': '2008788', 'PPid': '2008787', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2008788', 'NSpid': '2008788', 'NSpgid': '2007556', 'NSsid': '2007556', 'VmPeak': '1106844 kB', 'VmSize': '1106844 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99044 kB', 'VmRSS': '99044 kB', 'RssAnon': '59776 kB', 'RssFile': '39268 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '540 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': '51', 'nonvoluntary_ctxt_switches': '155'} ('datou_batch_current', '2008788', '1106844', '0', '1106844', '865592', '99044', b'', 'marlene', '2733121') 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 (22148225) 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 (2733121 ) ) 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 (22148225) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350640991, 'portfolio_id': 22148225}, {'photo_id': 1350640949, 'portfolio_id': 22148225}, {'photo_id': 1350640943, 'portfolio_id': 22148225}, {'photo_id': 1350640925, 'portfolio_id': 22148225}, {'photo_id': 1350640919, 'portfolio_id': 22148225}, {'photo_id': 1350640876, 'portfolio_id': 22148225}, {'photo_id': 1350640857, 'portfolio_id': 22148225}, {'photo_id': 1350640835, 'portfolio_id': 22148225}, {'photo_id': 1350640805, 'portfolio_id': 22148225}, {'photo_id': 1350640792, 'portfolio_id': 22148225}, {'photo_id': 1350640751, 'portfolio_id': 22148225}, {'photo_id': 1350640648, 'portfolio_id': 22148225}, {'photo_id': 1350640638, 'portfolio_id': 22148225}, {'photo_id': 1350640633, 'portfolio_id': 22148225}, {'photo_id': 1350640626, 'portfolio_id': 22148225}, {'photo_id': 1350640600, 'portfolio_id': 22148225}, {'photo_id': 1350640532, 'portfolio_id': 22148225}, {'photo_id': 1350640470, 'portfolio_id': 22148225}, {'photo_id': 1350640438, 'portfolio_id': 22148225}, {'photo_id': 1350640424, 'portfolio_id': 22148225}, {'photo_id': 1350640367, 'portfolio_id': 22148225}, {'photo_id': 1350640348, 'portfolio_id': 22148225}, {'photo_id': 1350640314, 'portfolio_id': 22148225}, {'photo_id': 1350640222, 'portfolio_id': 22148225}, {'photo_id': 1350640108, 'portfolio_id': 22148225}, {'photo_id': 1350640103, 'portfolio_id': 22148225}] map_portfolio_id_photo_id: {22148225: [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751, 1350640648, 1350640638, 1350640633, 1350640626, 1350640600, 1350640532, 1350640470, 1350640438, 1350640424, 1350640367, 1350640348, 1350640314, 1350640222, 1350640108, 1350640103]} ##### 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.014858484268188477 #### 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 Tue Apr 8 15:52:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22148225) 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 : 22148225 get user id for portfolio 22148225 get sub ptf for main ptf 22148225, type 3726 and hashtags ['kraft', 'plastique', 'flou', 'Teint_Dans_La_Masse', 'mal_croppe', 'Carton_brun', 'Carton_gris', 'cartonnette', 'environnement', 'metal', 'papier', 'autre_refus'] 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`=22148225 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','flou','Teint_Dans_La_Masse','mal_croppe','Carton_brun','Carton_gris','cartonnette','environnement','metal','papier','autre_refus')) 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`=22148225 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','flou','Teint_Dans_La_Masse','mal_croppe','Carton_brun','Carton_gris','cartonnette','environnement','metal','papier','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 22148225, 'sub_port_id': 22148275, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626725, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'environnement': {'main_port_id': 22148225, 'sub_port_id': 22148276, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626726, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'kraft': {'main_port_id': 22148225, 'sub_port_id': 22148277, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626727, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'flou': {'main_port_id': 22148225, 'sub_port_id': 22148278, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626728, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'plastique': {'main_port_id': 22148225, 'sub_port_id': 22148279, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626729, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'autre_refus': {'main_port_id': 22148225, 'sub_port_id': 22148280, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626730, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'Carton_brun': {'main_port_id': 22148225, 'sub_port_id': 22148281, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626731, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'metal': {'main_port_id': 22148225, 'sub_port_id': 22148282, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626732, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 22148225, 'sub_port_id': 22148283, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626733, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'Carton_gris': {'main_port_id': 22148225, 'sub_port_id': 22148284, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626734, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'papier': {'main_port_id': 22148225, 'sub_port_id': 22148285, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626735, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}, 'mal_croppe': {'main_port_id': 22148225, 'sub_port_id': 22148286, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626736, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22148275 , 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=22148225 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 (22148275) result : ((1350640513,), (1350640742,), (1350641012,), (1350641013,), (1350641014,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148276 , 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=22148225 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 (22148276) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148277 , 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=22148225 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 (22148277) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148278 , 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=22148225 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 (22148278) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148279 , 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=22148225 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 (22148279) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148280 , 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=22148225 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 (22148280) result : ((1350640713,), (1350640717,), (1350640722,), (1350641007,), (1350641008,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148281 , 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=22148225 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 (22148281) result : ((1350640764,), (1350640768,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148282 , 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=22148225 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 (22148282) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148283 , 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=22148225 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 (22148283) result : ((1350640507,), (1350640508,), (1350640509,), (1350641004,), (1350641005,), (1350641006,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148284 , 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=22148225 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 (22148284) result : ((1350640511,), (1350641009,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148285 , 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=22148225 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 (22148285) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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 22148286 , 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=22148225 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 (22148286) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22148225) result : ((1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) 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 (1350640600) 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`=22148225 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','flou','Teint_Dans_La_Masse','mal_croppe','Carton_brun','Carton_gris','cartonnette','environnement','metal','papier','autre_refus')) 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`=22148225 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','flou','Teint_Dans_La_Masse','mal_croppe','Carton_brun','Carton_gris','cartonnette','environnement','metal','papier','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 22148225, 'sub_port_id': 22148288, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626737, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'environnement': {'main_port_id': 22148225, 'sub_port_id': 22148289, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626738, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'kraft': {'main_port_id': 22148225, 'sub_port_id': 22148290, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626739, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'flou': {'main_port_id': 22148225, 'sub_port_id': 22148291, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626740, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'plastique': {'main_port_id': 22148225, 'sub_port_id': 22148292, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626741, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'autre_refus': {'main_port_id': 22148225, 'sub_port_id': 22148293, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626742, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'Carton_brun': {'main_port_id': 22148225, 'sub_port_id': 22148294, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626743, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'metal': {'main_port_id': 22148225, 'sub_port_id': 22148295, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626744, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22148225, 'sub_port_id': 22148296, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626745, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'Carton_gris': {'main_port_id': 22148225, 'sub_port_id': 22148297, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626746, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'papier': {'main_port_id': 22148225, 'sub_port_id': 22148298, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626747, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}, 'mal_croppe': {'main_port_id': 22148225, 'sub_port_id': 22148299, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14626748, 'last_updated_at': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 8, 15, 50, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 8, 15, 50, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148288,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148275 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148289,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148276 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148290,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148277 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148291,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148278 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148292,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148279 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148293,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148280 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148294,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148281 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148295,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148282 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148296,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148283 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148297,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148284 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148298,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148285 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22148299,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22148286 lien utilise dans velours : https://www.fotonower.com/velours/22148288,22148289,22148290,22148291,22148292,22148293,22148294,22148295,22148296,22148297,22148298,22148299?tags=cartonnette,environnement,kraft,flou,plastique,autre_refus,Carton_brun,metal,Teint_Dans_La_Masse,Carton_gris,papier,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22148225]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] map_info['map_portfolio_photo'] : {22148225: [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751, 1350640648, 1350640638, 1350640633, 1350640626, 1350640600, 1350640532, 1350640470, 1350640438, 1350640424, 1350640367, 1350640348, 1350640314, 1350640222, 1350640108, 1350640103]} final : False mtd_id 4302 list_pids : [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] Looping around the photos to save general results len do output : 1 /22148225. 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, '2733121') ('4302', '22148225', '1350640991', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640949', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640943', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640925', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640919', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640876', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640857', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640835', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640805', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640792', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640751', None, None, None, None, None, '2733121') 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', None, '22148225', "{'cartonnette': 22148275, 'environnement': 22148276, 'kraft': 22148277, 'flou': 22148278, 'plastique': 22148279, 'autre_refus': 22148280, 'Carton_brun': 22148281, 'metal': 22148282, 'Teint_Dans_La_Masse': 22148283, 'Carton_gris': 22148284, 'papier': 22148285, 'mal_croppe': 22148286}", None, None, None, None, '2733121'), ('4302', '22148225', '1350640991', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640949', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640943', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640925', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640919', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640876', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640857', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640835', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640805', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640792', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640751', None, None, None, None, None, '2733121')] time used for this insertion : 0.01967620849609375 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5573749542236328 time spend to save output : 0.020099163055419922 total time spend for step 1 : 0.5774741172790527 step2:final Tue Apr 8 15:52:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (22148225) 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 22148225 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350640108,1350640103,1350640367,1350640222,1350640348,1350640314,1350640470,1350640438,1350640424,1350640648,1350640638,1350640633,1350640626,1350640600,1350640532,1350640876,1350640857,1350640835,1350640805,1350640792,1350640751,1350640991,1350640949,1350640943,1350640925,1350640919); 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([22148225]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} new output for save of step final : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] map_info['map_portfolio_photo'] : {22148225: [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751, 1350640648, 1350640638, 1350640633, 1350640626, 1350640600, 1350640532, 1350640470, 1350640438, 1350640424, 1350640367, 1350640348, 1350640314, 1350640222, 1350640108, 1350640103]} final : False mtd_id 4302 list_pids : [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] Looping around the photos to save general results len do output : 11 /1350640991.Didn't retrieve data . /1350640949.Didn't retrieve data . /1350640943.Didn't retrieve data . /1350640925.Didn't retrieve data . /1350640919.Didn't retrieve data . /1350640876.Didn't retrieve data . /1350640857.Didn't retrieve data . /1350640835.Didn't retrieve data . /1350640805.Didn't retrieve data . /1350640792.Didn't retrieve data . /1350640751.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, '2733121') ('4302', '22148225', '1350640991', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640949', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640943', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640925', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640919', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640876', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640857', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640835', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640805', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640792', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640751', None, None, None, None, None, '2733121') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '22148225', '1350640991', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640949', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640943', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640925', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640919', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640876', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640857', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640835', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640805', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640792', '0.03259928945706682', None, None, None, None, '2733121'), ('4302', '22148225', '1350640751', '0.03259928945706682', None, None, None, None, '2733121')] time used for this insertion : 0.013561248779296875 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06374478340148926 time spend to save output : 0.014131546020507812 total time spend for step 2 : 0.07787632942199707 step3:velours_tree Tue Apr 8 15:52:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22148225: [{'cartonnette': 22148275, 'environnement': 22148276, 'kraft': 22148277, 'flou': 22148278, 'plastique': 22148279, 'autre_refus': 22148280, 'Carton_brun': 22148281, 'metal': 22148282, 'Teint_Dans_La_Masse': 22148283, 'Carton_gris': 22148284, 'papier': 22148285, 'mal_croppe': 22148286}]} input_args_next_step : {22148225: ()} output_args : {22148225: [{'cartonnette': 22148275, 'environnement': 22148276, 'kraft': 22148277, 'flou': 22148278, 'plastique': 22148279, 'autre_refus': 22148280, 'Carton_brun': 22148281, 'metal': 22148282, 'Teint_Dans_La_Masse': 22148283, 'Carton_gris': 22148284, 'papier': 22148285, 'mal_croppe': 22148286}]} args : 22148225 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 : ({'cartonnette': 22148275, 'environnement': 22148276, 'kraft': 22148277, 'flou': 22148278, 'plastique': 22148279, 'autre_refus': 22148280, 'Carton_brun': 22148281, 'metal': 22148282, 'Teint_Dans_La_Masse': 22148283, 'Carton_gris': 22148284, 'papier': 22148285, 'mal_croppe': 22148286},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22148225) 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([22148225]) 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.34868621826171875 time spend to save output : 5.7220458984375e-05 total time spend for step 3 : 0.3487434387207031 step4:send_mail_cod Tue Apr 8 15:52:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} input_args_next_step : {1350640991: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640991 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640949 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640943 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640925 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640919 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640876 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640857 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640835 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640805 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640792 depend.output_id : 0 input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ()} output_args : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',)} args : 1350640751 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 : {22148225: [{'cartonnette': 22148275, 'environnement': 22148276, 'kraft': 22148277, 'flou': 22148278, 'plastique': 22148279, 'autre_refus': 22148280, 'Carton_brun': 22148281, 'metal': 22148282, 'Teint_Dans_La_Masse': 22148283, 'Carton_gris': 22148284, 'papier': 22148285, 'mal_croppe': 22148286}]} input_args_next_step : {1350640991: ('0.03259928945706682',), 1350640949: ('0.03259928945706682',), 1350640943: ('0.03259928945706682',), 1350640925: ('0.03259928945706682',), 1350640919: ('0.03259928945706682',), 1350640876: ('0.03259928945706682',), 1350640857: ('0.03259928945706682',), 1350640835: ('0.03259928945706682',), 1350640805: ('0.03259928945706682',), 1350640792: ('0.03259928945706682',), 1350640751: ('0.03259928945706682',), 22148225: ()} output_args : {22148225: [{'cartonnette': 22148275, 'environnement': 22148276, 'kraft': 22148277, 'flou': 22148278, 'plastique': 22148279, 'autre_refus': 22148280, 'Carton_brun': 22148281, 'metal': 22148282, 'Teint_Dans_La_Masse': 22148283, 'Carton_gris': 22148284, 'papier': 22148285, 'mal_croppe': 22148286}]} args : 22148225 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 :12, first value : ('0.03259928945706682',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22148225) 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 (1350640991,1350640949,1350640943,1350640925,1350640919,1350640876,1350640857,1350640835,1350640805,1350640792,1350640751) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350640751 begin to download photo : 1350640835 begin to download photo : 1350640919 begin to download photo : 1350640949 download finish for photo 1350640919 download finish for photo 1350640751 begin to download photo : 1350640925 begin to download photo : 1350640792 download finish for photo 1350640835 begin to download photo : 1350640857 download finish for photo 1350640949 begin to download photo : 1350640991 download finish for photo 1350640925 begin to download photo : 1350640943 download finish for photo 1350640857 begin to download photo : 1350640876 download finish for photo 1350640792 begin to download photo : 1350640805 download finish for photo 1350640991 download finish for photo 1350640805 download finish for photo 1350640943 download finish for photo 1350640876 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 : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P22148225_08-04-2025_15_52_30.pdf 22148275 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=22148275 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350640513: '1744120074_2234961_1350640108_5100b5e02221a7bf171938895f61a863_rle_crop_3750907409_0.png', 1350640742: '1744120165_1962151_1350640348_f33eb5983773513ce5c142b1d92b39c1_rle_crop_3750909058_0.png', 1350641012: '1744120273_2238657_1350640638_6b38476d41425f2ca32e69bc8f6211a7_rle_crop_3750910384_0.png', 1350641013: '1744120273_2238657_1350640633_aab6945b7b0b28015703e5e6dffd29bb_rle_crop_3750910397_0.png', 1350641014: '1744120273_2238657_1350640532_7c2639267a2e2d0172397a0b3e06c102_rle_crop_3750910434_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/43593c9dc2c9791bcbb773289ff2e433_51860731.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/6a8a02e43655699073026984277d3aaa_57514070.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/0bda4810b30732b5ebb52fd2ba164a00_2799344.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/134b20b656fe7d22d15a30447c71c3f4_74440764.png change filename to text .imagette221482751744120350/ imagette221482751744120350/1744120273_2238657_1350640633_aab6945b7b0b28015703e5e6dffd29bb_rle_crop_3750910397_0.png.png imagette221482751744120350/1744120273_2238657_1350640532_7c2639267a2e2d0172397a0b3e06c102_rle_crop_3750910434_0.png.png imagette221482751744120350/1744120273_2238657_1350640638_6b38476d41425f2ca32e69bc8f6211a7_rle_crop_3750910384_0.png.png imagette221482751744120350/1744120074_2234961_1350640108_5100b5e02221a7bf171938895f61a863_rle_crop_3750907409_0.png.png imagette221482751744120350/1744120165_1962151_1350640348_f33eb5983773513ce5c142b1d92b39c1_rle_crop_3750909058_0.png.png imagette221482771744120350/ imagette221482781744120350/ imagette221482791744120350/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/8576ca5c2690ea4259d8596a592262a7_39466049.png imagette221482751744120350 22148277 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=22148277 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221482771744120350 22148278 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=22148278 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221482781744120350 22148279 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=22148279 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221482791744120350 22148280 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=22148280 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350640713: '1744120165_1962151_1350640470_b1d93d61d1ae17c790395bb1861e9340_rle_crop_3750909034_0.png', 1350640717: '1744120165_1962151_1350640314_126e7326cae6242b6abd34a6dc657b5e_rle_crop_3750909073_0.png', 1350640722: '1744120165_1962151_1350640222_611178abbb0f75ed85adca5a7b4e2e54_rle_crop_3750909103_0.png', 1350641007: '1744120273_2238657_1350640633_aab6945b7b0b28015703e5e6dffd29bb_rle_crop_3750910395_0.png', 1350641008: '1744120273_2238657_1350640532_7c2639267a2e2d0172397a0b3e06c102_rle_crop_3750910439_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/8bc44696faada49fa865755843409aec_87988317.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/70ba8a1ec734a10eeedf921f3d497eca_74930141.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/7479640759bc311e67af580680fff725_80832267.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/94a98512bd3b33e34a19ba194e3b669f_76293175.png change filename to text .imagette221482801744120350/ imagette221482801744120350/1744120273_2238657_1350640633_aab6945b7b0b28015703e5e6dffd29bb_rle_crop_3750910395_0.png.png imagette221482801744120350/1744120273_2238657_1350640532_7c2639267a2e2d0172397a0b3e06c102_rle_crop_3750910439_0.png.png imagette221482801744120350/1744120165_1962151_1350640314_126e7326cae6242b6abd34a6dc657b5e_rle_crop_3750909073_0.png.png imagette221482801744120350/1744120165_1962151_1350640222_611178abbb0f75ed85adca5a7b4e2e54_rle_crop_3750909103_0.png.png imagette221482801744120350/1744120165_1962151_1350640470_b1d93d61d1ae17c790395bb1861e9340_rle_crop_3750909034_0.png.png imagette221482821744120351/ imagette221482861744120351/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/1fe1b7be604399faf7a4e47319e0a5d9_37904457.png imagette221482801744120350 22148282 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=22148282 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221482821744120351 22148286 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=22148286 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221482861744120351 22148281 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=22148281 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350640764: '1744120165_1962151_1350640470_b1d93d61d1ae17c790395bb1861e9340_rle_crop_3750909033_0.png', 1350640768: '1744120165_1962151_1350640314_126e7326cae6242b6abd34a6dc657b5e_rle_crop_3750909070_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/1e51f10ddd6cde8829c4996ebdc49f5c_97545161.png change filename to text .imagette221482811744120351/ imagette221482811744120351/1744120165_1962151_1350640314_126e7326cae6242b6abd34a6dc657b5e_rle_crop_3750909070_0.png.png imagette221482811744120351/1744120165_1962151_1350640470_b1d93d61d1ae17c790395bb1861e9340_rle_crop_3750909033_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/b28a60394d16ca489f1d049913373cbf_16241790.png imagette221482811744120351 22148283 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=22148283 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350640507: '1744120074_2234961_1350640108_5100b5e02221a7bf171938895f61a863_rle_crop_3750907414_0.png', 1350640508: '1744120074_2234961_1350640103_4d7a35c609c825008ecdc7dd0cc4b8c6_rle_crop_3750907431_0.png', 1350640509: '1744120074_2234961_1350640103_4d7a35c609c825008ecdc7dd0cc4b8c6_rle_crop_3750907426_0.png', 1350641004: '1744120273_2238657_1350640638_6b38476d41425f2ca32e69bc8f6211a7_rle_crop_3750910388_0.png', 1350641005: '1744120273_2238657_1350640638_6b38476d41425f2ca32e69bc8f6211a7_rle_crop_3750910383_0.png', 1350641006: '1744120273_2238657_1350640600_ae0c766f7ed89e36c6bf75243ae19bd4_rle_crop_3750910423_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/202fcb6abb963e302aff2b9be860ff76_76412030.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/a98650528a7a99db855d56d899f20462_30695672.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/77da7ba8ccce8fb8877882adb77c1dce_63149459.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/5e372e42f21079c49f98d3745b385f5f_6738704.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/1a9028476eaabe81afc7604a29310a0c_82840631.png change filename to text .imagette221482831744120351/ imagette221482831744120351/1744120074_2234961_1350640103_4d7a35c609c825008ecdc7dd0cc4b8c6_rle_crop_3750907431_0.png.png imagette221482831744120351/1744120074_2234961_1350640108_5100b5e02221a7bf171938895f61a863_rle_crop_3750907414_0.png.png imagette221482831744120351/1744120273_2238657_1350640638_6b38476d41425f2ca32e69bc8f6211a7_rle_crop_3750910388_0.png.png imagette221482831744120351/1744120273_2238657_1350640600_ae0c766f7ed89e36c6bf75243ae19bd4_rle_crop_3750910423_0.png.png imagette221482831744120351/1744120273_2238657_1350640638_6b38476d41425f2ca32e69bc8f6211a7_rle_crop_3750910383_0.png.png imagette221482831744120351/1744120074_2234961_1350640103_4d7a35c609c825008ecdc7dd0cc4b8c6_rle_crop_3750907426_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/b4ce2fb5f95eaa73194857bc6166aee7_4502810.png imagette221482831744120351 22148284 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=22148284 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1350640511: '1744120074_2234961_1350640103_4d7a35c609c825008ecdc7dd0cc4b8c6_rle_crop_3750907428_0.png', 1350641009: '1744120273_2238657_1350640600_ae0c766f7ed89e36c6bf75243ae19bd4_rle_crop_3750910419_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/8369102fd337cb29cb551aa920078dc2_55560208.png change filename to text .imagette221482841744120351/ imagette221482841744120351/1744120074_2234961_1350640103_4d7a35c609c825008ecdc7dd0cc4b8c6_rle_crop_3750907428_0.png.png imagette221482841744120351/1744120273_2238657_1350640600_ae0c766f7ed89e36c6bf75243ae19bd4_rle_crop_3750910419_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/c8f456c3f3d4d7018efff2df1950d6d3_10504839.png imagette221482841744120351 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22148225 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22148288,22148289,22148290,22148291,22148292,22148293,22148294,22148295,22148296,22148297,22148298,22148299?tags=cartonnette,environnement,kraft,flou,plastique,autre_refus,Carton_brun,metal,Teint_Dans_La_Masse,Carton_gris,papier,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1350640991] : ('0.03259928945706682',) no score found for photo 1350640991 We are sending mail with results at report@fotonower.com args[1350640949] : ('0.03259928945706682',) no score found for photo 1350640949 We are sending mail with results at report@fotonower.com args[1350640943] : ('0.03259928945706682',) no score found for photo 1350640943 We are sending mail with results at report@fotonower.com args[1350640925] : ('0.03259928945706682',) no score found for photo 1350640925 We are sending mail with results at report@fotonower.com args[1350640919] : ('0.03259928945706682',) no score found for photo 1350640919 We are sending mail with results at report@fotonower.com args[1350640876] : ('0.03259928945706682',) no score found for photo 1350640876 We are sending mail with results at report@fotonower.com args[1350640857] : ('0.03259928945706682',) no score found for photo 1350640857 We are sending mail with results at report@fotonower.com args[1350640835] : ('0.03259928945706682',) no score found for photo 1350640835 We are sending mail with results at report@fotonower.com args[1350640805] : ('0.03259928945706682',) no score found for photo 1350640805 We are sending mail with results at report@fotonower.com args[1350640792] : ('0.03259928945706682',) no score found for photo 1350640792 We are sending mail with results at report@fotonower.com args[1350640751] : ('0.03259928945706682',) no score found for photo 1350640751 We are sending mail with results at report@fotonower.com refus_total : 0.03259928945706682 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=22148225 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_P22148225_08-04-2025_15_52_30.pdf results_Auto_P22148225_08-04-2025_15_52_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148225_08-04-2025_15_52_30.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','22148225','results_Auto_P22148225_08-04-2025_15_52_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148225_08-04-2025_15_52_30.pdf','pdf','','0.15','0.03259928945706682') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22148225]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] map_info['map_portfolio_photo'] : {22148225: [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751, 1350640648, 1350640638, 1350640633, 1350640626, 1350640600, 1350640532, 1350640470, 1350640438, 1350640424, 1350640367, 1350640348, 1350640314, 1350640222, 1350640108, 1350640103]} final : False mtd_id 4302 list_pids : [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] 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, '2733121') ('4302', '22148225', '1350640991', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640949', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640943', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640925', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640919', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640876', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640857', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640835', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640805', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640792', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640751', None, None, None, None, None, '2733121') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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', '22148225', '1350640991', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640949', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640943', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640925', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640919', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640876', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640857', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640835', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640805', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640792', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640751', None, None, None, None, None, '2733121')] time used for this insertion : 0.013452529907226562 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.577162504196167 time spend to save output : 0.013744592666625977 total time spend for step 4 : 2.590907096862793 step5:split_time_score Tue Apr 8 15:52:32 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 : ['22148225'] 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 : [('22148225',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22148225) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350640949: {'path': 'temp/1744120350_2008788_1350640949_0cac79ce51f05fc23f530cf072fb9bb6.jpg', 'extension': 'jpg'}, 1350640991: {'path': 'temp/1744120350_2008788_1350640991_ad6bb27f1c15bad3f2a1971e5dd9181b.jpg', 'extension': 'jpg'}, 1350640751: {'path': 'temp/1744120350_2008788_1350640751_7d693f58ab723b2271fed673c09859ea.jpg', 'extension': 'jpg'}, 1350640792: {'path': 'temp/1744120350_2008788_1350640792_af16444e6ae17fa018a578dcdb33e9d7.jpg', 'extension': 'jpg'}, 1350640805: {'path': 'temp/1744120350_2008788_1350640805_d02b7be2a98fe3b3b46dda98b8bdc3a0.jpg', 'extension': 'jpg'}, 1350640919: {'path': 'temp/1744120350_2008788_1350640919_3f4336e93ab8caeeaa0f3fdd22410a40.jpg', 'extension': 'jpg'}, 1350640925: {'path': 'temp/1744120350_2008788_1350640925_562c58a6601446db790fe8a1ff8b3fae.jpg', 'extension': 'jpg'}, 1350640943: {'path': 'temp/1744120350_2008788_1350640943_73c350a198bcc11004763a8d2593441c.jpg', 'extension': 'jpg'}, 1350640835: {'path': 'temp/1744120350_2008788_1350640835_03635746950d012dfb49d5fa79706a7d.jpg', 'extension': 'jpg'}, 1350640857: {'path': 'temp/1744120350_2008788_1350640857_70c6cb36b1e82318795491da648a2981.jpg', 'extension': 'jpg'}, 1350640876: {'path': 'temp/1744120350_2008788_1350640876_371461dbaf3b5bd28053e5f32a658b38.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 = 22148225; (('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 = 22148225 group by h (('15', 26),) 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=22148225 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 (22148225) 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 (22148225) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 08042025 22148225 Nombre de photos uploadées : 26 / 23040 (0%) 08042025 22148225 Nombre de photos taguées (types de déchets): 0 / 26 (0%) 08042025 22148225 Nombre de photos taguées (volume) : 0 / 26 (0%) [{'photo_id': 1350640108, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/5100b5e02221a7bf171938895f61a863.jpg', 'username': None, 'uploaded_at': 1744119967, 'text': 'image_08042025_15_45_13_10142.jpg'}, {'photo_id': 1350640103, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/4d7a35c609c825008ecdc7dd0cc4b8c6.jpg', 'username': None, 'uploaded_at': 1744119967, 'text': 'image_08042025_15_45_34_10139.jpg'}, {'photo_id': 1350640367, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/58916ad35ae836c9028816963bbcae1d.jpg', 'username': None, 'uploaded_at': 1744120042, 'text': 'image_08042025_15_45_54_10137.jpg'}, {'photo_id': 1350640222, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/8/611178abbb0f75ed85adca5a7b4e2e54.jpg', 'username': None, 'uploaded_at': 1744120023, 'text': 'image_08042025_15_46_13_010208m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 4.0531158447265625e-06 elapsed_time : order_list_meta_photo_and_scores 6.67572021484375e-06 ?????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0012359619140625 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22148225, '2025-04-08' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1722494,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03173971176147461 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= 1722494 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732608, 'mtr_portfolio_id': 22146240, 'dashboard_result_id': 9934922, '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_P22146240_08-04-2025_15_19_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22146267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22146268, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22146269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22146270, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22146271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22146272, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22146273, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22146274, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22146275, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22146276, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22146277, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22146278, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732608, 'mtr_portfolio_id': 22146880, 'dashboard_result_id': 9934923, '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_P22146880_08-04-2025_15_32_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22146882, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22146883, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22146884, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22146885, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22146886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22146887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22146888, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22146889, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22146890, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22146891, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22146892, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22146893, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732608, 'mtr_portfolio_id': 22147434, 'dashboard_result_id': 9934924, '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_P22147434_08-04-2025_15_47_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22147437, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22147438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22147439, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22147440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22147441, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22147442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22147443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22147444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22147445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22147446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22147447, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22147448, 'pht': 3726}}"}, {'dashboat_entry_day': 1722494, 'dashboard_run_id': 1732608, 'mtr_portfolio_id': 22148225, 'dashboard_result_id': 9934925, '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_P22148225_08-04-2025_15_51_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148275, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148276, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148279, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148283, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148285, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148286, '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 = 22146240 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': 2732968, 'mtr_portfolio_id': 22146240, 'created_at': datetime.datetime(2025, 4, 8, 15, 19, 1), 'result': '0.047588733128013434', 'result_long': None, 'result_double': None}] Qualite : 0.047588733128013434 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22146240 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22146240_08-04-2025_15_19_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22146240 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_P22146240_08-04-2025_15_19_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22146267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22146268, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22146269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22146270, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22146271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22146272, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22146273, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22146274, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22146275, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22146276, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22146277, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22146278, 'pht': 3726}}" where mtr_portfolio_id = 22146240 and dashboard_run_id = 1732608 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`=22146240 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9934922, 0.047588733128013434, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22146240_08-04-2025_15_19_01.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22146267, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22146268, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22146269, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22146270, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22146271, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22146272, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22146273, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22146274, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22146275, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22146276, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22146277, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22146278, '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 = 22146880 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': 2733007, 'mtr_portfolio_id': 22146880, 'created_at': datetime.datetime(2025, 4, 8, 15, 32, 57), 'result': '0.05214197844230006', 'result_long': None, 'result_double': None}] Qualite : 0.05214197844230006 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22146880 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22146880_08-04-2025_15_32_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22146880 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_P22146880_08-04-2025_15_32_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22146882, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22146883, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22146884, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22146885, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22146886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22146887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22146888, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22146889, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22146890, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22146891, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22146892, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22146893, 'pht': 3726}}" where mtr_portfolio_id = 22146880 and dashboard_run_id = 1732608 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`=22146880 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9934923, 0.05214197844230006, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22146880_08-04-2025_15_32_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22146882, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22146883, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22146884, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22146885, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22146886, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22146887, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22146888, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22146889, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22146890, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22146891, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22146892, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22146893, '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 = 22147434 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': 2733066, 'mtr_portfolio_id': 22147434, 'created_at': datetime.datetime(2025, 4, 8, 15, 47, 7), 'result': '0.04512624098783352', 'result_long': None, 'result_double': None}] Qualite : 0.04512624098783352 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22147434 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22147434_08-04-2025_15_47_08.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22147434 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_P22147434_08-04-2025_15_47_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22147437, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22147438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22147439, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22147440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22147441, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22147442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22147443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22147444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22147445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22147446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22147447, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22147448, 'pht': 3726}}" where mtr_portfolio_id = 22147434 and dashboard_run_id = 1732608 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`=22147434 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9934924, 0.04512624098783352, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22147434_08-04-2025_15_47_08.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 22147437, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22147438, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22147439, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22147440, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22147441, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22147442, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22147443, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22147444, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22147445, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22147446, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22147447, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22147448, '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 = 22148225 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': 2733121, 'mtr_portfolio_id': 22148225, 'created_at': datetime.datetime(2025, 4, 8, 15, 52, 29), 'result': '0.03259928945706682', 'result_long': None, 'result_double': None}] Qualite : 0.03259928945706682 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22148225 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148225_08-04-2025_15_52_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22148225 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_P22148225_08-04-2025_15_52_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148275, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148276, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148279, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148283, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148285, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148286, 'pht': 3726}}" where mtr_portfolio_id = 22148225 and dashboard_run_id = 1732608 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`=22148225 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9934925, 0.03259928945706682, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22148225_08-04-2025_15_52_30.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22148275, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22148276, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22148277, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22148278, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22148279, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22148280, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22148281, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22148282, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22148283, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22148284, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22148285, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22148286, '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 (22146240,22146880,22147434,22148225) result : ((1350630843,), (1350630910,), (1350630975,), (1350631062,), (1350631096,), (1350631307,), (1350631353,), (1350631368,), (1350631439,), (1350631509,), (1350632035,), (1350632164,), (1350632255,), (1350632351,), (1350632645,), (1350632670,), (1350632721,), (1350632757,), (1350632789,), (1350632826,), (1350633174,), (1350633215,), (1350633261,), (1350633334,), (1350633400,), (1350633453,), (1350633689,), (1350633755,), (1350633825,), (1350633862,), (1350634063,), (1350634102,), (1350634135,), (1350634167,), (1350634199,), (1350634301,), (1350634308,), (1350634337,), (1350634491,), (1350634556,), (1350634776,), (1350634794,), (1350634806,), (1350635265,), (1350635281,), (1350635287,), (1350635328,), (1350635418,), (1350635423,), (1350635427,), (1350635433,), (1350635462,), (1350635467,), (1350635470,), (1350635526,), (1350635504,), (1350635508,), (1350635514,), (1350635520,), (1350635555,), (1350635559,), (1350635578,), (1350635615,), (1350635866,), (1350635886,), (1350635916,), (1350635943,), (1350635974,), (1350636120,), (1350636150,), (1350636182,), (1350636217,), (1350636263,), (1350636534,), (1350636549,), (1350636553,), (1350636662,), (1350636665,), (1350636674,), (1350636685,), (1350636700,), (1350636707,), (1350636779,), (1350636784,), (1350636868,), (1350636873,), (1350636877,), (1350636884,), (1350636890,), (1350636896,), (1350637053,), (1350637086,), (1350637091,), (1350637094,), (1350637100,), (1350637107,), (1350637126,), (1350637137,), (1350637144,), (1350637176,), (1350637179,), (1350637180,), (1350637186,), (1350637194,), (1350637231,), (1350637236,), (1350637255,), (1350637362,), (1350637408,), (1350637415,), (1350637420,), (1350637426,), (1350637481,), (1350637463,), (1350637470,), (1350637476,), (1350637522,), (1350637526,), (1350637530,), (1350637537,), (1350637538,), (1350637546,), (1350637566,), (1350637570,), (1350637577,), (1350637597,), (1350637765,), (1350637799,), (1350637816,), (1350637826,), (1350637831,), (1350638025,), (1350638027,), (1350638032,), (1350638049,), (1350638062,), (1350638085,), (1350638091,), (1350638121,), (1350638147,), (1350638153,), (1350638157,), (1350638191,), (1350638194,), (1350638199,), (1350638207,), (1350638216,), (1350638475,), (1350638611,), (1350638713,), (1350639050,), (1350639059,), (1350639063,), (1350639070,), (1350639094,), (1350639101,), (1350639181,), (1350639186,), (1350639188,), (1350639196,), (1350639234,), (1350639402,), (1350639514,), (1350639552,), (1350639564,), (1350639589,), (1350639599,), (1350639665,), (1350639707,), (1350639762,), (1350639816,), (1350639848,), (1350639863,), (1350640023,), (1350640042,), (1350640114,), (1350640103,), (1350640108,), (1350640222,), (1350640314,), (1350640348,), (1350640367,), (1350640424,), (1350640438,), (1350640470,), (1350640532,), (1350640600,), (1350640626,), (1350640633,), (1350640638,), (1350640648,), (1350640751,), (1350640792,), (1350640805,), (1350640835,), (1350640857,), (1350640876,), (1350640919,), (1350640925,), (1350640943,), (1350640949,), (1350640991,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'08042025': {'nb_upload': 26, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22148225]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] map_info['map_portfolio_photo'] : {22148225: [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751, 1350640648, 1350640638, 1350640633, 1350640626, 1350640600, 1350640532, 1350640470, 1350640438, 1350640424, 1350640367, 1350640348, 1350640314, 1350640222, 1350640108, 1350640103]} final : True mtd_id 4302 list_pids : [1350640991, 1350640949, 1350640943, 1350640925, 1350640919, 1350640876, 1350640857, 1350640835, 1350640805, 1350640792, 1350640751] Looping around the photos to save general results len do output : 1 /22148225Didn'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, '2733121') ('4302', '22148225', '1350640991', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640949', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640943', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640925', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640919', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640876', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640857', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640835', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640805', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640792', None, None, None, None, None, '2733121') ('4302', None, None, None, None, None, None, None, '2733121') ('4302', '22148225', '1350640751', None, None, None, None, None, '2733121') 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', None, '22148225', 'None', None, None, None, None, '2733121'), ('4302', '22148225', '1350640991', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640949', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640943', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640925', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640919', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640876', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640857', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640835', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640805', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640792', None, None, None, None, None, '2733121'), ('4302', '22148225', '1350640751', None, None, None, None, None, '2733121')] time used for this insertion : 0.02009105682373047 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.364851713180542 time spend to save output : 0.020386219024658203 total time spend for step 5 : 0.3852379322052002 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 (2733121) 2.25user 2.10system 0:08.37elapsed 52%CPU (0avgtext+0avgdata 159972maxresident)k 240inputs+7680outputs (0major+77146minor)pagefaults 0swaps