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 : 2010897 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 (4198993) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4198993) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267192 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4198993'] with mtr_portfolio_ids : ['29267192'] and first list_photo_ids : [] new path : /proc/2010897/ Name: python3 Umask: 0002 State: R (running) Tgid: 2010897 Ngid: 0 Pid: 2010897 PPid: 2010896 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2010897 NSpid: 2010897 NSpgid: 2009276 NSsid: 2009276 VmPeak: 1113360 kB VmSize: 1113360 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 106724 kB VmRSS: 106724 kB RssAnon: 66304 kB RssFile: 40420 kB RssShmem: 0 kB VmData: 872088 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 44 nonvoluntary_ctxt_switches: 106 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2010897', 'Ngid': '0', 'Pid': '2010897', 'PPid': '2010896', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2010897', 'NSpid': '2010897', 'NSpgid': '2009276', 'NSsid': '2009276', 'VmPeak': '1113360 kB', 'VmSize': '1113360 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '106724 kB', 'VmRSS': '106724 kB', 'RssAnon': '66304 kB', 'RssFile': '40420 kB', 'RssShmem': '0 kB', 'VmData': '872088 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '44', 'nonvoluntary_ctxt_switches': '106'} ('datou_batch_current', '2010897', '1113360', '0', '1113360', '872088', '106724', b'', 'marlene', '4198993') 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_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (29267192) 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 (4198993 ) ) 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 (29267192) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1398493477, 'portfolio_id': 29267192}, {'photo_id': 1398493473, 'portfolio_id': 29267192}, {'photo_id': 1398493409, 'portfolio_id': 29267192}, {'photo_id': 1398493314, 'portfolio_id': 29267192}, {'photo_id': 1398493206, 'portfolio_id': 29267192}, {'photo_id': 1398493100, 'portfolio_id': 29267192}, {'photo_id': 1398492866, 'portfolio_id': 29267192}, {'photo_id': 1398492862, 'portfolio_id': 29267192}, {'photo_id': 1398492861, 'portfolio_id': 29267192}, {'photo_id': 1398492841, 'portfolio_id': 29267192}, {'photo_id': 1398492838, 'portfolio_id': 29267192}, {'photo_id': 1398492835, 'portfolio_id': 29267192}, {'photo_id': 1398492790, 'portfolio_id': 29267192}, {'photo_id': 1398492786, 'portfolio_id': 29267192}, {'photo_id': 1398492782, 'portfolio_id': 29267192}, {'photo_id': 1398492778, 'portfolio_id': 29267192}, {'photo_id': 1398492777, 'portfolio_id': 29267192}, {'photo_id': 1398492548, 'portfolio_id': 29267192}, {'photo_id': 1398492436, 'portfolio_id': 29267192}, {'photo_id': 1398492402, 'portfolio_id': 29267192}, {'photo_id': 1398492370, 'portfolio_id': 29267192}, {'photo_id': 1398491666, 'portfolio_id': 29267192}, {'photo_id': 1398491628, 'portfolio_id': 29267192}] map_portfolio_id_photo_id: {29267192: [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861, 1398492841, 1398492838, 1398492835, 1398492790, 1398492786, 1398492782, 1398492778, 1398492777, 1398492548, 1398492436, 1398492402, 1398492370, 1398491666, 1398491628]} ##### 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.01854562759399414 #### 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 Dec 9 14:54:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29267192) 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 : 29267192 get user id for portfolio 29267192 get sub ptf for main ptf 29267192, type 3726 and hashtags ['environnement', 'plastique', 'Carton_brun', 'Carton_gris', 'kraft', 'mal_croppe', 'autre_refus', 'Teint_Dans_La_Masse', 'papier', 'metal', 'cartonnette', 'flou'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29267192 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','plastique','Carton_brun','Carton_gris','kraft','mal_croppe','autre_refus','Teint_Dans_La_Masse','papier','metal','cartonnette','flou')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29267192 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','plastique','Carton_brun','Carton_gris','kraft','mal_croppe','autre_refus','Teint_Dans_La_Masse','papier','metal','cartonnette','flou')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 29267192, 'sub_port_id': 29267224, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913338, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'cartonnette': {'main_port_id': 29267192, 'sub_port_id': 29267225, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913339, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'Carton_brun': {'main_port_id': 29267192, 'sub_port_id': 29267226, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913340, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 29267192, 'sub_port_id': 29267227, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913341, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'environnement': {'main_port_id': 29267192, 'sub_port_id': 29267228, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913342, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'autre_refus': {'main_port_id': 29267192, 'sub_port_id': 29267229, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913343, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'papier': {'main_port_id': 29267192, 'sub_port_id': 29267230, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913344, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'plastique': {'main_port_id': 29267192, 'sub_port_id': 29267231, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913345, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'flou': {'main_port_id': 29267192, 'sub_port_id': 29267232, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913346, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'mal_croppe': {'main_port_id': 29267192, 'sub_port_id': 29267233, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913347, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'kraft': {'main_port_id': 29267192, 'sub_port_id': 29267234, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913348, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}, 'metal': {'main_port_id': 29267192, 'sub_port_id': 29267235, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913349, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29267224 , 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=29267192 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 (29267224) result : ((1398492826,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267225 , 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=29267192 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 (29267225) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267226 , 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=29267192 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 (29267226) result : ((1398492829,), (1398492897,), (1398492898,), (1398493474,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267227 , 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=29267192 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 (29267227) result : ((1398492823,), (1398492824,), (1398492825,), (1398493471,), (1398493472,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267228 , 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=29267192 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 (29267228) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267229 , 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=29267192 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 (29267229) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267230 , 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=29267192 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 (29267230) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267231 , 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=29267192 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 (29267231) result : ((1398492830,), (1398492831,), (1398492899,), (1398492900,), (1398492901,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267232 , 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=29267192 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 (29267232) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267233 , 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=29267192 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 (29267233) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267234 , 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=29267192 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 (29267234) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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 29267235 , 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=29267192 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 (29267235) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29267192) result : ((1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) 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 (1398493100) 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`=29267192 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','plastique','Carton_brun','Carton_gris','kraft','mal_croppe','autre_refus','Teint_Dans_La_Masse','papier','metal','cartonnette','flou')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=29267192 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('environnement','plastique','Carton_brun','Carton_gris','kraft','mal_croppe','autre_refus','Teint_Dans_La_Masse','papier','metal','cartonnette','flou')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 29267192, 'sub_port_id': 29267251, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913368, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'cartonnette': {'main_port_id': 29267192, 'sub_port_id': 29267252, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913369, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'Carton_brun': {'main_port_id': 29267192, 'sub_port_id': 29267253, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913370, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 29267192, 'sub_port_id': 29267255, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913371, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'environnement': {'main_port_id': 29267192, 'sub_port_id': 29267256, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913372, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'autre_refus': {'main_port_id': 29267192, 'sub_port_id': 29267257, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913373, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'papier': {'main_port_id': 29267192, 'sub_port_id': 29267258, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913374, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'plastique': {'main_port_id': 29267192, 'sub_port_id': 29267260, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913375, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'flou': {'main_port_id': 29267192, 'sub_port_id': 29267261, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913376, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'mal_croppe': {'main_port_id': 29267192, 'sub_port_id': 29267262, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913377, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'kraft': {'main_port_id': 29267192, 'sub_port_id': 29267264, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913378, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 50, 58), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}, 'metal': {'main_port_id': 29267192, 'sub_port_id': 29267265, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 19913379, 'last_updated_at': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_desc': datetime.datetime(2025, 12, 9, 14, 52, 59), 'last_updated_at_asc': datetime.datetime(2025, 12, 9, 14, 50, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267251,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267224 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267252,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267225 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267253,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267226 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267255,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267227 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267256,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267228 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267257,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267229 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267258,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267230 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267260,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267231 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267261,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267232 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267262,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267233 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267264,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267234 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29267265,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29267235 lien utilise dans velours : https://marlene.fotonower.com/velours/29267251,29267252,29267253,29267255,29267256,29267257,29267258,29267260,29267261,29267262,29267264,29267265?tags=Carton_gris,cartonnette,Carton_brun,Teint_Dans_La_Masse,environnement,autre_refus,papier,plastique,flou,mal_croppe,kraft,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29267192]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] map_info['map_portfolio_photo'] : {29267192: [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861, 1398492841, 1398492838, 1398492835, 1398492790, 1398492786, 1398492782, 1398492778, 1398492777, 1398492548, 1398492436, 1398492402, 1398492370, 1398491666, 1398491628]} final : False mtd_id 4302 list_pids : [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] Looping around the photos to save general results len do output : 1 /29267192. 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, '4198993') ('4302', '29267192', '1398493477', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493473', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493409', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493314', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493206', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493100', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492866', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492862', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492861', None, None, None, None, None, '4198993') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '29267192', "{'Carton_gris': 29267224, 'cartonnette': 29267225, 'Carton_brun': 29267226, 'Teint_Dans_La_Masse': 29267227, 'environnement': 29267228, 'autre_refus': 29267229, 'papier': 29267230, 'plastique': 29267231, 'flou': 29267232, 'mal_croppe': 29267233, 'kraft': 29267234, 'metal': 29267235}", None, None, None, None, '4198993'), ('4302', '29267192', '1398493477', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493473', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493409', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493314', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493206', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493100', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492866', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492862', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492861', None, None, None, None, None, '4198993')] time used for this insertion : 0.016313791275024414 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5235531330108643 time spend to save output : 0.016582012176513672 total time spend for step 1 : 0.5401351451873779 step2:final Tue Dec 9 14:54:59 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 (29267192) 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 29267192 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1398491666,1398491628,1398492548,1398492436,1398492402,1398492370,1398492790,1398492786,1398492782,1398492778,1398492777,1398492841,1398492838,1398492835,1398492866,1398492862,1398492861,1398493477,1398493473,1398493409,1398493314,1398493206,1398493100); 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([29267192]) Inside saveOutput : final : False verbose : True original output for save of step final : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} new output for save of step final : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] map_info['map_portfolio_photo'] : {29267192: [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861, 1398492841, 1398492838, 1398492835, 1398492790, 1398492786, 1398492782, 1398492778, 1398492777, 1398492548, 1398492436, 1398492402, 1398492370, 1398491666, 1398491628]} final : False mtd_id 4302 list_pids : [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] Looping around the photos to save general results len do output : 9 /1398493477.Didn't retrieve data . /1398493473.Didn't retrieve data . /1398493409.Didn't retrieve data . /1398493314.Didn't retrieve data . /1398493206.Didn't retrieve data . /1398493100.Didn't retrieve data . /1398492866.Didn't retrieve data . /1398492862.Didn't retrieve data . /1398492861.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, '4198993') ('4302', '29267192', '1398493477', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493473', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493409', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493314', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493206', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493100', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492866', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492862', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492861', None, None, None, None, None, '4198993') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '29267192', '1398493477', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398493473', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398493409', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398493314', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398493206', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398493100', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398492866', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398492862', '0.05587320343021789', None, None, None, None, '4198993'), ('4302', '29267192', '1398492861', '0.05587320343021789', None, None, None, None, '4198993')] time used for this insertion : 0.014591693878173828 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.08648395538330078 time spend to save output : 0.01505136489868164 total time spend for step 2 : 0.10153532028198242 step3:velours_tree Tue Dec 9 14:54:59 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 : {29267192: [{'Carton_gris': 29267224, 'cartonnette': 29267225, 'Carton_brun': 29267226, 'Teint_Dans_La_Masse': 29267227, 'environnement': 29267228, 'autre_refus': 29267229, 'papier': 29267230, 'plastique': 29267231, 'flou': 29267232, 'mal_croppe': 29267233, 'kraft': 29267234, 'metal': 29267235}]} input_args_next_step : {29267192: ()} output_args : {29267192: [{'Carton_gris': 29267224, 'cartonnette': 29267225, 'Carton_brun': 29267226, 'Teint_Dans_La_Masse': 29267227, 'environnement': 29267228, 'autre_refus': 29267229, 'papier': 29267230, 'plastique': 29267231, 'flou': 29267232, 'mal_croppe': 29267233, 'kraft': 29267234, 'metal': 29267235}]} args : 29267192 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 : ({'Carton_gris': 29267224, 'cartonnette': 29267225, 'Carton_brun': 29267226, 'Teint_Dans_La_Masse': 29267227, 'environnement': 29267228, 'autre_refus': 29267229, 'papier': 29267230, 'plastique': 29267231, 'flou': 29267232, 'mal_croppe': 29267233, 'kraft': 29267234, 'metal': 29267235},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29267192) 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([29267192]) 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.2769734859466553 time spend to save output : 5.173683166503906e-05 total time spend for step 3 : 0.2770252227783203 step4:send_mail_cod Tue Dec 9 14:54:59 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 : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} input_args_next_step : {1398493477: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398493477 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398493473 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398493409 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398493314 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398493206 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398493100 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398492866 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398492862 depend.output_id : 0 input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ()} output_args : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',)} args : 1398492861 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 : {29267192: [{'Carton_gris': 29267224, 'cartonnette': 29267225, 'Carton_brun': 29267226, 'Teint_Dans_La_Masse': 29267227, 'environnement': 29267228, 'autre_refus': 29267229, 'papier': 29267230, 'plastique': 29267231, 'flou': 29267232, 'mal_croppe': 29267233, 'kraft': 29267234, 'metal': 29267235}]} input_args_next_step : {1398493477: ('0.05587320343021789',), 1398493473: ('0.05587320343021789',), 1398493409: ('0.05587320343021789',), 1398493314: ('0.05587320343021789',), 1398493206: ('0.05587320343021789',), 1398493100: ('0.05587320343021789',), 1398492866: ('0.05587320343021789',), 1398492862: ('0.05587320343021789',), 1398492861: ('0.05587320343021789',), 29267192: ()} output_args : {29267192: [{'Carton_gris': 29267224, 'cartonnette': 29267225, 'Carton_brun': 29267226, 'Teint_Dans_La_Masse': 29267227, 'environnement': 29267228, 'autre_refus': 29267229, 'papier': 29267230, 'plastique': 29267231, 'flou': 29267232, 'mal_croppe': 29267233, 'kraft': 29267234, 'metal': 29267235}]} args : 29267192 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 :10, first value : ('0.05587320343021789',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29267192) 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_view ph WHERE photo_id IN (1398493477,1398493473,1398493409,1398493314,1398493206,1398493100,1398492866,1398492862,1398492861) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1398492861 begin to download photo : 1398492866 begin to download photo : 1398493206 begin to download photo : 1398493409 begin to download photo : 1398493477 download finish for photo 1398493206 begin to download photo : 1398493314 download finish for photo 1398493477 download finish for photo 1398492866 begin to download photo : 1398493100 download finish for photo 1398492861 begin to download photo : 1398492862 download finish for photo 1398493314 download finish for photo 1398493409 begin to download photo : 1398493473 download finish for photo 1398493100 download finish for photo 1398492862 download finish for photo 1398493473 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette292672251765288500/ imagette292672291765288500/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P29267192_09-12-2025_14_55_00.pdf 29267225 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267225 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292672251765288500 29267229 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267229 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292672291765288500 29267231 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267231 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398492830: '1765288265_3416899_1398492436_ec022bdf078b8813a89782fe3f1a0360_rle_crop_4063335354_0.png', 1398492831: '1765288265_3416899_1398492402_d97be986378ecba4aae364806e3f3ca4_rle_crop_4063335369_0.png', 1398492899: '1765288387_3422990_1398492838_dc5ceee3f20693003a93d317ad54aaa0_rle_crop_4063340707_0.png', 1398492900: '1765288387_3422990_1398492835_c80c7560124158aeaa58695ad525b529_rle_crop_4063340720_0.png', 1398492901: '1765288387_3422990_1398492835_c80c7560124158aeaa58695ad525b529_rle_crop_4063340719_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/456dd13519159980fb6dae530a484d38_23656731.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/f817f449a0c57404e694f2de3d2718e7_22067603.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/26aa2e378cb611ab1932a331a9f8a3d1_50311392.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/4522e2e744db82ab7a4d1f6058d0464a_22628730.png change filename to text .imagette292672311765288500/ imagette292672311765288500/1765288387_3422990_1398492835_c80c7560124158aeaa58695ad525b529_rle_crop_4063340719_0.png.png imagette292672311765288500/1765288265_3416899_1398492402_d97be986378ecba4aae364806e3f3ca4_rle_crop_4063335369_0.png.png imagette292672311765288500/1765288265_3416899_1398492436_ec022bdf078b8813a89782fe3f1a0360_rle_crop_4063335354_0.png.png imagette292672311765288500/1765288387_3422990_1398492838_dc5ceee3f20693003a93d317ad54aaa0_rle_crop_4063340707_0.png.png imagette292672311765288500/1765288387_3422990_1398492835_c80c7560124158aeaa58695ad525b529_rle_crop_4063340720_0.png.png imagette292672321765288500/ imagette292672331765288500/ imagette292672341765288500/ imagette292672351765288500/ wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/66ef6844b6767ee1fb0abb89f6b39c66_80881309.png imagette292672311765288500 29267232 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267232 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292672321765288500 29267233 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267233 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292672331765288500 29267234 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267234 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292672341765288500 29267235 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267235 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette292672351765288500 29267224 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267224 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398492826: '1765288265_3416899_1398492370_ee6eb6fa0afc53d61ec6c871f4c3fb43_rle_crop_4063335378_0.png'} change filename to text .imagette292672241765288500/ imagette292672241765288500/1765288265_3416899_1398492370_ee6eb6fa0afc53d61ec6c871f4c3fb43_rle_crop_4063335378_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/715e0972e5dbb070894128dfe6d68a62_50882622.png imagette292672241765288500 29267226 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267226 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398492829: '1765288265_3416899_1398492370_ee6eb6fa0afc53d61ec6c871f4c3fb43_rle_crop_4063335383_0.png', 1398492897: '1765288387_3422990_1398492838_dc5ceee3f20693003a93d317ad54aaa0_rle_crop_4063340710_0.png', 1398492898: '1765288387_3422990_1398492835_c80c7560124158aeaa58695ad525b529_rle_crop_4063340718_0.png', 1398493474: '1765288407_3423440_1398492778_a143d2bb84bd4ce13d9d4686b95b633a_rle_crop_4063340826_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/80e10a21af1f7cca6ec3f0fce3552026_66148998.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/7497998b3a714774e41ad07c317594a8_81274792.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/eff163bad2ec44af7b5b33b0bd889e8a_90393803.png change filename to text .imagette292672261765288500/ imagette292672261765288500/1765288407_3423440_1398492778_a143d2bb84bd4ce13d9d4686b95b633a_rle_crop_4063340826_0.png.png imagette292672261765288500/1765288387_3422990_1398492838_dc5ceee3f20693003a93d317ad54aaa0_rle_crop_4063340710_0.png.png imagette292672261765288500/1765288265_3416899_1398492370_ee6eb6fa0afc53d61ec6c871f4c3fb43_rle_crop_4063335383_0.png.png imagette292672261765288500/1765288387_3422990_1398492835_c80c7560124158aeaa58695ad525b529_rle_crop_4063340718_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/19f872ed8b5794fa31ec85d3fcf975c8_51629264.png imagette292672261765288500 29267227 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267227 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1398492823: '1765288265_3416899_1398492436_ec022bdf078b8813a89782fe3f1a0360_rle_crop_4063335356_0.png', 1398492824: '1765288265_3416899_1398492402_d97be986378ecba4aae364806e3f3ca4_rle_crop_4063335366_0.png', 1398492825: '1765288265_3416899_1398492402_d97be986378ecba4aae364806e3f3ca4_rle_crop_4063335367_0.png', 1398493471: '1765288407_3423440_1398492786_96a78a406f6c05129d45ef3050c34337_rle_crop_4063340813_0.png', 1398493472: '1765288407_3423440_1398492782_6cd3b47d977b96e48a794e52f00589d6_rle_crop_4063340818_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/fb69d43e2c1335c138d8c56a8092012e_71898851.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/aa42b1858afa4769d5561acfc0c7b0c3_54903839.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/d85f8abc4674331320258f73e6e8d5e5_92368326.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/fd806699340af10797c44e65dea52027_5289067.png change filename to text .imagette292672271765288501/ imagette292672271765288501/1765288407_3423440_1398492782_6cd3b47d977b96e48a794e52f00589d6_rle_crop_4063340818_0.png.png imagette292672271765288501/1765288265_3416899_1398492402_d97be986378ecba4aae364806e3f3ca4_rle_crop_4063335367_0.png.png imagette292672271765288501/1765288265_3416899_1398492436_ec022bdf078b8813a89782fe3f1a0360_rle_crop_4063335356_0.png.png imagette292672271765288501/1765288407_3423440_1398492786_96a78a406f6c05129d45ef3050c34337_rle_crop_4063340813_0.png.png imagette292672271765288501/1765288265_3416899_1398492402_d97be986378ecba4aae364806e3f3ca4_rle_crop_4063335366_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/00096edbb38771201b61cbe1cd97b2a8_84096649.png imagette292672271765288501 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29267192 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29267251,29267252,29267253,29267255,29267256,29267257,29267258,29267260,29267261,29267262,29267264,29267265?tags=Carton_gris,cartonnette,Carton_brun,Teint_Dans_La_Masse,environnement,autre_refus,papier,plastique,flou,mal_croppe,kraft,metal your option no_mail is active, we will not send the real mail to your client args[1398493477] : ('0.05587320343021789',) no score found for photo 1398493477 We are sending mail with results at report@fotonower.com args[1398493473] : ('0.05587320343021789',) no score found for photo 1398493473 We are sending mail with results at report@fotonower.com args[1398493409] : ('0.05587320343021789',) no score found for photo 1398493409 We are sending mail with results at report@fotonower.com args[1398493314] : ('0.05587320343021789',) no score found for photo 1398493314 We are sending mail with results at report@fotonower.com args[1398493206] : ('0.05587320343021789',) no score found for photo 1398493206 We are sending mail with results at report@fotonower.com args[1398493100] : ('0.05587320343021789',) no score found for photo 1398493100 We are sending mail with results at report@fotonower.com args[1398492866] : ('0.05587320343021789',) no score found for photo 1398492866 We are sending mail with results at report@fotonower.com args[1398492862] : ('0.05587320343021789',) no score found for photo 1398492862 We are sending mail with results at report@fotonower.com args[1398492861] : ('0.05587320343021789',) no score found for photo 1398492861 We are sending mail with results at report@fotonower.com refus_total : 0.05587320343021789 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267192 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_P29267192_09-12-2025_14_55_00.pdf results_Auto_P29267192_09-12-2025_14_55_00.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29267192_09-12-2025_14_55_00.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','29267192','results_Auto_P29267192_09-12-2025_14_55_00.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29267192_09-12-2025_14_55_00.pdf','pdf','','0.13','0.05587320343021789') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29267192]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] map_info['map_portfolio_photo'] : {29267192: [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861, 1398492841, 1398492838, 1398492835, 1398492790, 1398492786, 1398492782, 1398492778, 1398492777, 1398492548, 1398492436, 1398492402, 1398492370, 1398491666, 1398491628]} final : False mtd_id 4302 list_pids : [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] 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, '4198993') ('4302', '29267192', '1398493477', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493473', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493409', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493314', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493206', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493100', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492866', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492862', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492861', None, None, None, None, None, '4198993') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 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', '29267192', '1398493477', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493473', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493409', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493314', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493206', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493100', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492866', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492862', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492861', None, None, None, None, None, '4198993')] time used for this insertion : 0.013747692108154297 save_final save missing photos in datou_result : time spend for datou_step_exec : 3.480825901031494 time spend to save output : 0.013977527618408203 total time spend for step 4 : 3.4948034286499023 step5:split_time_score Tue Dec 9 14:55:03 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 : ['29267192'] 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 : [('29267192',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29267192) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1398493477: {'path': 'temp/1765288499_2010897_1398493477_8394c445615e432cab78f455bf4a0d5a.jpg', 'extension': 'jpg'}, 1398493206: {'path': 'temp/1765288499_2010897_1398493206_871277f5d35be320bb6907678fcdae9b.jpg', 'extension': 'jpg'}, 1398493314: {'path': 'temp/1765288499_2010897_1398493314_15fd8240692474adbc392c956a66c4db.jpg', 'extension': 'jpg'}, 1398492866: {'path': 'temp/1765288499_2010897_1398492866_8281904018d2d7fee1bc387599766a3b.jpg', 'extension': 'jpg'}, 1398493100: {'path': 'temp/1765288499_2010897_1398493100_acd3689b7b5d839ccbab1f6b3e6c3e9d.jpg', 'extension': 'jpg'}, 1398492861: {'path': 'temp/1765288499_2010897_1398492861_9e2c910842d16e985b6fff09833898dc.jpg', 'extension': 'jpg'}, 1398492862: {'path': 'temp/1765288499_2010897_1398492862_cfa03970e6cbce6b8eb8bafaafc52da7.jpg', 'extension': 'jpg'}, 1398493409: {'path': 'temp/1765288499_2010897_1398493409_951827f33a7ab11eb59e31a38379d22a.jpg', 'extension': 'jpg'}, 1398493473: {'path': 'temp/1765288499_2010897_1398493473_058eee4075cc5943e7a340bc300283bc.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 = 29267192; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29267192 group by h (('14', 23),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=29267192 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 (29267192) 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 (29267192) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 09122025 29267192 Nombre de photos uploadées : 23 / 23040 (0%) 09122025 29267192 Nombre de photos taguées (types de déchets): 0 / 23 (0%) 09122025 29267192 Nombre de photos taguées (volume) : 0 / 23 (0%) [{'photo_id': 1398491666, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/648c600e218057fab8dc10ca7b5a749d.jpg', 'username': None, 'uploaded_at': 1765288122, 'text': 'image_09122025_14_45_44_10135.jpg'}, {'photo_id': 1398491628, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/ad31ace11b6a0777572f82a2197c3eb5.jpg', 'username': None, 'uploaded_at': 1765288122, 'text': 'image_09122025_14_47_05_010143m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1398492548, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/da7ba706f72f149db848d85920c45fc9.jpg', 'username': None, 'uploaded_at': 1765288157, 'text': 'image_09122025_14_47_54_010136m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1398492436, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/9/ec022bdf078b8813a89782fe3f1a0360.jpg', 'username': None, 'uploaded_at': 1765288157, 'text': 'image_09122025_14_48_04_010148m0.jpg 3.0000000000000004e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 9.059906005859375e-06 ??????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001241445541381836 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 29267192, '2025-12-09' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-12-09' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2709875,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.2407057285308838 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= 2709875 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2709875, 'dashboard_run_id': 2716925, 'mtr_portfolio_id': 29266334, 'dashboard_result_id': 18168194, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': ''}"}, {'dashboat_entry_day': 2709875, 'dashboard_run_id': 2716925, 'mtr_portfolio_id': 29266335, 'dashboard_result_id': 18168195, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0, 'url_report': ''}"}, {'dashboat_entry_day': 2709875, 'dashboard_run_id': 2716925, 'mtr_portfolio_id': 29266336, 'dashboard_result_id': 18168196, '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_P29266336_09-12-2025_14_00_04.pdf'}"}, {'dashboat_entry_day': 2709875, 'dashboard_run_id': 2716925, 'mtr_portfolio_id': 29266607, 'dashboard_result_id': 18168197, '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_P29266607_09-12-2025_14_33_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29266616, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29266617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29266618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29266619, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29266620, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29266621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29266622, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29266623, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29266624, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29266625, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29266626, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29266627, 'pht': 3726}}"}, {'dashboat_entry_day': 2709875, 'dashboard_run_id': 2716925, 'mtr_portfolio_id': 29267192, 'dashboard_result_id': 18168198, '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_P29267192_09-12-2025_14_52_59.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29267224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29267225, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29267226, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29267227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29267228, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29267229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29267230, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29267231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29267232, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29267233, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29267234, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29267235, '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 = 29266334 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 29266334 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29266334 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266334 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266334 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29266334 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29266334_09-12-2025_14_01_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29266334 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_P29266334_09-12-2025_14_01_02.pdf'}" where mtr_portfolio_id = 29266334 and dashboard_run_id = 2716925 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 = 29266335 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 29266335 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29266335 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266335 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266335 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29266335 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29266335_09-12-2025_14_00_33.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29266335 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_P29266335_09-12-2025_14_00_33.pdf'}" where mtr_portfolio_id = 29266335 and dashboard_run_id = 2716925 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 = 29266336 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 29266336 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29266336 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266336 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266336 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29266336 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29266336_09-12-2025_14_00_04.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29266336 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_P29266336_09-12-2025_14_00_04.pdf'}" where mtr_portfolio_id = 29266336 and dashboard_run_id = 2716925 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 = 29266607 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 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 = 29266607 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 29266607 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266607 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29266607 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29266607 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29266607_09-12-2025_14_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29266607 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_P29266607_09-12-2025_14_33_01.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29266616, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29266617, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29266618, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29266619, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29266620, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29266621, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29266622, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29266623, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29266624, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29266625, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29266626, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29266627, 'pht': 3726}}" where mtr_portfolio_id = 29266607 and dashboard_run_id = 2716927 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 = 29267192 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': 4198993, 'mtr_portfolio_id': 29267192, 'created_at': datetime.datetime(2025, 12, 9, 14, 54, 59), 'result': '0.05587320343021789', 'result_long': None, 'result_double': None}] Qualite : 0.05587320343021789 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29267192 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29267192_09-12-2025_14_55_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29267192 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_P29267192_09-12-2025_14_55_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29267224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29267225, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29267226, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29267227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29267228, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29267229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29267230, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29267231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29267232, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29267233, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29267234, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29267235, 'pht': 3726}}" where mtr_portfolio_id = 29267192 and dashboard_run_id = 2716927 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`=29267192 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18168198, 0.05587320343021789, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29267192_09-12-2025_14_55_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29267224, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29267225, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29267226, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29267227, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29267228, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29267229, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29267230, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29267231, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29267232, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29267233, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29267234, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29267235, '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 (29266334,29266335,29266336,29266607,29267192) result : ((1398478389,), (1398478392,), (1398478395,), (1398478404,), (1398478406,), (1398478408,), (1398478411,), (1398478413,), (1398478415,), (1398478421,), (1398478422,), (1398478425,), (1398478426,), (1398478429,), (1398478430,), (1398478433,), (1398478434,), (1398478438,), (1398478439,), (1398478442,), (1398478443,), (1398478457,), (1398478492,), (1398478526,), (1398478560,), (1398478593,), (1398478627,), (1398478793,), (1398478869,), (1398478936,), (1398478975,), (1398479014,), (1398479050,), (1398478115,), (1398478116,), (1398478118,), (1398478120,), (1398478126,), (1398478128,), (1398478132,), (1398478137,), (1398478142,), (1398478146,), (1398478154,), (1398478156,), (1398478158,), (1398478161,), (1398478164,), (1398478166,), (1398478174,), (1398478177,), (1398478181,), (1398478185,), (1398478190,), (1398478194,), (1398478201,), (1398478203,), (1398478205,), (1398478208,), (1398478212,), (1398478216,), (1398478222,), (1398478225,), (1398478227,), (1398478229,), (1398478231,), (1398478234,), (1398478247,), (1398478250,), (1398478254,), (1398478257,), (1398478261,), (1398478264,), (1398478268,), (1398478271,), (1398478274,), (1398478277,), (1398478280,), (1398478284,), (1398478294,), (1398478298,), (1398478301,), (1398478303,), (1398478308,), (1398478311,), (1398478320,), (1398478323,), (1398478327,), (1398478332,), (1398478335,), (1398478338,), (1398478344,), (1398478346,), (1398478349,), (1398478352,), (1398478355,), (1398478358,), (1398478367,), (1398478370,), (1398478372,), (1398478373,), (1398478375,), (1398478377,), (1398478381,), (1398478383,), (1398478386,), (1398477880,), (1398477881,), (1398477883,), (1398477892,), (1398477895,), (1398477899,), (1398477903,), (1398477905,), (1398477906,), (1398477907,), (1398477909,), (1398477911,), (1398477915,), (1398477919,), (1398477922,), (1398477934,), (1398477936,), (1398477938,), (1398477939,), (1398477940,), (1398477943,), (1398477954,), (1398477957,), (1398477959,), (1398477962,), (1398477965,), (1398477968,), (1398477985,), (1398477987,), (1398477991,), (1398477994,), (1398477998,), (1398478002,), (1398478010,), (1398478012,), (1398478014,), (1398478016,), (1398478019,), (1398478022,), (1398478042,), (1398478044,), (1398478046,), (1398478048,), (1398478051,), (1398478053,), (1398478063,), (1398478067,), (1398478070,), (1398478073,), (1398478077,), (1398478079,), (1398478087,), (1398478089,), (1398478092,), (1398478095,), (1398478097,), (1398478101,), (1398478109,), (1398478111,), (1398480932,), (1398481076,), (1398491628,), (1398491666,), (1398492370,), (1398492402,), (1398492436,), (1398492548,), (1398492777,), (1398492778,), (1398492782,), (1398492786,), (1398492790,), (1398492835,), (1398492838,), (1398492841,), (1398492861,), (1398492862,), (1398492866,), (1398493100,), (1398493206,), (1398493314,), (1398493409,), (1398493473,), (1398493477,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'09122025': {'nb_upload': 23, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29267192]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] map_info['map_portfolio_photo'] : {29267192: [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861, 1398492841, 1398492838, 1398492835, 1398492790, 1398492786, 1398492782, 1398492778, 1398492777, 1398492548, 1398492436, 1398492402, 1398492370, 1398491666, 1398491628]} final : True mtd_id 4302 list_pids : [1398493477, 1398493473, 1398493409, 1398493314, 1398493206, 1398493100, 1398492866, 1398492862, 1398492861] Looping around the photos to save general results len do output : 1 /29267192Didn'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, '4198993') ('4302', '29267192', '1398493477', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493473', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493409', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493314', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493206', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398493100', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492866', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492862', None, None, None, None, None, '4198993') ('4302', None, None, None, None, None, None, None, '4198993') ('4302', '29267192', '1398492861', None, None, None, None, None, '4198993') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '29267192', 'None', None, None, None, None, '4198993'), ('4302', '29267192', '1398493477', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493473', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493409', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493314', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493206', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398493100', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492866', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492862', None, None, None, None, None, '4198993'), ('4302', '29267192', '1398492861', None, None, None, None, None, '4198993')] time used for this insertion : 0.01488637924194336 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5827052593231201 time spend to save output : 0.015201568603515625 total time spend for step 5 : 0.5979068279266357 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 (4198993) 2.12user 2.43system 0:08.87elapsed 51%CPU (0avgtext+0avgdata 168660maxresident)k 312inputs+7424outputs (23major+67365minor)pagefaults 0swaps