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 : 4068214 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 (4281826) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (4281826) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760415 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['4281826'] with mtr_portfolio_ids : ['29760415'] and first list_photo_ids : [] new path : /proc/4068214/ Name: python3 Umask: 0002 State: R (running) Tgid: 4068214 Ngid: 0 Pid: 4068214 PPid: 4068213 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4068214 NSpid: 4068214 NSpgid: 4066764 NSsid: 4066764 VmPeak: 1113364 kB VmSize: 1113364 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 105328 kB VmRSS: 105328 kB RssAnon: 66292 kB RssFile: 39036 kB RssShmem: 0 kB VmData: 872092 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130476 kB VmPTE: 608 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: 41 nonvoluntary_ctxt_switches: 94 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4068214', 'Ngid': '0', 'Pid': '4068214', 'PPid': '4068213', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4068214', 'NSpid': '4068214', 'NSpgid': '4066764', 'NSsid': '4066764', 'VmPeak': '1113364 kB', 'VmSize': '1113364 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '105328 kB', 'VmRSS': '105328 kB', 'RssAnon': '66292 kB', 'RssFile': '39036 kB', 'RssShmem': '0 kB', 'VmData': '872092 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130476 kB', 'VmPTE': '608 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': '41', 'nonvoluntary_ctxt_switches': '94'} ('datou_batch_current', '4068214', '1113364', '0', '1113364', '872092', '105328', b'', 'marlene', '4281826') 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 (29760415) 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 (4281826 ) ) 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 (29760415) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1401478628, 'portfolio_id': 29760415}, {'photo_id': 1401478627, 'portfolio_id': 29760415}, {'photo_id': 1401478626, 'portfolio_id': 29760415}, {'photo_id': 1401478624, 'portfolio_id': 29760415}, {'photo_id': 1401478600, 'portfolio_id': 29760415}, {'photo_id': 1401478599, 'portfolio_id': 29760415}, {'photo_id': 1401478598, 'portfolio_id': 29760415}, {'photo_id': 1401478596, 'portfolio_id': 29760415}, {'photo_id': 1401478588, 'portfolio_id': 29760415}, {'photo_id': 1401478585, 'portfolio_id': 29760415}, {'photo_id': 1401478583, 'portfolio_id': 29760415}, {'photo_id': 1401478581, 'portfolio_id': 29760415}, {'photo_id': 1401478579, 'portfolio_id': 29760415}, {'photo_id': 1401478578, 'portfolio_id': 29760415}, {'photo_id': 1401478571, 'portfolio_id': 29760415}, {'photo_id': 1401478569, 'portfolio_id': 29760415}, {'photo_id': 1401478568, 'portfolio_id': 29760415}, {'photo_id': 1401478561, 'portfolio_id': 29760415}, {'photo_id': 1401478552, 'portfolio_id': 29760415}, {'photo_id': 1401478549, 'portfolio_id': 29760415}, {'photo_id': 1401478546, 'portfolio_id': 29760415}, {'photo_id': 1401478543, 'portfolio_id': 29760415}, {'photo_id': 1401478541, 'portfolio_id': 29760415}, {'photo_id': 1401478525, 'portfolio_id': 29760415}, {'photo_id': 1401478522, 'portfolio_id': 29760415}, {'photo_id': 1401478520, 'portfolio_id': 29760415}, {'photo_id': 1401478518, 'portfolio_id': 29760415}, {'photo_id': 1401478517, 'portfolio_id': 29760415}, {'photo_id': 1401478514, 'portfolio_id': 29760415}, {'photo_id': 1401478495, 'portfolio_id': 29760415}, {'photo_id': 1401478494, 'portfolio_id': 29760415}, {'photo_id': 1401478493, 'portfolio_id': 29760415}] map_portfolio_id_photo_id: {29760415: [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} ##### 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.018099069595336914 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Dec 29 05:36:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29760415) 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 : 29760415 get user id for portfolio 29760415 get sub ptf for main ptf 29760415, type 3726 and hashtags ['Teint_Dans_La_Masse', 'Carton_gris', 'autre_refus', 'kraft', 'Carton_brun', 'papier', 'mal_croppe', 'plastique', 'flou', 'cartonnette', 'metal', 'environnement'] 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`=29760415 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','autre_refus','kraft','Carton_brun','papier','mal_croppe','plastique','flou','cartonnette','metal','environnement')) 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`=29760415 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','autre_refus','kraft','Carton_brun','papier','mal_croppe','plastique','flou','cartonnette','metal','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 29760415, 'sub_port_id': 29760420, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342419, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'autre_refus': {'main_port_id': 29760415, 'sub_port_id': 29760421, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342420, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'Carton_brun': {'main_port_id': 29760415, 'sub_port_id': 29760422, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342421, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'kraft': {'main_port_id': 29760415, 'sub_port_id': 29760423, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342422, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'environnement': {'main_port_id': 29760415, 'sub_port_id': 29760424, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342423, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 29760415, 'sub_port_id': 29760425, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342424, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'papier': {'main_port_id': 29760415, 'sub_port_id': 29760426, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342425, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'plastique': {'main_port_id': 29760415, 'sub_port_id': 29760427, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342426, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'metal': {'main_port_id': 29760415, 'sub_port_id': 29760428, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342427, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'flou': {'main_port_id': 29760415, 'sub_port_id': 29760429, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342428, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'Carton_gris': {'main_port_id': 29760415, 'sub_port_id': 29760430, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342429, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}, 'mal_croppe': {'main_port_id': 29760415, 'sub_port_id': 29760431, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342430, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 29760420 , 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=29760415 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 (29760420) result : ((1401478617,), (1401478618,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760421 , 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=29760415 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 (29760421) result : ((1401478615,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760422 , 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=29760415 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 (29760422) result : ((1401478620,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760423 , 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=29760415 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 (29760423) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760424 , 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=29760415 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 (29760424) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760425 , 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=29760415 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 (29760425) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760426 , 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=29760415 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 (29760426) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760427 , 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=29760415 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 (29760427) result : ((1401478567,), (1401478621,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760428 , 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=29760415 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 (29760428) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760429 , 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=29760415 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 (29760429) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760430 , 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=29760415 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 (29760430) result : ((1401478565,), (1401478566,), (1401478616,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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 29760431 , 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=29760415 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 (29760431) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (29760415) result : ((1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) 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 (1401478600) 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`=29760415 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','autre_refus','kraft','Carton_brun','papier','mal_croppe','plastique','flou','cartonnette','metal','environnement')) 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`=29760415 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','autre_refus','kraft','Carton_brun','papier','mal_croppe','plastique','flou','cartonnette','metal','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'cartonnette': {'main_port_id': 29760415, 'sub_port_id': 29760432, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342431, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'autre_refus': {'main_port_id': 29760415, 'sub_port_id': 29760433, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342432, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'Carton_brun': {'main_port_id': 29760415, 'sub_port_id': 29760434, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342433, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'kraft': {'main_port_id': 29760415, 'sub_port_id': 29760435, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342434, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'environnement': {'main_port_id': 29760415, 'sub_port_id': 29760436, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342435, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 29760415, 'sub_port_id': 29760437, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342436, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'papier': {'main_port_id': 29760415, 'sub_port_id': 29760438, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342437, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'plastique': {'main_port_id': 29760415, 'sub_port_id': 29760439, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342438, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'metal': {'main_port_id': 29760415, 'sub_port_id': 29760440, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342439, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'flou': {'main_port_id': 29760415, 'sub_port_id': 29760441, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342440, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'Carton_gris': {'main_port_id': 29760415, 'sub_port_id': 29760442, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342441, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 33, 29), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}, 'mal_croppe': {'main_port_id': 29760415, 'sub_port_id': 29760443, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 20342442, 'last_updated_at': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_desc': datetime.datetime(2025, 12, 29, 5, 34, 30), 'last_updated_at_asc': datetime.datetime(2025, 12, 29, 5, 33, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760432,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760420 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760433,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760421 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760434,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760422 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760435,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760423 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760436,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760424 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760437,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760425 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760438,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760426 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760439,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760427 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760440,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760428 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760441,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760429 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760442,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760430 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 29760443,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 29760431 lien utilise dans velours : https://marlene.fotonower.com/velours/29760432,29760433,29760434,29760435,29760436,29760437,29760438,29760439,29760440,29760441,29760442,29760443?tags=cartonnette,autre_refus,Carton_brun,kraft,environnement,Teint_Dans_La_Masse,papier,plastique,metal,flou,Carton_gris,mal_croppe After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29760415]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] map_info['map_portfolio_photo'] : {29760415: [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : False mtd_id 4302 list_pids : [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] Looping around the photos to save general results len do output : 1 /29760415. 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, '4281826') ('4302', '29760415', '1401478628', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478627', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478626', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478624', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478600', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478599', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478598', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478596', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478588', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478585', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478583', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478581', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478579', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478578', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '29760415', "{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}", None, None, None, None, '4281826'), ('4302', '29760415', '1401478628', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478627', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478626', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478624', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478600', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478599', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478598', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478596', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478588', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478585', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478583', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478581', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478579', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478578', None, None, None, None, None, '4281826')] time used for this insertion : 0.016811370849609375 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5317642688751221 time spend to save output : 0.0170900821685791 total time spend for step 1 : 0.5488543510437012 step2:final Mon Dec 29 05:36:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! 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 (29760415) 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 29760415 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1401478495,1401478494,1401478493,1401478571,1401478525,1401478569,1401478522,1401478568,1401478520,1401478518,1401478561,1401478552,1401478517,1401478514,1401478549,1401478546,1401478543,1401478541,1401478588,1401478585,1401478583,1401478581,1401478579,1401478578,1401478600,1401478599,1401478598,1401478596,1401478628,1401478627,1401478626,1401478624); 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([29760415]) Inside saveOutput : final : False verbose : True original output for save of step final : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} new output for save of step final : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] map_info['map_portfolio_photo'] : {29760415: [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : False mtd_id 4302 list_pids : [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] Looping around the photos to save general results len do output : 14 /1401478628.Didn't retrieve data . /1401478627.Didn't retrieve data . /1401478626.Didn't retrieve data . /1401478624.Didn't retrieve data . /1401478600.Didn't retrieve data . /1401478599.Didn't retrieve data . /1401478598.Didn't retrieve data . /1401478596.Didn't retrieve data . /1401478588.Didn't retrieve data . /1401478585.Didn't retrieve data . /1401478583.Didn't retrieve data . /1401478581.Didn't retrieve data . /1401478579.Didn't retrieve data . /1401478578.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, '4281826') ('4302', '29760415', '1401478628', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478627', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478626', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478624', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478600', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478599', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478598', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478596', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478588', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478585', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478583', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478581', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478579', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478578', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '29760415', '1401478628', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478627', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478626', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478624', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478600', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478599', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478598', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478596', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478588', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478585', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478583', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478581', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478579', '0.08952243390675929', None, None, None, None, '4281826'), ('4302', '29760415', '1401478578', '0.08952243390675929', None, None, None, None, '4281826')] time used for this insertion : 0.015294551849365234 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07686185836791992 time spend to save output : 0.01593327522277832 total time spend for step 2 : 0.09279513359069824 step3:velours_tree Mon Dec 29 05:36:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} input_args_next_step : {29760415: ()} output_args : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} args : 29760415 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29760415) 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([29760415]) 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.24137639999389648 time spend to save output : 3.933906555175781e-05 total time spend for step 3 : 0.24141573905944824 step4:send_mail_cod Mon Dec 29 05:36:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} input_args_next_step : {1401478628: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478628 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478627 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478626 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478624 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478600 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478599 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478598 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478596 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478588 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478585 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478583 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478581 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478579 depend.output_id : 0 input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ()} output_args : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',)} args : 1401478578 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 : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} input_args_next_step : {1401478628: ('0.08952243390675929',), 1401478627: ('0.08952243390675929',), 1401478626: ('0.08952243390675929',), 1401478624: ('0.08952243390675929',), 1401478600: ('0.08952243390675929',), 1401478599: ('0.08952243390675929',), 1401478598: ('0.08952243390675929',), 1401478596: ('0.08952243390675929',), 1401478588: ('0.08952243390675929',), 1401478585: ('0.08952243390675929',), 1401478583: ('0.08952243390675929',), 1401478581: ('0.08952243390675929',), 1401478579: ('0.08952243390675929',), 1401478578: ('0.08952243390675929',), 29760415: ()} output_args : {29760415: [{'cartonnette': 29760420, 'autre_refus': 29760421, 'Carton_brun': 29760422, 'kraft': 29760423, 'environnement': 29760424, 'Teint_Dans_La_Masse': 29760425, 'papier': 29760426, 'plastique': 29760427, 'metal': 29760428, 'flou': 29760429, 'Carton_gris': 29760430, 'mal_croppe': 29760431}]} args : 29760415 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 :15, first value : ('0.08952243390675929',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29760415) 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 (1401478628,1401478627,1401478626,1401478624,1401478600,1401478599,1401478598,1401478596,1401478588,1401478585,1401478583,1401478581,1401478579,1401478578) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1401478578 begin to download photo : 1401478583 begin to download photo : 1401478596 begin to download photo : 1401478600 begin to download photo : 1401478627 download finish for photo 1401478596 begin to download photo : 1401478598 download finish for photo 1401478627 begin to download photo : 1401478628 download finish for photo 1401478578 begin to download photo : 1401478579 download finish for photo 1401478583 begin to download photo : 1401478585 download finish for photo 1401478600 begin to download photo : 1401478624 download finish for photo 1401478598 begin to download photo : 1401478599 download finish for photo 1401478624 begin to download photo : 1401478626 download finish for photo 1401478628 download finish for photo 1401478579 begin to download photo : 1401478581 download finish for photo 1401478585 begin to download photo : 1401478588 download finish for photo 1401478599 download finish for photo 1401478581 download finish for photo 1401478626 download finish for photo 1401478588 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P29760415_29-12-2025_05_36_58.pdf 29760420 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=29760420 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478617: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253308_0.png', 1401478618: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253309_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/df78fc45b46cdbfaa77e9a13b5c2ba1a_53452567.png change filename to text .imagette297604201766983018/ imagette297604201766983018/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253309_0.png.png imagette297604201766983018/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253308_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/60da47be0625ea165305165126691612_74649658.png imagette297604201766983018 29760421 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=29760421 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478615: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253306_0.png'} change filename to text .imagette297604211766983018/ imagette297604211766983018/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253306_0.png.png imagette297604231766983018/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/5e1d62d7e7f16c83a25f08b640e6a709_86055860.png imagette297604211766983018 29760423 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=29760423 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604231766983018 29760427 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=29760427 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478567: '1766982805_2644486_1401478493_422c28e3f476776b7e95d81f5dd63681_rle_crop_4084253228_0.png', 1401478621: '1766982927_2650130_1401478543_79c2e8d3e588c61e0c7a82e478862534_rle_crop_4084253320_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/6a9a198688b0f6041e2bd714447bf580_62869455.png change filename to text .imagette297604271766983018/ imagette297604271766983018/1766982805_2644486_1401478493_422c28e3f476776b7e95d81f5dd63681_rle_crop_4084253228_0.png.png imagette297604271766983018/1766982927_2650130_1401478543_79c2e8d3e588c61e0c7a82e478862534_rle_crop_4084253320_0.png.png imagette297604281766983018/ imagette297604291766983018/ imagette297604311766983018/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/894c6dc15d066e02d8486aa5c6260804_73047359.png imagette297604271766983018 29760428 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=29760428 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604281766983018 29760429 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=29760429 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604291766983018 29760431 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=29760431 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604311766983018 29760422 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=29760422 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478620: '1766982927_2650130_1401478541_f39d3a2053e818d392baea81494e8faa_rle_crop_4084253334_0.png'} change filename to text .imagette297604221766983018/ imagette297604221766983018/1766982927_2650130_1401478541_f39d3a2053e818d392baea81494e8faa_rle_crop_4084253334_0.png.png imagette297604251766983018/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/c4b30862e34b82f1625afe9ee7e46681_95858900.png imagette297604221766983018 29760425 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=29760425 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette297604251766983018 29760430 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=29760430 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1401478565: '1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253215_0.png', 1401478566: '1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253213_0.png', 1401478616: '1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253312_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/45e7ed6bc5ba3fa3fc51dfc95b566cf3_45886978.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/5a5249a218243a3eb2f7e59b13879935_25538983.png change filename to text .imagette297604301766983018/ imagette297604301766983018/1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253215_0.png.png imagette297604301766983018/1766982927_2650130_1401478546_0635cfb9de501414e14f85ccc14848da_rle_crop_4084253312_0.png.png imagette297604301766983018/1766982805_2644486_1401478494_2fc4863acef26caaf13c9fd8636dd498_rle_crop_4084253213_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/c28f53f466217598b20f89311f972d67_97990490.png imagette297604301766983018 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=29760415 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/29760432,29760433,29760434,29760435,29760436,29760437,29760438,29760439,29760440,29760441,29760442,29760443?tags=cartonnette,autre_refus,Carton_brun,kraft,environnement,Teint_Dans_La_Masse,papier,plastique,metal,flou,Carton_gris,mal_croppe your option no_mail is active, we will not send the real mail to your client args[1401478628] : ('0.08952243390675929',) no score found for photo 1401478628 We are sending mail with results at report@fotonower.com args[1401478627] : ('0.08952243390675929',) no score found for photo 1401478627 We are sending mail with results at report@fotonower.com args[1401478626] : ('0.08952243390675929',) no score found for photo 1401478626 We are sending mail with results at report@fotonower.com args[1401478624] : ('0.08952243390675929',) no score found for photo 1401478624 We are sending mail with results at report@fotonower.com args[1401478600] : ('0.08952243390675929',) no score found for photo 1401478600 We are sending mail with results at report@fotonower.com args[1401478599] : ('0.08952243390675929',) no score found for photo 1401478599 We are sending mail with results at report@fotonower.com args[1401478598] : ('0.08952243390675929',) no score found for photo 1401478598 We are sending mail with results at report@fotonower.com args[1401478596] : ('0.08952243390675929',) no score found for photo 1401478596 We are sending mail with results at report@fotonower.com args[1401478588] : ('0.08952243390675929',) no score found for photo 1401478588 We are sending mail with results at report@fotonower.com args[1401478585] : ('0.08952243390675929',) no score found for photo 1401478585 We are sending mail with results at report@fotonower.com args[1401478583] : ('0.08952243390675929',) no score found for photo 1401478583 We are sending mail with results at report@fotonower.com args[1401478581] : ('0.08952243390675929',) no score found for photo 1401478581 We are sending mail with results at report@fotonower.com args[1401478579] : ('0.08952243390675929',) no score found for photo 1401478579 We are sending mail with results at report@fotonower.com args[1401478578] : ('0.08952243390675929',) no score found for photo 1401478578 We are sending mail with results at report@fotonower.com refus_total : 0.08952243390675929 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=29760415 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_P29760415_29-12-2025_05_36_58.pdf results_Auto_P29760415_29-12-2025_05_36_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_36_58.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','29760415','results_Auto_P29760415_29-12-2025_05_36_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_36_58.pdf','pdf','','0.16','0.08952243390675929') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29760415]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] map_info['map_portfolio_photo'] : {29760415: [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : False mtd_id 4302 list_pids : [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] 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, '4281826') ('4302', '29760415', '1401478628', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478627', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478626', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478624', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478600', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478599', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478598', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478596', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478588', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478585', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478583', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478581', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478579', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478578', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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', '29760415', '1401478628', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478627', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478626', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478624', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478600', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478599', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478598', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478596', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478588', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478585', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478583', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478581', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478579', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478578', None, None, None, None, None, '4281826')] time used for this insertion : 0.015726804733276367 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.3787946701049805 time spend to save output : 0.015973806381225586 total time spend for step 4 : 2.394768476486206 step5:split_time_score Mon Dec 29 05:37:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['29760415'] 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 : [('29760415',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (29760415) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1401478627: {'path': 'temp/1766983017_4068214_1401478627_be82dfc7dd76e1967f1a715793c3ea99.jpg', 'extension': 'jpg'}, 1401478628: {'path': 'temp/1766983017_4068214_1401478628_ab88f186cebe6fb80c0df6b7818cb441.jpg', 'extension': 'jpg'}, 1401478596: {'path': 'temp/1766983017_4068214_1401478596_3158eaf5925d48ac07a1b3c21abed1c2.jpg', 'extension': 'jpg'}, 1401478598: {'path': 'temp/1766983017_4068214_1401478598_8833c66f139b41f62ed8ba26c1be6657.jpg', 'extension': 'jpg'}, 1401478599: {'path': 'temp/1766983017_4068214_1401478599_f8852e3e12cf7ccd72eb1f1e1c9e671c.jpg', 'extension': 'jpg'}, 1401478578: {'path': 'temp/1766983017_4068214_1401478578_79b2d7ef0fceb88fdb32b8e89f420a81.jpg', 'extension': 'jpg'}, 1401478579: {'path': 'temp/1766983017_4068214_1401478579_1c472210bcc47a4c42c5c3a524bc507b.jpg', 'extension': 'jpg'}, 1401478581: {'path': 'temp/1766983017_4068214_1401478581_8361aaac714b3cc11546a27029b584e8.jpg', 'extension': 'jpg'}, 1401478600: {'path': 'temp/1766983017_4068214_1401478600_2d28cd0695b82216ed25f9460320b789.jpg', 'extension': 'jpg'}, 1401478624: {'path': 'temp/1766983017_4068214_1401478624_aaabad73518437f3383b16846fc695d4.jpg', 'extension': 'jpg'}, 1401478626: {'path': 'temp/1766983017_4068214_1401478626_79d503452fac32d0d7408ae82c1e7873.jpg', 'extension': 'jpg'}, 1401478583: {'path': 'temp/1766983017_4068214_1401478583_c096acc30bf421eccff78b18aaf84645.jpg', 'extension': 'jpg'}, 1401478585: {'path': 'temp/1766983017_4068214_1401478585_cba3cc61f2f69745d5bee723b9f8c11e.jpg', 'extension': 'jpg'}, 1401478588: {'path': 'temp/1766983017_4068214_1401478588_394aa5b26d40a700b854d43a540a7460.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 = 29760415; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 29760415 group by h (('05', 32),) 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=29760415 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 (29760415) 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 (29760415) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 29122025 29760415 Nombre de photos uploadées : 32 / 23040 (0%) 29122025 29760415 Nombre de photos taguées (types de déchets): 0 / 32 (0%) 29122025 29760415 Nombre de photos taguées (volume) : 0 / 32 (0%) [{'photo_id': 1401478495, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/23f93d6e1787f10f20353863f93ba9bc.jpg', 'username': None, 'uploaded_at': 1766982667, 'text': 'image_29122025_05_30_24_010132m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1401478494, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/2fc4863acef26caaf13c9fd8636dd498.jpg', 'username': None, 'uploaded_at': 1766982667, 'text': 'image_29122025_05_30_34_010144m0.jpg 2e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1401478493, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/422c28e3f476776b7e95d81f5dd63681.jpg', 'username': None, 'uploaded_at': 1766982667, 'text': 'image_29122025_05_30_44_010136m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1401478571, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/12/29/3af26795b22b2ed276b59e69a0479af7.jpg', 'username': None, 'uploaded_at': 1766982838, 'text': 'image_29122025_05_30_55_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.1920928955078125e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ???????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.001489877700805664 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 29760415, '2025-12-29' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-12-29' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2803952,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.23701071739196777 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= 2803952 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2803952, 'dashboard_run_id': 2810654, 'mtr_portfolio_id': 29759841, 'dashboard_result_id': 18782131, '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_P29759841_29-12-2025_05_19_30.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29759843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29759844, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29759845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29759846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29759847, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29759848, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29759849, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29759850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29759851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29759852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29759853, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29759854, 'pht': 3726}}"}, {'dashboat_entry_day': 2803952, 'dashboard_run_id': 2810654, 'mtr_portfolio_id': 29760025, 'dashboard_result_id': 18782132, '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_P29760025_29-12-2025_05_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760031, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760034, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760035, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760037, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760038, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760039, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760040, 'pht': 3726}}"}, {'dashboat_entry_day': 2803952, 'dashboard_run_id': 2810654, 'mtr_portfolio_id': 29760415, 'dashboard_result_id': 18782133, '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_P29760415_29-12-2025_05_34_31.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760421, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760424, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760427, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760428, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760431, '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 = 29759841 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': 4281749, 'mtr_portfolio_id': 29759841, 'created_at': datetime.datetime(2025, 12, 29, 5, 19, 29), 'result': '0.061001476454854056', 'result_long': None, 'result_double': None}] Qualite : 0.061001476454854056 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29759841 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29759841_29-12-2025_05_19_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29759841 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_P29759841_29-12-2025_05_19_30.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29759843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29759844, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29759845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29759846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29759847, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29759848, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29759849, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29759850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29759851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29759852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29759853, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29759854, 'pht': 3726}}" where mtr_portfolio_id = 29759841 and dashboard_run_id = 2810654 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`=29759841 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18782131, 0.061001476454854056, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29759841_29-12-2025_05_19_30.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29759843, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29759844, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29759845, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29759846, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29759847, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29759848, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29759849, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29759850, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29759851, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29759852, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29759853, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29759854, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29760025 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': 4281775, 'mtr_portfolio_id': 29760025, 'created_at': datetime.datetime(2025, 12, 29, 5, 33), 'result': '0.07076046805816123', 'result_long': None, 'result_double': None}] Qualite : 0.07076046805816123 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29760025 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760025_29-12-2025_05_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29760025 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_P29760025_29-12-2025_05_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760031, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760034, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760035, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760037, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760038, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760039, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760040, 'pht': 3726}}" where mtr_portfolio_id = 29760025 and dashboard_run_id = 2810654 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`=29760025 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18782132, 0.07076046805816123, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760025_29-12-2025_05_33_01.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760029, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760030, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760031, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760032, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760033, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760034, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760035, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760036, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760037, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760038, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760039, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760040, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 29760415 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': 4281826, 'mtr_portfolio_id': 29760415, 'created_at': datetime.datetime(2025, 12, 29, 5, 36, 57), 'result': '0.08952243390675929', 'result_long': None, 'result_double': None}] Qualite : 0.08952243390675929 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 29760415 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_36_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 29760415 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_P29760415_29-12-2025_05_36_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760421, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760424, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760427, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760428, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760431, 'pht': 3726}}" where mtr_portfolio_id = 29760415 and dashboard_run_id = 2810654 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`=29760415 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (18782133, 0.08952243390675929, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P29760415_29-12-2025_05_36_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 29760420, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 29760421, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 29760422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 29760423, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 29760424, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 29760425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 29760426, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 29760427, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 29760428, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 29760429, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 29760430, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 29760431, '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 (29759841,29760025,29760415) result : ((1401477787,), (1401477791,), (1401477793,), (1401477855,), (1401477873,), (1401477875,), (1401477887,), (1401477888,), (1401477889,), (1401477891,), (1401477894,), (1401477905,), (1401477907,), (1401477922,), (1401477923,), (1401477924,), (1401477925,), (1401477927,), (1401477947,), (1401477950,), (1401477952,), (1401477955,), (1401477965,), (1401477967,), (1401477969,), (1401477971,), (1401477975,), (1401477977,), (1401478008,), (1401478009,), (1401478015,), (1401478019,), (1401478021,), (1401478023,), (1401478026,), (1401478001,), (1401478003,), (1401478005,), (1401478007,), (1401478031,), (1401478032,), (1401478033,), (1401478047,), (1401478049,), (1401478051,), (1401478054,), (1401478056,), (1401478067,), (1401478070,), (1401478073,), (1401478076,), (1401478079,), (1401478108,), (1401478111,), (1401478112,), (1401478113,), (1401478114,), (1401478125,), (1401478126,), (1401478128,), (1401478162,), (1401478164,), (1401478168,), (1401478170,), (1401478173,), (1401478175,), (1401478198,), (1401478202,), (1401478206,), (1401478208,), (1401478215,), (1401478218,), (1401478248,), (1401478252,), (1401478255,), (1401478267,), (1401478270,), (1401478278,), (1401478281,), (1401478283,), (1401478286,), (1401478294,), (1401478296,), (1401478298,), (1401478301,), (1401478304,), (1401478306,), (1401478339,), (1401478352,), (1401478369,), (1401478372,), (1401478373,), (1401478375,), (1401478376,), (1401478396,), (1401478402,), (1401478404,), (1401478406,), (1401478417,), (1401478420,), (1401478422,), (1401478424,), (1401478427,), (1401478429,), (1401478444,), (1401478447,), (1401478448,), (1401478496,), (1401478493,), (1401478494,), (1401478495,), (1401478514,), (1401478517,), (1401478518,), (1401478520,), (1401478522,), (1401478525,), (1401478541,), (1401478543,), (1401478546,), (1401478549,), (1401478552,), (1401478561,), (1401478568,), (1401478569,), (1401478571,), (1401478578,), (1401478579,), (1401478581,), (1401478583,), (1401478585,), (1401478588,), (1401478596,), (1401478598,), (1401478599,), (1401478600,), (1401478624,), (1401478626,), (1401478627,), (1401478628,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'29122025': {'nb_upload': 32, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([29760415]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] map_info['map_portfolio_photo'] : {29760415: [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578, 1401478571, 1401478569, 1401478568, 1401478561, 1401478552, 1401478549, 1401478546, 1401478543, 1401478541, 1401478525, 1401478522, 1401478520, 1401478518, 1401478517, 1401478514, 1401478495, 1401478494, 1401478493]} final : True mtd_id 4302 list_pids : [1401478628, 1401478627, 1401478626, 1401478624, 1401478600, 1401478599, 1401478598, 1401478596, 1401478588, 1401478585, 1401478583, 1401478581, 1401478579, 1401478578] Looping around the photos to save general results len do output : 1 /29760415Didn'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, '4281826') ('4302', '29760415', '1401478628', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478627', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478626', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478624', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478600', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478599', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478598', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478596', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478588', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478585', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478583', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478581', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478579', None, None, None, None, None, '4281826') ('4302', None, None, None, None, None, None, None, '4281826') ('4302', '29760415', '1401478578', None, None, None, None, None, '4281826') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '29760415', 'None', None, None, None, None, '4281826'), ('4302', '29760415', '1401478628', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478627', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478626', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478624', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478600', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478599', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478598', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478596', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478588', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478585', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478583', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478581', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478579', None, None, None, None, None, '4281826'), ('4302', '29760415', '1401478578', None, None, None, None, None, '4281826')] time used for this insertion : 0.016545534133911133 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6042053699493408 time spend to save output : 0.016799449920654297 total time spend for step 5 : 0.6210048198699951 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 (4281826) 2.07user 2.42system 0:06.79elapsed 66%CPU (0avgtext+0avgdata 166928maxresident)k 304inputs+9936outputs (0major+67651minor)pagefaults 0swaps