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 : 3457686 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 (2600991) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2600991) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691256 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2600991'] with mtr_portfolio_ids : ['20691256'] and first list_photo_ids : [] new path : /proc/3457686/ Name: python3 Umask: 0002 State: R (running) Tgid: 3457686 Ngid: 0 Pid: 3457686 PPid: 3457685 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3457686 NSpid: 3457686 NSpgid: 3454795 NSsid: 3454795 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99680 kB VmRSS: 99680 kB RssAnon: 59756 kB RssFile: 39924 kB RssShmem: 0 kB VmData: 865680 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 3/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 53 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3457686', 'Ngid': '0', 'Pid': '3457686', 'PPid': '3457685', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3457686', 'NSpid': '3457686', 'NSpgid': '3454795', 'NSsid': '3454795', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99680 kB', 'VmRSS': '99680 kB', 'RssAnon': '59756 kB', 'RssFile': '39924 kB', 'RssShmem': '0 kB', 'VmData': '865680 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '3/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '53', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '3457686', '1106928', '0', '1106928', '865680', '99680', b'', 'marlene', '2600991') insert ignore into MTRAdmin.mem_info (script_name, PID, VMpeak,VMswap,VMsize,VMdata,VMrss,GPU_ram, hostname, mtr_current_id) VALUES (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s) Inside batchDatouExec : verbose : True ##### chargement datou SELECT name, created_at,limit_max FROM MTRDatou.mtr_datou WHERE id=4302 SELECT mtd.id, mtdt.`type`, mtd.`param`, mtd.param_json, mtdt.nb_input, mtdt.nb_output, mtdt.prod, mtdt.is_local, mtdt.is_datou_depend, mtdt.is_photo_id_local FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_step_types mtdt WHERE mtdt.`id`=mtd.`type` AND mtd.mtd_id=4302 SELECT mtd.id, mtd.mtd_id, mdsdt.id, mdsdt.name, mdsdt.description, msid.output_or_input, msid.data_order_id, mdsdt.type FROM MTRDatou.mtr_datou_step mtd, MTRDatou.mtr_datou_steptype_io_datatypes msid, MTRDatou.mtr_datou_step_data_types mdsdt WHERE mtd.`type`=msid.`mtr_datou_step_type` AND mtd.mtd_id= 4302 AND msid.data_type=mdsdt.id SELECT mts_id_output, id_output, mts_id_input, id_input FROM MTRDatou.mtr_datou_step_by_step WHERE mtd_id=4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! no param json to modify List Step Type Loaded in datou : ventilate_hashtags_in_portfolio, final, velours_tree, send_mail_cod, split_time_score over limit max, limiting to limit_max 200 list_input_json : [] ##### fin chargement datou ##### chargement data ##### Call load_data_input : nb_thread : 1 origin SELECT ph.photo_id, ph.url FROM MTRBack.photos ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (20691256) 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 (2600991 ) ) 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 (20691256) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1338663582, 'portfolio_id': 20691256}, {'photo_id': 1338663580, 'portfolio_id': 20691256}, {'photo_id': 1338663578, 'portfolio_id': 20691256}, {'photo_id': 1338663553, 'portfolio_id': 20691256}, {'photo_id': 1338663551, 'portfolio_id': 20691256}, {'photo_id': 1338663549, 'portfolio_id': 20691256}, {'photo_id': 1338663547, 'portfolio_id': 20691256}, {'photo_id': 1338663545, 'portfolio_id': 20691256}, {'photo_id': 1338663531, 'portfolio_id': 20691256}, {'photo_id': 1338663527, 'portfolio_id': 20691256}, {'photo_id': 1338663523, 'portfolio_id': 20691256}, {'photo_id': 1338663518, 'portfolio_id': 20691256}, {'photo_id': 1338663482, 'portfolio_id': 20691256}, {'photo_id': 1338663448, 'portfolio_id': 20691256}, {'photo_id': 1338663445, 'portfolio_id': 20691256}, {'photo_id': 1338663442, 'portfolio_id': 20691256}, {'photo_id': 1338663439, 'portfolio_id': 20691256}, {'photo_id': 1338663419, 'portfolio_id': 20691256}, {'photo_id': 1338663415, 'portfolio_id': 20691256}, {'photo_id': 1338663413, 'portfolio_id': 20691256}, {'photo_id': 1338663404, 'portfolio_id': 20691256}, {'photo_id': 1338663391, 'portfolio_id': 20691256}, {'photo_id': 1338663388, 'portfolio_id': 20691256}, {'photo_id': 1338663385, 'portfolio_id': 20691256}, {'photo_id': 1338663381, 'portfolio_id': 20691256}, {'photo_id': 1338663378, 'portfolio_id': 20691256}, {'photo_id': 1338663376, 'portfolio_id': 20691256}, {'photo_id': 1338663349, 'portfolio_id': 20691256}, {'photo_id': 1338663347, 'portfolio_id': 20691256}, {'photo_id': 1338663343, 'portfolio_id': 20691256}, {'photo_id': 1338663336, 'portfolio_id': 20691256}, {'photo_id': 1338663330, 'portfolio_id': 20691256}, {'photo_id': 1338663327, 'portfolio_id': 20691256}, {'photo_id': 1338663202, 'portfolio_id': 20691256}, {'photo_id': 1338663186, 'portfolio_id': 20691256}, {'photo_id': 1338663063, 'portfolio_id': 20691256}, {'photo_id': 1338663051, 'portfolio_id': 20691256}, {'photo_id': 1338662591, 'portfolio_id': 20691256}, {'photo_id': 1338662589, 'portfolio_id': 20691256}, {'photo_id': 1338662583, 'portfolio_id': 20691256}, {'photo_id': 1338662499, 'portfolio_id': 20691256}, {'photo_id': 1338662445, 'portfolio_id': 20691256}, {'photo_id': 1338662441, 'portfolio_id': 20691256}, {'photo_id': 1338662437, 'portfolio_id': 20691256}, {'photo_id': 1338662414, 'portfolio_id': 20691256}, {'photo_id': 1338662251, 'portfolio_id': 20691256}, {'photo_id': 1338662249, 'portfolio_id': 20691256}, {'photo_id': 1338662203, 'portfolio_id': 20691256}, {'photo_id': 1338662200, 'portfolio_id': 20691256}, {'photo_id': 1338662197, 'portfolio_id': 20691256}] map_portfolio_id_photo_id: {20691256: [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545, 1338663531, 1338663527, 1338663523, 1338663518, 1338663482, 1338663448, 1338663445, 1338663442, 1338663439, 1338663419, 1338663415, 1338663413, 1338663404, 1338663391, 1338663388, 1338663385, 1338663381, 1338663378, 1338663376, 1338663349, 1338663347, 1338663343, 1338663336, 1338663330, 1338663327, 1338663202, 1338663186, 1338663063, 1338663051, 1338662591, 1338662589, 1338662583, 1338662499, 1338662445, 1338662441, 1338662437, 1338662414, 1338662251, 1338662249, 1338662203, 1338662200, 1338662197]} ##### 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.01865983009338379 #### 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 Thu Feb 20 20:42: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 (20691256) 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 : 20691256 get user id for portfolio 20691256 get sub ptf for main ptf 20691256, type 3726 and hashtags ['kraft', 'Carton_gris', 'Carton_brun', 'environnement', 'mal_croppe', 'papier', 'Teint_Dans_La_Masse', 'cartonnette', 'flou', 'plastique', 'autre_refus', 'metal'] 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`=20691256 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','Carton_brun','environnement','mal_croppe','papier','Teint_Dans_La_Masse','cartonnette','flou','plastique','autre_refus','metal')) 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`=20691256 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','Carton_brun','environnement','mal_croppe','papier','Teint_Dans_La_Masse','cartonnette','flou','plastique','autre_refus','metal')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 20691256, 'sub_port_id': 20691301, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340535, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 20691256, 'sub_port_id': 20691302, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340536, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'kraft': {'main_port_id': 20691256, 'sub_port_id': 20691303, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340537, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'Carton_brun': {'main_port_id': 20691256, 'sub_port_id': 20691304, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340538, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'flou': {'main_port_id': 20691256, 'sub_port_id': 20691305, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340539, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'plastique': {'main_port_id': 20691256, 'sub_port_id': 20691306, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340540, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'metal': {'main_port_id': 20691256, 'sub_port_id': 20691307, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340541, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'papier': {'main_port_id': 20691256, 'sub_port_id': 20691308, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340542, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'autre_refus': {'main_port_id': 20691256, 'sub_port_id': 20691309, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340543, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'cartonnette': {'main_port_id': 20691256, 'sub_port_id': 20691310, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340544, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'environnement': {'main_port_id': 20691256, 'sub_port_id': 20691311, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340545, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}, 'Carton_gris': {'main_port_id': 20691256, 'sub_port_id': 20691312, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340546, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20691301 , 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=20691256 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 (20691301) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691302 , 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=20691256 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 (20691302) result : ((1338663473,), (1338663483,), (1338663485,), (1338663598,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691303 , 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=20691256 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 (20691303) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691304 , 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=20691256 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 (20691304) result : ((1338663517,), (1338663601,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691305 , 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=20691256 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 (20691305) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691306 , 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=20691256 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 (20691306) result : ((1338663519,), (1338663521,), (1338663602,), (1338663603,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691307 , 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=20691256 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 (20691307) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691308 , 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=20691256 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 (20691308) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691309 , 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=20691256 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 (20691309) result : ((1338663512,), (1338663513,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691310 , 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=20691256 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 (20691310) result : ((1338663477,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691311 , 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=20691256 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 (20691311) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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 20691312 , 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=20691256 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 (20691312) result : ((1338663474,), (1338663475,), (1338663476,), (1338663515,), (1338663516,), (1338663599,), (1338663600,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20691256) result : ((1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) 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 (1338662200) 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`=20691256 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','Carton_brun','environnement','mal_croppe','papier','Teint_Dans_La_Masse','cartonnette','flou','plastique','autre_refus','metal')) 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`=20691256 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','Carton_gris','Carton_brun','environnement','mal_croppe','papier','Teint_Dans_La_Masse','cartonnette','flou','plastique','autre_refus','metal')) AND mptpi.`min_score`=0.5 To do returned map {'mal_croppe': {'main_port_id': 20691256, 'sub_port_id': 20691313, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340547, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 20691256, 'sub_port_id': 20691314, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340548, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'kraft': {'main_port_id': 20691256, 'sub_port_id': 20691315, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340549, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'Carton_brun': {'main_port_id': 20691256, 'sub_port_id': 20691316, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340550, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'flou': {'main_port_id': 20691256, 'sub_port_id': 20691317, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340551, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'plastique': {'main_port_id': 20691256, 'sub_port_id': 20691318, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340552, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'metal': {'main_port_id': 20691256, 'sub_port_id': 20691319, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340553, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'papier': {'main_port_id': 20691256, 'sub_port_id': 20691320, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340554, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'autre_refus': {'main_port_id': 20691256, 'sub_port_id': 20691321, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340555, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'cartonnette': {'main_port_id': 20691256, 'sub_port_id': 20691322, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340556, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'environnement': {'main_port_id': 20691256, 'sub_port_id': 20691323, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340557, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 34, 57), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}, 'Carton_gris': {'main_port_id': 20691256, 'sub_port_id': 20691324, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13340558, 'last_updated_at': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_desc': datetime.datetime(2025, 2, 20, 20, 40, 58), 'last_updated_at_asc': datetime.datetime(2025, 2, 20, 20, 34, 57)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691313,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691301 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691314,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691302 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691315,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691303 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691316,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691304 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691317,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691305 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691318,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691306 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691319,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691307 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691320,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691308 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691321,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691309 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691322,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691310 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691323,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691311 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20691324,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20691312 lien utilise dans velours : https://www.fotonower.com/velours/20691313,20691314,20691315,20691316,20691317,20691318,20691319,20691320,20691321,20691322,20691323,20691324?tags=mal_croppe,Teint_Dans_La_Masse,kraft,Carton_brun,flou,plastique,metal,papier,autre_refus,cartonnette,environnement,Carton_gris After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20691256]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] map_info['map_portfolio_photo'] : {20691256: [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545, 1338663531, 1338663527, 1338663523, 1338663518, 1338663482, 1338663448, 1338663445, 1338663442, 1338663439, 1338663419, 1338663415, 1338663413, 1338663404, 1338663391, 1338663388, 1338663385, 1338663381, 1338663378, 1338663376, 1338663349, 1338663347, 1338663343, 1338663336, 1338663330, 1338663327, 1338663202, 1338663186, 1338663063, 1338663051, 1338662591, 1338662589, 1338662583, 1338662499, 1338662445, 1338662441, 1338662437, 1338662414, 1338662251, 1338662249, 1338662203, 1338662200, 1338662197]} final : False mtd_id 4302 list_pids : [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] Looping around the photos to save general results len do output : 1 /20691256. 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, '2600991') ('4302', '20691256', '1338663582', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663580', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663578', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663553', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663551', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663549', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663547', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663545', None, None, None, None, None, '2600991') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '20691256', "{'mal_croppe': 20691301, 'Teint_Dans_La_Masse': 20691302, 'kraft': 20691303, 'Carton_brun': 20691304, 'flou': 20691305, 'plastique': 20691306, 'metal': 20691307, 'papier': 20691308, 'autre_refus': 20691309, 'cartonnette': 20691310, 'environnement': 20691311, 'Carton_gris': 20691312}", None, None, None, None, '2600991'), ('4302', '20691256', '1338663582', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663580', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663578', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663553', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663551', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663549', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663547', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663545', None, None, None, None, None, '2600991')] time used for this insertion : 0.02597808837890625 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.5917007923126221 time spend to save output : 0.02622842788696289 total time spend for step 1 : 0.617929220199585 step2:final Thu Feb 20 20:42: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 (20691256) 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 20691256 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1338662251,1338662249,1338662203,1338662200,1338662197,1338662499,1338662445,1338662441,1338662437,1338662414,1338662591,1338662589,1338662583,1338663202,1338663186,1338663063,1338663051,1338663349,1338663347,1338663343,1338663336,1338663330,1338663327,1338663391,1338663388,1338663385,1338663381,1338663378,1338663376,1338663419,1338663415,1338663413,1338663404,1338663448,1338663445,1338663442,1338663439,1338663531,1338663527,1338663523,1338663518,1338663482,1338663553,1338663551,1338663549,1338663547,1338663545,1338663582,1338663580,1338663578); 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([20691256]) Inside saveOutput : final : False verbose : True original output for save of step final : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} new output for save of step final : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] map_info['map_portfolio_photo'] : {20691256: [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545, 1338663531, 1338663527, 1338663523, 1338663518, 1338663482, 1338663448, 1338663445, 1338663442, 1338663439, 1338663419, 1338663415, 1338663413, 1338663404, 1338663391, 1338663388, 1338663385, 1338663381, 1338663378, 1338663376, 1338663349, 1338663347, 1338663343, 1338663336, 1338663330, 1338663327, 1338663202, 1338663186, 1338663063, 1338663051, 1338662591, 1338662589, 1338662583, 1338662499, 1338662445, 1338662441, 1338662437, 1338662414, 1338662251, 1338662249, 1338662203, 1338662200, 1338662197]} final : False mtd_id 4302 list_pids : [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] Looping around the photos to save general results len do output : 8 /1338663582.Didn't retrieve data . /1338663580.Didn't retrieve data . /1338663578.Didn't retrieve data . /1338663553.Didn't retrieve data . /1338663551.Didn't retrieve data . /1338663549.Didn't retrieve data . /1338663547.Didn't retrieve data . /1338663545.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, '2600991') ('4302', '20691256', '1338663582', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663580', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663578', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663553', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663551', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663549', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663547', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663545', None, None, None, None, None, '2600991') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 24 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', '20691256', '1338663582', '0.04128696630782554', None, None, None, None, '2600991'), ('4302', '20691256', '1338663580', '0.04128696630782554', None, None, None, None, '2600991'), ('4302', '20691256', '1338663578', '0.04128696630782554', None, None, None, None, '2600991'), ('4302', '20691256', '1338663553', '0.04128696630782554', None, None, None, None, '2600991'), ('4302', '20691256', '1338663551', '0.04128696630782554', None, None, None, None, '2600991'), ('4302', '20691256', '1338663549', '0.04128696630782554', None, None, None, None, '2600991'), ('4302', '20691256', '1338663547', '0.04128696630782554', None, None, None, None, '2600991'), ('4302', '20691256', '1338663545', '0.04128696630782554', None, None, None, None, '2600991')] time used for this insertion : 0.014557600021362305 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06867551803588867 time spend to save output : 0.015058279037475586 total time spend for step 2 : 0.08373379707336426 step3:velours_tree Thu Feb 20 20:42: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 : {20691256: [{'mal_croppe': 20691301, 'Teint_Dans_La_Masse': 20691302, 'kraft': 20691303, 'Carton_brun': 20691304, 'flou': 20691305, 'plastique': 20691306, 'metal': 20691307, 'papier': 20691308, 'autre_refus': 20691309, 'cartonnette': 20691310, 'environnement': 20691311, 'Carton_gris': 20691312}]} input_args_next_step : {20691256: ()} output_args : {20691256: [{'mal_croppe': 20691301, 'Teint_Dans_La_Masse': 20691302, 'kraft': 20691303, 'Carton_brun': 20691304, 'flou': 20691305, 'plastique': 20691306, 'metal': 20691307, 'papier': 20691308, 'autre_refus': 20691309, 'cartonnette': 20691310, 'environnement': 20691311, 'Carton_gris': 20691312}]} args : 20691256 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 : ({'mal_croppe': 20691301, 'Teint_Dans_La_Masse': 20691302, 'kraft': 20691303, 'Carton_brun': 20691304, 'flou': 20691305, 'plastique': 20691306, 'metal': 20691307, 'papier': 20691308, 'autre_refus': 20691309, 'cartonnette': 20691310, 'environnement': 20691311, 'Carton_gris': 20691312},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20691256) 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([20691256]) 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.30588603019714355 time spend to save output : 4.863739013671875e-05 total time spend for step 3 : 0.3059346675872803 step4:send_mail_cod Thu Feb 20 20:42:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} input_args_next_step : {1338663582: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663582 depend.output_id : 0 input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663580 depend.output_id : 0 input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663578 depend.output_id : 0 input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663553 depend.output_id : 0 input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663551 depend.output_id : 0 input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663549 depend.output_id : 0 input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663547 depend.output_id : 0 input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ()} output_args : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',)} args : 1338663545 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 : {20691256: [{'mal_croppe': 20691301, 'Teint_Dans_La_Masse': 20691302, 'kraft': 20691303, 'Carton_brun': 20691304, 'flou': 20691305, 'plastique': 20691306, 'metal': 20691307, 'papier': 20691308, 'autre_refus': 20691309, 'cartonnette': 20691310, 'environnement': 20691311, 'Carton_gris': 20691312}]} input_args_next_step : {1338663582: ('0.04128696630782554',), 1338663580: ('0.04128696630782554',), 1338663578: ('0.04128696630782554',), 1338663553: ('0.04128696630782554',), 1338663551: ('0.04128696630782554',), 1338663549: ('0.04128696630782554',), 1338663547: ('0.04128696630782554',), 1338663545: ('0.04128696630782554',), 20691256: ()} output_args : {20691256: [{'mal_croppe': 20691301, 'Teint_Dans_La_Masse': 20691302, 'kraft': 20691303, 'Carton_brun': 20691304, 'flou': 20691305, 'plastique': 20691306, 'metal': 20691307, 'papier': 20691308, 'autre_refus': 20691309, 'cartonnette': 20691310, 'environnement': 20691311, 'Carton_gris': 20691312}]} args : 20691256 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 :9, first value : ('0.04128696630782554',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20691256) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {} map_subphoto_mainphoto : {} dans la step send mail cod work_area: /home/admin/workarea/git/Velours/python in order to get the selector url, please entre the license of selector SELECT photo_id, url FROM MTRBack.photos ph WHERE photo_id IN (1338663582,1338663580,1338663578,1338663553,1338663551,1338663549,1338663547,1338663545) Found this number of photos: 8 ##### Call download_photos : nb_thread : 5 begin to download photo : 1338663545 begin to download photo : 1338663549 begin to download photo : 1338663553 begin to download photo : 1338663580 download finish for photo 1338663580 begin to download photo : 1338663582 download finish for photo 1338663549 begin to download photo : 1338663551 download finish for photo 1338663582 download finish for photo 1338663545 begin to download photo : 1338663547 download finish for photo 1338663553 begin to download photo : 1338663578 download finish for photo 1338663551 download finish for photo 1338663547 download finish for photo 1338663578 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette206913011740080578/ imagette206913031740080578/ imagette206913051740080578/ length of list_filenames : 8 ; length of list_pids : 8 ; length of list_args : 8 results_Auto_P20691256_20-02-2025_20_42_58.pdf 20691301 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691301 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206913011740080578 20691303 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691303 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206913031740080578 20691305 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691305 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206913051740080578 20691306 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691306 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338663519: '1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992545_0.png', 1338663521: '1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992586_0.png', 1338663602: '1740080454_2591423_1338663413_c0a2d55c2b7d61d83a2f801244b57043_rle_crop_3680994569_0.png', 1338663603: '1740080454_2591423_1338663413_c0a2d55c2b7d61d83a2f801244b57043_rle_crop_3680994573_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/dc0673bb4e303a572d75e618dbb4f2f1_31126105.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/e4901795e724a0ecb6af8487d28e54b7_78376232.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/1d936beff028a0704521ef6bb26abc36_69155477.png change filename to text .imagette206913061740080578/ imagette206913061740080578/1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992545_0.png.png imagette206913061740080578/1740080454_2591423_1338663413_c0a2d55c2b7d61d83a2f801244b57043_rle_crop_3680994573_0.png.png imagette206913061740080578/1740080454_2591423_1338663413_c0a2d55c2b7d61d83a2f801244b57043_rle_crop_3680994569_0.png.png imagette206913061740080578/1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992586_0.png.png imagette206913071740080578/ wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/18b113e96fe5abb873775699a83cb337_36634634.png imagette206913061740080578 20691307 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691307 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette206913071740080578 20691309 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691309 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338663512: '1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992536_0.png', 1338663513: '1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992581_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/1efafd561ec64e00dd1620aab6664a81_2082364.png change filename to text .imagette206913091740080578/ imagette206913091740080578/1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992536_0.png.png imagette206913091740080578/1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992581_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/08940527714472fd8a7464705d49d012_29932825.png imagette206913091740080578 20691310 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691310 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338663477: '1740080195_2577391_1338662589_5311bd999114d539df96d74c22e1bf90_rle_crop_3680992442_0.png'} change filename to text .imagette206913101740080579/ imagette206913101740080579/1740080195_2577391_1338662589_5311bd999114d539df96d74c22e1bf90_rle_crop_3680992442_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/570776a435dc2b5d5261140216dac9ef_17373078.png imagette206913101740080579 20691302 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691302 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338663473: '1740080195_2577391_1338662583_a9a8054b1350a027e8621981548554af_rle_crop_3680992479_0.png', 1338663483: '1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992543_0.png', 1338663485: '1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992587_0.png', 1338663598: '1740080454_2591423_1338663404_0de38d5dff1ff5cc41afb992532deb11_rle_crop_3680994593_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/5f7e59bfb8c0f6946df102d0b1578998_27280879.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/2d8f543bec70a575fbdf242cd29914db_61512789.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/350d956d8ec5c30aa7c68fad94f443d4_89164866.png change filename to text .imagette206913021740080579/ imagette206913021740080579/1740080195_2577391_1338662583_a9a8054b1350a027e8621981548554af_rle_crop_3680992479_0.png.png imagette206913021740080579/1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992587_0.png.png imagette206913021740080579/1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992543_0.png.png imagette206913021740080579/1740080454_2591423_1338663404_0de38d5dff1ff5cc41afb992532deb11_rle_crop_3680994593_0.png.png wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/9a45b6ec22a6cf152832ffb4af4fcc1b_72465797.png imagette206913021740080579 20691304 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691304 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338663517: '1740080174_2576921_1338662445_b8ea127749e085475913a509bb3941dd_rle_crop_3680992501_0.png', 1338663601: '1740080454_2591423_1338663404_0de38d5dff1ff5cc41afb992532deb11_rle_crop_3680994597_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/fa4ac771e700182abb1f66045c776a03_23439734.png change filename to text .imagette206913041740080579/ imagette206913041740080579/1740080454_2591423_1338663404_0de38d5dff1ff5cc41afb992532deb11_rle_crop_3680994597_0.png.png imagette206913041740080579/1740080174_2576921_1338662445_b8ea127749e085475913a509bb3941dd_rle_crop_3680992501_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/cf9a33d226cf0549d965c693757d408f_64365475.png imagette206913041740080579 20691312 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691312 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1338663474: '1740080195_2577391_1338662589_5311bd999114d539df96d74c22e1bf90_rle_crop_3680992445_0.png', 1338663475: '1740080195_2577391_1338662589_5311bd999114d539df96d74c22e1bf90_rle_crop_3680992447_0.png', 1338663476: '1740080195_2577391_1338662583_a9a8054b1350a027e8621981548554af_rle_crop_3680992470_0.png', 1338663515: '1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992549_0.png', 1338663516: '1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992592_0.png', 1338663599: '1740080454_2591423_1338663413_c0a2d55c2b7d61d83a2f801244b57043_rle_crop_3680994568_0.png', 1338663600: '1740080454_2591423_1338663404_0de38d5dff1ff5cc41afb992532deb11_rle_crop_3680994588_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/38095b65a1ba485affe0c55d20c6fcb7_26298857.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/73d19f0be119081ef89bfc91a2d7898f_17366058.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/c09c965c83e611f27ee979d1ae06fe35_49342782.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/7b1a564aa28293080643dde4e4e1970f_75729568.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/2b669e9b5802cd1e81e53393ae4a6522_23888312.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/1f67c4a9cf27dc8f2d1586965f9da9a5_68744094.png change filename to text .imagette206913121740080579/ imagette206913121740080579/1740080454_2591423_1338663404_0de38d5dff1ff5cc41afb992532deb11_rle_crop_3680994588_0.png.png imagette206913121740080579/1740080174_2576921_1338662441_d09cded403098d282f9d36508ffb37d7_rle_crop_3680992549_0.png.png imagette206913121740080579/1740080195_2577391_1338662589_5311bd999114d539df96d74c22e1bf90_rle_crop_3680992447_0.png.png imagette206913121740080579/1740080174_2576921_1338662437_70431296b56004748e80262542334921_rle_crop_3680992592_0.png.png imagette206913121740080579/1740080195_2577391_1338662583_a9a8054b1350a027e8621981548554af_rle_crop_3680992470_0.png.png imagette206913121740080579/1740080454_2591423_1338663413_c0a2d55c2b7d61d83a2f801244b57043_rle_crop_3680994568_0.png.png imagette206913121740080579/1740080195_2577391_1338662589_5311bd999114d539df96d74c22e1bf90_rle_crop_3680992445_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/d3ca14432bad2cc7dc8081de9dc8a37e_93976005.png imagette206913121740080579 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20691256 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20691313,20691314,20691315,20691316,20691317,20691318,20691319,20691320,20691321,20691322,20691323,20691324?tags=mal_croppe,Teint_Dans_La_Masse,kraft,Carton_brun,flou,plastique,metal,papier,autre_refus,cartonnette,environnement,Carton_gris your option no_mail is active, we will not send the real mail to your client args[1338663582] : ('0.04128696630782554',) no score found for photo 1338663582 We are sending mail with results at report@fotonower.com args[1338663580] : ('0.04128696630782554',) no score found for photo 1338663580 We are sending mail with results at report@fotonower.com args[1338663578] : ('0.04128696630782554',) no score found for photo 1338663578 We are sending mail with results at report@fotonower.com args[1338663553] : ('0.04128696630782554',) no score found for photo 1338663553 We are sending mail with results at report@fotonower.com args[1338663551] : ('0.04128696630782554',) no score found for photo 1338663551 We are sending mail with results at report@fotonower.com args[1338663549] : ('0.04128696630782554',) no score found for photo 1338663549 We are sending mail with results at report@fotonower.com args[1338663547] : ('0.04128696630782554',) no score found for photo 1338663547 We are sending mail with results at report@fotonower.com args[1338663545] : ('0.04128696630782554',) no score found for photo 1338663545 We are sending mail with results at report@fotonower.com refus_total : 0.04128696630782554 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691256 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_P20691256_20-02-2025_20_42_58.pdf results_Auto_P20691256_20-02-2025_20_42_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20691256_20-02-2025_20_42_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','20691256','results_Auto_P20691256_20-02-2025_20_42_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20691256_20-02-2025_20_42_58.pdf','pdf','','0.15','0.04128696630782554') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20691256]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] map_info['map_portfolio_photo'] : {20691256: [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545, 1338663531, 1338663527, 1338663523, 1338663518, 1338663482, 1338663448, 1338663445, 1338663442, 1338663439, 1338663419, 1338663415, 1338663413, 1338663404, 1338663391, 1338663388, 1338663385, 1338663381, 1338663378, 1338663376, 1338663349, 1338663347, 1338663343, 1338663336, 1338663330, 1338663327, 1338663202, 1338663186, 1338663063, 1338663051, 1338662591, 1338662589, 1338662583, 1338662499, 1338662445, 1338662441, 1338662437, 1338662414, 1338662251, 1338662249, 1338662203, 1338662200, 1338662197]} final : False mtd_id 4302 list_pids : [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] 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, '2600991') ('4302', '20691256', '1338663582', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663580', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663578', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663553', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663551', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663549', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663547', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663545', None, None, None, None, None, '2600991') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 8 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', '20691256', '1338663582', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663580', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663578', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663553', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663551', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663549', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663547', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663545', None, None, None, None, None, '2600991')] time used for this insertion : 0.013769388198852539 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.637995481491089 time spend to save output : 0.013994932174682617 total time spend for step 4 : 2.6519904136657715 step5:split_time_score Thu Feb 20 20:43: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 : ['20691256'] 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 : [('20691256',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20691256) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1338663580: {'path': 'temp/1740080578_3457686_1338663580_512712039e06e6e0122a8f83bfb219b7.jpg', 'extension': 'jpg'}, 1338663582: {'path': 'temp/1740080578_3457686_1338663582_8289fa3012c7f4b740b97d7753bcbdc5.jpg', 'extension': 'jpg'}, 1338663549: {'path': 'temp/1740080578_3457686_1338663549_b438b1522cc38e17bddef1b2b8f7eccf.jpg', 'extension': 'jpg'}, 1338663551: {'path': 'temp/1740080578_3457686_1338663551_60c0f20d7933660a0ded0b8db60c0d53.jpg', 'extension': 'jpg'}, 1338663545: {'path': 'temp/1740080578_3457686_1338663545_324d1762e80a9a62631670545ddb4e0c.jpg', 'extension': 'jpg'}, 1338663547: {'path': 'temp/1740080578_3457686_1338663547_bd7246689b3ad0c2a62acbe5a7e2c52a.jpg', 'extension': 'jpg'}, 1338663553: {'path': 'temp/1740080578_3457686_1338663553_291a288dda4a16f15637f44de3ada0e9.jpg', 'extension': 'jpg'}, 1338663578: {'path': 'temp/1740080578_3457686_1338663578_5cae65b238b53205687579f70b1e1c38.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 = 20691256; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 20691256 group by h (('20', 50),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=20691256 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 (20691256) 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 (20691256) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 20022025 20691256 Nombre de photos uploadées : 50 / 23040 (0%) 20022025 20691256 Nombre de photos taguées (types de déchets): 0 / 50 (0%) 20022025 20691256 Nombre de photos taguées (volume) : 0 / 50 (0%) [{'photo_id': 1338662251, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/be6d063c1fa0440d64c6d5709265ec05.jpg', 'username': None, 'uploaded_at': 1740079882, 'text': 'image_20022025_20_30_05_10146.jpg'}, {'photo_id': 1338662249, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/7a8ad9018733033fb1c9c6d98f4b4fea.jpg', 'username': None, 'uploaded_at': 1740079882, 'text': 'image_20022025_20_30_14_9123.jpg'}, {'photo_id': 1338662203, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/ad63322ab08390e52f56e0d07d4207e0.jpg', 'username': None, 'uploaded_at': 1740079882, 'text': 'image_20022025_20_30_24_10133.jpg'}, {'photo_id': 1338662200, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/2/20/9414d4751671af3e67fc0ad00a488291.jpg', 'username': None, 'uploaded_at': 1740079882, 'text': 'image_20022025_20_30_34_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 5.245208740234375e-06 ?????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0032150745391845703 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20691256, '2025-02-20' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1613763,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.028262853622436523 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= 1613763 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1613763, 'dashboard_run_id': 1622133, 'mtr_portfolio_id': 20689330, 'dashboard_result_id': 8983908, '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_P20689330_20-02-2025_20_02_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20689384, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20689385, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20689386, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20689387, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20689388, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20689389, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20689390, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20689391, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20689392, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20689393, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20689394, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20689395, 'pht': 3726}}"}, {'dashboat_entry_day': 1613763, 'dashboard_run_id': 1622133, 'mtr_portfolio_id': 20690178, 'dashboard_result_id': 8983909, '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_P20690178_20-02-2025_20_18_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20690182, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20690183, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20690184, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20690185, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20690186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20690187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20690188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20690189, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20690190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20690191, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20690192, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20690193, 'pht': 3726}}"}, {'dashboat_entry_day': 1613763, 'dashboard_run_id': 1622133, 'mtr_portfolio_id': 20690722, 'dashboard_result_id': 8983910, '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_P20690722_20-02-2025_20_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20690790, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20690791, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20690792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20690793, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20690794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20690795, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20690796, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20690797, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20690798, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20690799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20690800, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20690801, 'pht': 3726}}"}, {'dashboat_entry_day': 1613763, 'dashboard_run_id': 1622133, 'mtr_portfolio_id': 20691256, 'dashboard_result_id': 8983911, '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_P20691256_20-02-2025_20_40_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20691301, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20691302, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20691303, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20691304, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20691305, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20691306, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20691307, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20691308, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20691309, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20691310, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20691311, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20691312, '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 = 20689330 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': 2600853, 'mtr_portfolio_id': 20689330, 'created_at': datetime.datetime(2025, 2, 20, 20, 2, 58), 'result': '0.049477921358811294', 'result_long': None, 'result_double': None}] Qualite : 0.049477921358811294 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20689330 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20689330_20-02-2025_20_02_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20689330 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_P20689330_20-02-2025_20_02_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20689384, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20689385, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20689386, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20689387, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20689388, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20689389, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20689390, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20689391, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20689392, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20689393, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20689394, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20689395, 'pht': 3726}}" where mtr_portfolio_id = 20689330 and dashboard_run_id = 1622133 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`=20689330 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8983908, 0.049477921358811294, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20689330_20-02-2025_20_02_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20689384, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20689385, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20689386, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20689387, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20689388, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20689389, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20689390, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20689391, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20689392, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20689393, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20689394, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20689395, '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 = 20690178 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': 2600910, 'mtr_portfolio_id': 20690178, 'created_at': datetime.datetime(2025, 2, 20, 20, 18, 58), 'result': '0.04724102010583426', 'result_long': None, 'result_double': None}] Qualite : 0.04724102010583426 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20690178 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20690178_20-02-2025_20_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20690178 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_P20690178_20-02-2025_20_18_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20690182, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20690183, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20690184, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20690185, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20690186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20690187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20690188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20690189, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20690190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20690191, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20690192, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20690193, 'pht': 3726}}" where mtr_portfolio_id = 20690178 and dashboard_run_id = 1622133 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`=20690178 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8983909, 0.04724102010583426, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20690178_20-02-2025_20_18_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 20690182, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20690183, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20690184, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20690185, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20690186, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20690187, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20690188, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20690189, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20690190, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20690191, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20690192, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20690193, '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 = 20690722 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': 2600948, 'mtr_portfolio_id': 20690722, 'created_at': datetime.datetime(2025, 2, 20, 20, 32, 59), 'result': '0.0477786544281751', 'result_long': None, 'result_double': None}] Qualite : 0.0477786544281751 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20690722 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20690722_20-02-2025_20_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20690722 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_P20690722_20-02-2025_20_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20690790, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20690791, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20690792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20690793, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20690794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20690795, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20690796, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20690797, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20690798, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20690799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20690800, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20690801, 'pht': 3726}}" where mtr_portfolio_id = 20690722 and dashboard_run_id = 1622133 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`=20690722 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8983910, 0.0477786544281751, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20690722_20-02-2025_20_32_59.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 20690790, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20690791, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20690792, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20690793, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20690794, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20690795, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20690796, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20690797, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20690798, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20690799, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20690800, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20690801, '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 = 20691256 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': 2600991, 'mtr_portfolio_id': 20691256, 'created_at': datetime.datetime(2025, 2, 20, 20, 42, 57), 'result': '0.04128696630782554', 'result_long': None, 'result_double': None}] Qualite : 0.04128696630782554 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20691256 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20691256_20-02-2025_20_42_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20691256 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_P20691256_20-02-2025_20_42_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20691301, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20691302, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20691303, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20691304, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20691305, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20691306, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20691307, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20691308, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20691309, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20691310, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20691311, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20691312, 'pht': 3726}}" where mtr_portfolio_id = 20691256 and dashboard_run_id = 1622133 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`=20691256 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (8983911, 0.04128696630782554, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20691256_20-02-2025_20_42_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20691301, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20691302, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20691303, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20691304, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20691305, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20691306, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20691307, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20691308, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20691309, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20691310, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20691311, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20691312, '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 (20689330,20690178,20690722,20691256) result : ((1338656918,), (1338656929,), (1338656934,), (1338656952,), (1338657720,), (1338657931,), (1338657934,), (1338657937,), (1338657940,), (1338657943,), (1338657961,), (1338658057,), (1338658131,), (1338658143,), (1338658151,), (1338658155,), (1338658201,), (1338658207,), (1338658213,), (1338658217,), (1338658254,), (1338658261,), (1338658264,), (1338658293,), (1338658296,), (1338658328,), (1338658332,), (1338658335,), (1338658342,), (1338658347,), (1338658351,), (1338658396,), (1338658400,), (1338658404,), (1338658423,), (1338658427,), (1338658431,), (1338658440,), (1338658442,), (1338658446,), (1338658454,), (1338658517,), (1338658519,), (1338658523,), (1338658525,), (1338658572,), (1338658609,), (1338658612,), (1338658615,), (1338658620,), (1338658624,), (1338658679,), (1338658683,), (1338658752,), (1338658806,), (1338658808,), (1338658813,), (1338658955,), (1338659008,), (1338659015,), (1338659022,), (1338659029,), (1338659033,), (1338659132,), (1338659109,), (1338659111,), (1338659114,), (1338659124,), (1338659416,), (1338659432,), (1338659437,), (1338659441,), (1338659443,), (1338659481,), (1338659490,), (1338659497,), (1338659500,), (1338659503,), (1338659533,), (1338659536,), (1338659539,), (1338659542,), (1338659545,), (1338659580,), (1338659582,), (1338659586,), (1338659593,), (1338659615,), (1338659618,), (1338659621,), (1338659667,), (1338659670,), (1338659673,), (1338659676,), (1338659721,), (1338659732,), (1338659735,), (1338659739,), (1338659741,), (1338659743,), (1338659759,), (1338659761,), (1338659765,), (1338659769,), (1338659772,), (1338659941,), (1338659990,), (1338659992,), (1338659995,), (1338659997,), (1338660017,), (1338660018,), (1338660020,), (1338660023,), (1338660025,), (1338660027,), (1338660044,), (1338660046,), (1338660048,), (1338660050,), (1338660131,), (1338660136,), (1338660137,), (1338660140,), (1338660200,), (1338660203,), (1338660205,), (1338660208,), (1338660211,), (1338660212,), (1338660455,), (1338660448,), (1338660451,), (1338660453,), (1338660507,), (1338660511,), (1338660519,), (1338660527,), (1338660535,), (1338660886,), (1338660889,), (1338660891,), (1338660896,), (1338660900,), (1338660944,), (1338660947,), (1338660950,), (1338661002,), (1338661554,), (1338661560,), (1338661566,), (1338661579,), (1338661685,), (1338661763,), (1338661799,), (1338661804,), (1338661833,), (1338661836,), (1338661839,), (1338661864,), (1338661867,), (1338661870,), (1338661960,), (1338661963,), (1338661969,), (1338662046,), (1338662050,), (1338662114,), (1338662117,), (1338662121,), (1338662123,), (1338662156,), (1338662162,), (1338662170,), (1338662179,), (1338662184,), (1338662254,), (1338662197,), (1338662200,), (1338662203,), (1338662249,), (1338662251,), (1338662414,), (1338662437,), (1338662441,), (1338662445,), (1338662499,), (1338662583,), (1338662589,), (1338662591,), (1338663051,), (1338663063,), (1338663186,), (1338663202,), (1338663327,), (1338663330,), (1338663336,), (1338663343,), (1338663347,), (1338663349,), (1338663376,), (1338663378,), (1338663381,), (1338663385,), (1338663388,), (1338663391,), (1338663404,), (1338663413,), (1338663415,), (1338663419,), (1338663439,), (1338663442,), (1338663445,), (1338663448,), (1338663482,), (1338663518,), (1338663523,), (1338663527,), (1338663531,), (1338663545,), (1338663547,), (1338663549,), (1338663551,), (1338663553,), (1338663578,), (1338663580,), (1338663582,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'20022025': {'nb_upload': 50, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20691256]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] map_info['map_portfolio_photo'] : {20691256: [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545, 1338663531, 1338663527, 1338663523, 1338663518, 1338663482, 1338663448, 1338663445, 1338663442, 1338663439, 1338663419, 1338663415, 1338663413, 1338663404, 1338663391, 1338663388, 1338663385, 1338663381, 1338663378, 1338663376, 1338663349, 1338663347, 1338663343, 1338663336, 1338663330, 1338663327, 1338663202, 1338663186, 1338663063, 1338663051, 1338662591, 1338662589, 1338662583, 1338662499, 1338662445, 1338662441, 1338662437, 1338662414, 1338662251, 1338662249, 1338662203, 1338662200, 1338662197]} final : True mtd_id 4302 list_pids : [1338663582, 1338663580, 1338663578, 1338663553, 1338663551, 1338663549, 1338663547, 1338663545] Looping around the photos to save general results len do output : 1 /20691256Didn'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, '2600991') ('4302', '20691256', '1338663582', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663580', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663578', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663553', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663551', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663549', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663547', None, None, None, None, None, '2600991') ('4302', None, None, None, None, None, None, None, '2600991') ('4302', '20691256', '1338663545', None, None, None, None, None, '2600991') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '20691256', 'None', None, None, None, None, '2600991'), ('4302', '20691256', '1338663582', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663580', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663578', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663553', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663551', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663549', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663547', None, None, None, None, None, '2600991'), ('4302', '20691256', '1338663545', None, None, None, None, None, '2600991')] time used for this insertion : 0.016013145446777344 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.39177846908569336 time spend to save output : 0.01616692543029785 total time spend for step 5 : 0.4079453945159912 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 (2600991) 1.99user 2.47system 0:06.18elapsed 72%CPU (0avgtext+0avgdata 160432maxresident)k 280inputs+8040outputs (1major+64135minor)pagefaults 0swaps