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 : 4133732 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 (2630415) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2630415) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990317 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2630415'] with mtr_portfolio_ids : ['20990317'] and first list_photo_ids : [] new path : /proc/4133732/ Name: python3 Umask: 0002 State: R (running) Tgid: 4133732 Ngid: 0 Pid: 4133732 PPid: 4133731 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 4133732 NSpid: 4133732 NSpgid: 4130575 NSsid: 4130575 VmPeak: 1106844 kB VmSize: 1106844 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99108 kB VmRSS: 99108 kB RssAnon: 59764 kB RssFile: 39344 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 596 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: 91 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '4133732', 'Ngid': '0', 'Pid': '4133732', 'PPid': '4133731', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '4133732', 'NSpid': '4133732', 'NSpgid': '4130575', 'NSsid': '4130575', 'VmPeak': '1106844 kB', 'VmSize': '1106844 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99108 kB', 'VmRSS': '99108 kB', 'RssAnon': '59764 kB', 'RssFile': '39344 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '596 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': '91'} ('datou_batch_current', '4133732', '1106844', '0', '1106844', '865592', '99108', b'', 'marlene', '2630415') 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 (20990317) 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 (2630415 ) ) 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 (20990317) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1340671798, 'portfolio_id': 20990317}, {'photo_id': 1340671696, 'portfolio_id': 20990317}, {'photo_id': 1340671688, 'portfolio_id': 20990317}, {'photo_id': 1340671605, 'portfolio_id': 20990317}, {'photo_id': 1340671603, 'portfolio_id': 20990317}, {'photo_id': 1340671598, 'portfolio_id': 20990317}, {'photo_id': 1340671580, 'portfolio_id': 20990317}, {'photo_id': 1340671577, 'portfolio_id': 20990317}, {'photo_id': 1340671575, 'portfolio_id': 20990317}, {'photo_id': 1340671570, 'portfolio_id': 20990317}, {'photo_id': 1340671565, 'portfolio_id': 20990317}, {'photo_id': 1340671553, 'portfolio_id': 20990317}, {'photo_id': 1340671500, 'portfolio_id': 20990317}, {'photo_id': 1340671498, 'portfolio_id': 20990317}, {'photo_id': 1340671488, 'portfolio_id': 20990317}, {'photo_id': 1340671469, 'portfolio_id': 20990317}, {'photo_id': 1340671420, 'portfolio_id': 20990317}, {'photo_id': 1340671415, 'portfolio_id': 20990317}, {'photo_id': 1340671391, 'portfolio_id': 20990317}, {'photo_id': 1340671386, 'portfolio_id': 20990317}, {'photo_id': 1340671384, 'portfolio_id': 20990317}, {'photo_id': 1340671381, 'portfolio_id': 20990317}, {'photo_id': 1340671377, 'portfolio_id': 20990317}, {'photo_id': 1340671320, 'portfolio_id': 20990317}, {'photo_id': 1340671317, 'portfolio_id': 20990317}, {'photo_id': 1340671265, 'portfolio_id': 20990317}, {'photo_id': 1340671253, 'portfolio_id': 20990317}, {'photo_id': 1340671250, 'portfolio_id': 20990317}, {'photo_id': 1340671246, 'portfolio_id': 20990317}, {'photo_id': 1340671211, 'portfolio_id': 20990317}, {'photo_id': 1340671206, 'portfolio_id': 20990317}, {'photo_id': 1340671201, 'portfolio_id': 20990317}, {'photo_id': 1340671194, 'portfolio_id': 20990317}, {'photo_id': 1340671092, 'portfolio_id': 20990317}, {'photo_id': 1340671020, 'portfolio_id': 20990317}, {'photo_id': 1340671016, 'portfolio_id': 20990317}, {'photo_id': 1340671013, 'portfolio_id': 20990317}, {'photo_id': 1340671009, 'portfolio_id': 20990317}, {'photo_id': 1340671004, 'portfolio_id': 20990317}, {'photo_id': 1340670958, 'portfolio_id': 20990317}, {'photo_id': 1340670955, 'portfolio_id': 20990317}, {'photo_id': 1340670950, 'portfolio_id': 20990317}, {'photo_id': 1340670909, 'portfolio_id': 20990317}, {'photo_id': 1340670904, 'portfolio_id': 20990317}, {'photo_id': 1340670900, 'portfolio_id': 20990317}, {'photo_id': 1340670866, 'portfolio_id': 20990317}, {'photo_id': 1340670837, 'portfolio_id': 20990317}, {'photo_id': 1340670833, 'portfolio_id': 20990317}, {'photo_id': 1340670802, 'portfolio_id': 20990317}, {'photo_id': 1340670378, 'portfolio_id': 20990317}, {'photo_id': 1340670373, 'portfolio_id': 20990317}, {'photo_id': 1340670300, 'portfolio_id': 20990317}, {'photo_id': 1340670282, 'portfolio_id': 20990317}, {'photo_id': 1340670134, 'portfolio_id': 20990317}, {'photo_id': 1340670131, 'portfolio_id': 20990317}, {'photo_id': 1340670127, 'portfolio_id': 20990317}, {'photo_id': 1340670122, 'portfolio_id': 20990317}] map_portfolio_id_photo_id: {20990317: [1340671798, 1340671696, 1340671688, 1340671605, 1340671603, 1340671598, 1340671580, 1340671577, 1340671575, 1340671570, 1340671565, 1340671553, 1340671500, 1340671498, 1340671488, 1340671469, 1340671420, 1340671415, 1340671391, 1340671386, 1340671384, 1340671381, 1340671377, 1340671320, 1340671317, 1340671265, 1340671253, 1340671250, 1340671246, 1340671211, 1340671206, 1340671201, 1340671194, 1340671092, 1340671020, 1340671016, 1340671013, 1340671009, 1340671004, 1340670958, 1340670955, 1340670950, 1340670909, 1340670904, 1340670900, 1340670866, 1340670837, 1340670833, 1340670802, 1340670378, 1340670373, 1340670300, 1340670282, 1340670134, 1340670131, 1340670127, 1340670122]} ##### 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.016162633895874023 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Mar 3 20:18:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20990317) 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 : 20990317 get user id for portfolio 20990317 get sub ptf for main ptf 20990317, type 3726 and hashtags ['flou', 'autre_refus', 'Carton_gris', 'cartonnette', 'environnement', 'papier', 'mal_croppe', 'Carton_brun', 'kraft', 'metal', 'plastique', 'Teint_Dans_La_Masse'] 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`=20990317 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','autre_refus','Carton_gris','cartonnette','environnement','papier','mal_croppe','Carton_brun','kraft','metal','plastique','Teint_Dans_La_Masse')) 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`=20990317 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','autre_refus','Carton_gris','cartonnette','environnement','papier','mal_croppe','Carton_brun','kraft','metal','plastique','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 20990317, 'sub_port_id': 20990343, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609877, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'mal_croppe': {'main_port_id': 20990317, 'sub_port_id': 20990344, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609878, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'metal': {'main_port_id': 20990317, 'sub_port_id': 20990345, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609879, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'flou': {'main_port_id': 20990317, 'sub_port_id': 20990346, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609880, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'Carton_brun': {'main_port_id': 20990317, 'sub_port_id': 20990347, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609881, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 20990317, 'sub_port_id': 20990348, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609882, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'cartonnette': {'main_port_id': 20990317, 'sub_port_id': 20990349, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609883, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'environnement': {'main_port_id': 20990317, 'sub_port_id': 20990350, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609884, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'papier': {'main_port_id': 20990317, 'sub_port_id': 20990351, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609885, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'Carton_gris': {'main_port_id': 20990317, 'sub_port_id': 20990352, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609886, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'plastique': {'main_port_id': 20990317, 'sub_port_id': 20990353, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609887, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'autre_refus': {'main_port_id': 20990317, 'sub_port_id': 20990354, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609888, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20990343 , 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=20990317 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 (20990343) result : ((1340671361,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990344 , 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=20990317 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 (20990344) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990345 , 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=20990317 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 (20990345) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990346 , 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=20990317 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 (20990346) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990347 , 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=20990317 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 (20990347) result : ((1340671774,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990348 , 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=20990317 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 (20990348) result : ((1340670878,), (1340670879,), (1340670880,), (1340670976,), (1340671343,), (1340671639,), (1340671640,), (1340671641,), (1340671737,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990349 , 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=20990317 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 (20990349) result : ((1340671226,), (1340671359,), (1340671360,), (1340671649,), (1340671650,), (1340671754,), (1340671756,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990350 , 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=20990317 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 (20990350) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990351 , 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=20990317 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 (20990351) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990352 , 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=20990317 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 (20990352) result : ((1340670982,), (1340670998,), (1340670999,), (1340671225,), (1340671352,), (1340671353,), (1340671539,), (1340671540,), (1340671647,), (1340671748,), (1340671749,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990353 , 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=20990317 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 (20990353) result : ((1340671356,), (1340671357,), (1340671358,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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 20990354 , 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=20990317 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 (20990354) result : ((1340670882,), (1340670883,), (1340670884,), (1340670885,), (1340670977,), (1340670978,), (1340670979,), (1340670980,), (1340670981,), (1340670992,), (1340670993,), (1340670994,), (1340670995,), (1340670996,), (1340671220,), (1340671221,), (1340671222,), (1340671223,), (1340671230,), (1340671231,), (1340671342,), (1340671345,), (1340671346,), (1340671347,), (1340671348,), (1340671349,), (1340671350,), (1340671351,), (1340671536,), (1340671537,), (1340671538,), (1340671622,), (1340671642,), (1340671643,), (1340671644,), (1340671645,), (1340671740,), (1340671741,), (1340671742,), (1340671743,), (1340671744,), (1340672211,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20990317) result : ((1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,)) 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 (1340671500,1340670900,1340670300) 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`=20990317 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','autre_refus','Carton_gris','cartonnette','environnement','papier','mal_croppe','Carton_brun','kraft','metal','plastique','Teint_Dans_La_Masse')) 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`=20990317 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','autre_refus','Carton_gris','cartonnette','environnement','papier','mal_croppe','Carton_brun','kraft','metal','plastique','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 20990317, 'sub_port_id': 20990355, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609889, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'mal_croppe': {'main_port_id': 20990317, 'sub_port_id': 20990356, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609890, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'metal': {'main_port_id': 20990317, 'sub_port_id': 20990357, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609891, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'flou': {'main_port_id': 20990317, 'sub_port_id': 20990358, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609892, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'Carton_brun': {'main_port_id': 20990317, 'sub_port_id': 20990359, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609893, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 20990317, 'sub_port_id': 20990360, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609894, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'cartonnette': {'main_port_id': 20990317, 'sub_port_id': 20990361, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609895, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'environnement': {'main_port_id': 20990317, 'sub_port_id': 20990362, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609896, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'papier': {'main_port_id': 20990317, 'sub_port_id': 20990363, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609897, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'Carton_gris': {'main_port_id': 20990317, 'sub_port_id': 20990364, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609898, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'plastique': {'main_port_id': 20990317, 'sub_port_id': 20990365, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609899, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}, 'autre_refus': {'main_port_id': 20990317, 'sub_port_id': 20990366, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13609900, 'last_updated_at': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 3, 20, 16, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 3, 20, 4, 56)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990355,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990343 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990356,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990344 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990357,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990345 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990358,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990346 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990359,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990347 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990360,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990348 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990361,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990349 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990362,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990350 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990363,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990351 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990364,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990352 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990365,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990353 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20990366,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20990354 lien utilise dans velours : https://www.fotonower.com/velours/20990355,20990356,20990357,20990358,20990359,20990360,20990361,20990362,20990363,20990364,20990365,20990366?tags=kraft,mal_croppe,metal,flou,Carton_brun,Teint_Dans_La_Masse,cartonnette,environnement,papier,Carton_gris,plastique,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20990317]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1340671798] map_info['map_portfolio_photo'] : {20990317: [1340671798, 1340671696, 1340671688, 1340671605, 1340671603, 1340671598, 1340671580, 1340671577, 1340671575, 1340671570, 1340671565, 1340671553, 1340671500, 1340671498, 1340671488, 1340671469, 1340671420, 1340671415, 1340671391, 1340671386, 1340671384, 1340671381, 1340671377, 1340671320, 1340671317, 1340671265, 1340671253, 1340671250, 1340671246, 1340671211, 1340671206, 1340671201, 1340671194, 1340671092, 1340671020, 1340671016, 1340671013, 1340671009, 1340671004, 1340670958, 1340670955, 1340670950, 1340670909, 1340670904, 1340670900, 1340670866, 1340670837, 1340670833, 1340670802, 1340670378, 1340670373, 1340670300, 1340670282, 1340670134, 1340670131, 1340670127, 1340670122]} final : False mtd_id 4302 list_pids : [1340671798] Looping around the photos to save general results len do output : 1 /20990317. 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, '2630415') ('4302', '20990317', '1340671798', None, None, None, None, None, '2630415') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '20990317', "{'kraft': 20990343, 'mal_croppe': 20990344, 'metal': 20990345, 'flou': 20990346, 'Carton_brun': 20990347, 'Teint_Dans_La_Masse': 20990348, 'cartonnette': 20990349, 'environnement': 20990350, 'papier': 20990351, 'Carton_gris': 20990352, 'plastique': 20990353, 'autre_refus': 20990354}", None, None, None, None, '2630415'), ('4302', '20990317', '1340671798', None, None, None, None, None, '2630415')] time used for this insertion : 0.011835336685180664 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4462425708770752 time spend to save output : 0.012028694152832031 total time spend for step 1 : 0.4582712650299072 step2:final Mon Mar 3 20:18:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20990317) 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 20990317 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1340670134,1340670131,1340670127,1340670122,1340670378,1340670373,1340670300,1340670282,1340670866,1340670837,1340670833,1340670802,1340670909,1340670904,1340670900,1340670958,1340670955,1340670950,1340671092,1340671020,1340671016,1340671013,1340671009,1340671004,1340671211,1340671206,1340671201,1340671194,1340671265,1340671253,1340671250,1340671246,1340671320,1340671317,1340671391,1340671386,1340671384,1340671381,1340671377,1340671500,1340671498,1340671488,1340671469,1340671420,1340671415,1340671580,1340671553,1340671577,1340671575,1340671570,1340671565,1340671605,1340671603,1340671598,1340671696,1340671688,1340671798); 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([20990317]) Inside saveOutput : final : False verbose : True original output for save of step final : {1340671798: ('0.07164252609311128',)} new output for save of step final : {1340671798: ('0.07164252609311128',)} [1340671798] map_info['map_portfolio_photo'] : {20990317: [1340671798, 1340671696, 1340671688, 1340671605, 1340671603, 1340671598, 1340671580, 1340671577, 1340671575, 1340671570, 1340671565, 1340671553, 1340671500, 1340671498, 1340671488, 1340671469, 1340671420, 1340671415, 1340671391, 1340671386, 1340671384, 1340671381, 1340671377, 1340671320, 1340671317, 1340671265, 1340671253, 1340671250, 1340671246, 1340671211, 1340671206, 1340671201, 1340671194, 1340671092, 1340671020, 1340671016, 1340671013, 1340671009, 1340671004, 1340670958, 1340670955, 1340670950, 1340670909, 1340670904, 1340670900, 1340670866, 1340670837, 1340670833, 1340670802, 1340670378, 1340670373, 1340670300, 1340670282, 1340670134, 1340670131, 1340670127, 1340670122]} final : False mtd_id 4302 list_pids : [1340671798] Looping around the photos to save general results len do output : 1 /1340671798.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, '2630415') ('4302', '20990317', '1340671798', None, None, None, None, None, '2630415') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 3 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', '20990317', '1340671798', '0.07164252609311128', None, None, None, None, '2630415')] time used for this insertion : 0.010811805725097656 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.06989502906799316 time spend to save output : 0.011011600494384766 total time spend for step 2 : 0.08090662956237793 step3:velours_tree Mon Mar 3 20:18:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {20990317: [{'kraft': 20990343, 'mal_croppe': 20990344, 'metal': 20990345, 'flou': 20990346, 'Carton_brun': 20990347, 'Teint_Dans_La_Masse': 20990348, 'cartonnette': 20990349, 'environnement': 20990350, 'papier': 20990351, 'Carton_gris': 20990352, 'plastique': 20990353, 'autre_refus': 20990354}]} input_args_next_step : {20990317: ()} output_args : {20990317: [{'kraft': 20990343, 'mal_croppe': 20990344, 'metal': 20990345, 'flou': 20990346, 'Carton_brun': 20990347, 'Teint_Dans_La_Masse': 20990348, 'cartonnette': 20990349, 'environnement': 20990350, 'papier': 20990351, 'Carton_gris': 20990352, 'plastique': 20990353, 'autre_refus': 20990354}]} args : 20990317 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 : ({'kraft': 20990343, 'mal_croppe': 20990344, 'metal': 20990345, 'flou': 20990346, 'Carton_brun': 20990347, 'Teint_Dans_La_Masse': 20990348, 'cartonnette': 20990349, 'environnement': 20990350, 'papier': 20990351, 'Carton_gris': 20990352, 'plastique': 20990353, 'autre_refus': 20990354},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20990317) 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([20990317]) 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.2693901062011719 time spend to save output : 3.981590270996094e-05 total time spend for step 3 : 0.26942992210388184 step4:send_mail_cod Mon Mar 3 20:18: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 : {1340671798: ('0.07164252609311128',)} input_args_next_step : {1340671798: ()} output_args : {1340671798: ('0.07164252609311128',)} args : 1340671798 depend.output_id : 0 complete output_args for input 3 : {20990317: [{'kraft': 20990343, 'mal_croppe': 20990344, 'metal': 20990345, 'flou': 20990346, 'Carton_brun': 20990347, 'Teint_Dans_La_Masse': 20990348, 'cartonnette': 20990349, 'environnement': 20990350, 'papier': 20990351, 'Carton_gris': 20990352, 'plastique': 20990353, 'autre_refus': 20990354}]} input_args_next_step : {1340671798: ('0.07164252609311128',), 20990317: ()} output_args : {20990317: [{'kraft': 20990343, 'mal_croppe': 20990344, 'metal': 20990345, 'flou': 20990346, 'Carton_brun': 20990347, 'Teint_Dans_La_Masse': 20990348, 'cartonnette': 20990349, 'environnement': 20990350, 'papier': 20990351, 'Carton_gris': 20990352, 'plastique': 20990353, 'autre_refus': 20990354}]} args : 20990317 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 :2, first value : ('0.07164252609311128',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20990317) 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 (1340671798) Found this number of photos: 1 ##### Call download_photos : nb_thread : 5 begin to download photo : 1340671798 download finish for photo 1340671798 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos length of list_filenames : 1 ; length of list_pids : 1 ; length of list_args : 1 results_Auto_P20990317_03-03-2025_20_18_58.pdf 20990343 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=20990343 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340671361: '1741028942_3076839_1340671020_8f6c693c43307b09eb8d2e43e810cbcf_rle_crop_3692620801_0.png'} change filename to text .imagette209903431741029538/ imagette209903431741029538/1741028942_3076839_1340671020_8f6c693c43307b09eb8d2e43e810cbcf_rle_crop_3692620801_0.png.png imagette209903441741029539/ imagette209903451741029539/ imagette209903461741029539/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/ad9779dc9413903022028d062dd5b342_11730517.png imagette209903431741029538 20990344 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=20990344 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette209903441741029539 20990345 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=20990345 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette209903451741029539 20990346 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=20990346 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette209903461741029539 20990349 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=20990349 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340671226: '1741028831_3075104_1340670900_e63223012024c41527144c55fa8240a2_rle_crop_3692620347_0.png', 1340671359: '1741028942_3076839_1340671013_ff46b629363ddc79f6ea21181cc49ae9_rle_crop_3692620834_0.png', 1340671360: '1741028942_3076839_1340671009_9b6f9aa548d1a088acf06c5a81b40b7e_rle_crop_3692620851_0.png', 1340671649: '1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622563_0.png', 1340671650: '1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622562_0.png', 1340671754: '1741029331_3083185_1340671575_6c0410f1ca05d87e6a82329f76f2ff16_rle_crop_3692624830_0.png', 1340671756: '1741029331_3083185_1340671570_11d65c69c2469c4b857e9c33b33affa7_rle_crop_3692624844_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/17557059a20974e0d1cdaeeecc6dee03_84475714.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/ee3dab363fa4a5aa77ea7fede2a37259_92109476.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/7397b013b71e3209ee4315841525ee5b_52370503.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/805309a27d04c0b495d97944f45ccf28_3540278.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/860ce2e2e9d96c64e8997e71c7db50ec_74678261.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/6b6286613acb458c494a78fc9d418538_51646025.png change filename to text .imagette209903491741029539/ imagette209903491741029539/1741028831_3075104_1340670900_e63223012024c41527144c55fa8240a2_rle_crop_3692620347_0.png.png imagette209903491741029539/1741028942_3076839_1340671009_9b6f9aa548d1a088acf06c5a81b40b7e_rle_crop_3692620851_0.png.png imagette209903491741029539/1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622563_0.png.png imagette209903491741029539/1741029331_3083185_1340671570_11d65c69c2469c4b857e9c33b33affa7_rle_crop_3692624844_0.png.png imagette209903491741029539/1741029331_3083185_1340671575_6c0410f1ca05d87e6a82329f76f2ff16_rle_crop_3692624830_0.png.png imagette209903491741029539/1741028942_3076839_1340671013_ff46b629363ddc79f6ea21181cc49ae9_rle_crop_3692620834_0.png.png imagette209903491741029539/1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622562_0.png.png wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/7d6053c08a2cd9ccbce060935e540c34_86190649.png imagette209903491741029539 20990353 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=20990353 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340671356: '1741028952_3077055_1340671201_8a8745b7a81eeea490bc2001d7c86ce3_rle_crop_3692620878_0.png', 1340671357: '1741028952_3077055_1340671194_c6d99ffe95fa5147712a54d85b181d2a_rle_crop_3692620897_0.png', 1340671358: '1741028952_3077055_1340671194_c6d99ffe95fa5147712a54d85b181d2a_rle_crop_3692620905_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/a848fb3bbf12d0de16bd6072267b9eee_48223423.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/d108ce96c024e744d6c6ab6f78435969_77516056.png change filename to text .imagette209903531741029539/ imagette209903531741029539/1741028952_3077055_1340671194_c6d99ffe95fa5147712a54d85b181d2a_rle_crop_3692620905_0.png.png imagette209903531741029539/1741028952_3077055_1340671201_8a8745b7a81eeea490bc2001d7c86ce3_rle_crop_3692620878_0.png.png imagette209903531741029539/1741028952_3077055_1340671194_c6d99ffe95fa5147712a54d85b181d2a_rle_crop_3692620897_0.png.png wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/dad6313c17f6dc6e28486beb13de0ed8_34299025.png imagette209903531741029539 20990354 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=20990354 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340671642: '1741029210_3080993_1340671386_2316470528cc07fcb1839a9a058fe92c_rle_crop_3692622390_0.png', 1340671346: '1741028942_3076839_1340671016_3c5ce4b9564811cee82dcff9ddf3f9a7_rle_crop_3692620813_0.png', 1340671347: '1741028942_3076839_1340671013_ff46b629363ddc79f6ea21181cc49ae9_rle_crop_3692620844_0.png', 1340671348: '1741028942_3076839_1340671009_9b6f9aa548d1a088acf06c5a81b40b7e_rle_crop_3692620853_0.png', 1340671349: '1741028952_3077055_1340671206_0398a24983d5186a0f4b787ba38864f8_rle_crop_3692620826_0.png', 1340671350: '1741028952_3077055_1340671201_8a8745b7a81eeea490bc2001d7c86ce3_rle_crop_3692620874_0.png', 1340671351: '1741028952_3077055_1340671194_c6d99ffe95fa5147712a54d85b181d2a_rle_crop_3692620903_0.png', 1340671536: '1741029071_3078916_1340671253_7b7e69d48c45471f30552af6b64dfc6b_rle_crop_3692621856_0.png', 1340671537: '1741029071_3078916_1340671250_78413fd56fefaf21e5120764972d4f88_rle_crop_3692621880_0.png', 1340671538: '1741029071_3078916_1340671246_0a1c67850d627cddf085d16cf39731c7_rle_crop_3692621885_0.png', 1340671622: '1741029192_3080659_1340671391_301078399a42cd31d3550c8af5bd95b3_rle_crop_3692622179_0.png', 1340671345: '1741028942_3076839_1340671020_8f6c693c43307b09eb8d2e43e810cbcf_rle_crop_3692620802_0.png', 1340671643: '1741029210_3080993_1340671384_a9fc135262dbfab9baf26f681c61c6eb_rle_crop_3692622532_0.png', 1340671644: '1741029210_3080993_1340671381_ddf983bff689b1ffcc028f8ec3317de5_rle_crop_3692622550_0.png', 1340671645: '1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622571_0.png', 1340671740: '1741029331_3083185_1340671605_a73c288bbdd0718b03c66132b4534910_rle_crop_3692624799_0.png', 1340671741: '1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624813_0.png', 1340671742: '1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624823_0.png', 1340671743: '1741029331_3083185_1340671570_11d65c69c2469c4b857e9c33b33affa7_rle_crop_3692624847_0.png', 1340671744: '1741029331_3083185_1340671565_545f20a627784408f4ff783412f38070_rle_crop_3692624865_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/e60a003d574ccc2fb89412269d85f55e_53365601.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/9929406f5cf392e7a1ffc4858215d392_21321745.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/68e1b4b4fa27ac5d42004d3e8715ba18_27369218.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/31d48070347af27cb6937e9e3352de42_51471678.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/9e553bc6420dd8492cad4995f0bdf365_69306152.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/303e554e07b506d0f7ffea41b70627ef_86376236.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/a7496c69e358066db8e1fb06b29f5ac6_13037714.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/084d5f58ce5135b2f08a1366741c9f50_81883618.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/d7f1b2631b9f71597f2d8c17791e7934_35827166.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/b52623043d102dc7a213eed5e1c9eb67_31255710.png change filename to text .wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/54e46a55ac3ed4b0632f15d0dcf72290_79557187.png change filename to text .wget -O 12.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/6eb46638364a24df2ef55c922934239e_25035485.png change filename to text .wget -O 13.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/9680b90a80a4c1d366f64c077c724a4e_38019119.png change filename to text .wget -O 14.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/fb872631e9e750cd29b8884905f4a585_79517547.png change filename to text .wget -O 15.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/2a3c67a0c137726453a2ea9e38ab8ecd_20348094.png change filename to text .wget -O 16.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/879af382f06f9afb00fa9d966482b79c_53457840.png change filename to text .wget -O 17.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/47297f858422c00994ed2b7a543230dc_91269443.png change filename to text .wget -O 18.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/31467016aa5cabd937406988d9701010_72582222.png change filename to text .wget -O 19.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/1a3d1874915f819c6df6f253aee7fdb8_64885863.png change filename to text .imagette209903541741029539/ imagette209903541741029539/1741029331_3083185_1340671565_545f20a627784408f4ff783412f38070_rle_crop_3692624865_0.png.png imagette209903541741029539/1741028942_3076839_1340671016_3c5ce4b9564811cee82dcff9ddf3f9a7_rle_crop_3692620813_0.png.png imagette209903541741029539/1741028942_3076839_1340671013_ff46b629363ddc79f6ea21181cc49ae9_rle_crop_3692620844_0.png.png imagette209903541741029539/1741028942_3076839_1340671009_9b6f9aa548d1a088acf06c5a81b40b7e_rle_crop_3692620853_0.png.png imagette209903541741029539/1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624823_0.png.png imagette209903541741029539/1741029071_3078916_1340671246_0a1c67850d627cddf085d16cf39731c7_rle_crop_3692621885_0.png.png imagette209903541741029539/1741029210_3080993_1340671381_ddf983bff689b1ffcc028f8ec3317de5_rle_crop_3692622550_0.png.png imagette209903541741029539/1741028942_3076839_1340671020_8f6c693c43307b09eb8d2e43e810cbcf_rle_crop_3692620802_0.png.png imagette209903541741029539/1741029071_3078916_1340671250_78413fd56fefaf21e5120764972d4f88_rle_crop_3692621880_0.png.png imagette209903541741029539/1741028952_3077055_1340671194_c6d99ffe95fa5147712a54d85b181d2a_rle_crop_3692620903_0.png.png imagette209903541741029539/1741029331_3083185_1340671570_11d65c69c2469c4b857e9c33b33affa7_rle_crop_3692624847_0.png.png imagette209903541741029539/1741029071_3078916_1340671253_7b7e69d48c45471f30552af6b64dfc6b_rle_crop_3692621856_0.png.png imagette209903541741029539/1741028952_3077055_1340671206_0398a24983d5186a0f4b787ba38864f8_rle_crop_3692620826_0.png.png imagette209903541741029539/1741029331_3083185_1340671605_a73c288bbdd0718b03c66132b4534910_rle_crop_3692624799_0.png.png imagette209903541741029539/1741028952_3077055_1340671201_8a8745b7a81eeea490bc2001d7c86ce3_rle_crop_3692620874_0.png.png imagette209903541741029539/1741029192_3080659_1340671391_301078399a42cd31d3550c8af5bd95b3_rle_crop_3692622179_0.png.png imagette209903541741029539/1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624813_0.png.png imagette209903541741029539/1741029210_3080993_1340671386_2316470528cc07fcb1839a9a058fe92c_rle_crop_3692622390_0.png.png imagette209903541741029539/1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622571_0.png.png imagette209903541741029539/1741029210_3080993_1340671384_a9fc135262dbfab9baf26f681c61c6eb_rle_crop_3692622532_0.png.png wget -O 20.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/fa448a65183ed81478684b917fb7f548_96874443.png imagette209903541741029539 20990347 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=20990347 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340671774: '1741029331_3083185_1340671553_62cb86e30bdcc569e47d987d94896ccf_rle_crop_3692624879_0.png'} change filename to text .imagette209903471741029540/ imagette209903471741029540/1741029331_3083185_1340671553_62cb86e30bdcc569e47d987d94896ccf_rle_crop_3692624879_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/493ba1bc5e993b755cb4ce8bbc0c789b_72431762.png imagette209903471741029540 20990348 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=20990348 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340670878: '1741028593_3071574_1340670131_39ab8952c51eade9501022ed32b4a372_rle_crop_3692618941_0.png', 1340670879: '1741028593_3071574_1340670127_14d4451ccf03aeb68c45d86a85626803_rle_crop_3692618952_0.png', 1340670880: '1741028593_3071574_1340670122_1c86b202ffd1161981606d43f8eb0926_rle_crop_3692618967_0.png', 1340670976: '1741028713_3073344_1340670373_5e719bbd64fe1c7e5bc464c9292c4096_rle_crop_3692619451_0.png', 1340671343: '1741028952_3077055_1340671206_0398a24983d5186a0f4b787ba38864f8_rle_crop_3692620824_0.png', 1340671639: '1741029210_3080993_1340671384_a9fc135262dbfab9baf26f681c61c6eb_rle_crop_3692622525_0.png', 1340671640: '1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622566_0.png', 1340671641: '1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622565_0.png', 1340671737: '1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624822_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/4b60d368f4a64206ae4382e32cd99ed8_97296732.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/f83aeaa12bdb06a078ff19ceccb49f62_12786880.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/bb9b82c035d71b4ffc839312de4af27f_94937786.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/5e8fdae86c954f5dcbd83da0bdb538cb_73703163.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/062bf2d8dcc8e1374488c18503440b4c_81613803.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/a41d5b16c152dfafc597f20942942aba_51905073.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/b0cf0594dc36f78c5f619181d2069541_25200435.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/8848983ec4b4b82b118d36631ec3b3a5_27520735.png change filename to text .imagette209903481741029540/ imagette209903481741029540/1741028593_3071574_1340670131_39ab8952c51eade9501022ed32b4a372_rle_crop_3692618941_0.png.png imagette209903481741029540/1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622565_0.png.png imagette209903481741029540/1741028952_3077055_1340671206_0398a24983d5186a0f4b787ba38864f8_rle_crop_3692620824_0.png.png imagette209903481741029540/1741029210_3080993_1340671384_a9fc135262dbfab9baf26f681c61c6eb_rle_crop_3692622525_0.png.png imagette209903481741029540/1741028713_3073344_1340670373_5e719bbd64fe1c7e5bc464c9292c4096_rle_crop_3692619451_0.png.png imagette209903481741029540/1741028593_3071574_1340670127_14d4451ccf03aeb68c45d86a85626803_rle_crop_3692618952_0.png.png imagette209903481741029540/1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624822_0.png.png imagette209903481741029540/1741029210_3080993_1340671377_e813ef86e8507dcbd33fedcdccf61300_rle_crop_3692622566_0.png.png imagette209903481741029540/1741028593_3071574_1340670122_1c86b202ffd1161981606d43f8eb0926_rle_crop_3692618967_0.png.png wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/267f88b7f4ffe632eccb535b64862f1d_48586715.png imagette209903481741029540 20990352 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=20990352 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1340670982: '1741028713_3073344_1340670282_79f0964d84e25e15230f17250695f036_rle_crop_3692619475_0.png', 1340670998: '1741028732_3073579_1340670837_8cd1dfef44fe59fed412a9daaab71280_rle_crop_3692619934_0.png', 1340670999: '1741028732_3073579_1340670833_2076f9f8e7905b7032ac2d57c07567da_rle_crop_3692620004_0.png', 1340671225: '1741028831_3075104_1340670904_de555c7ef425b49c406277f601544895_rle_crop_3692620319_0.png', 1340671352: '1741028942_3076839_1340671211_963f91180d10778dcfbf5032f64402d9_rle_crop_3692620788_0.png', 1340671353: '1741028942_3076839_1340671016_3c5ce4b9564811cee82dcff9ddf3f9a7_rle_crop_3692620807_0.png', 1340671539: '1741029071_3078916_1340671320_a3fec5c06cc5adf1ddeeaaba27e68d1f_rle_crop_3692621845_0.png', 1340671540: '1741029071_3078916_1340671250_78413fd56fefaf21e5120764972d4f88_rle_crop_3692621867_0.png', 1340671647: '1741029210_3080993_1340671381_ddf983bff689b1ffcc028f8ec3317de5_rle_crop_3692622540_0.png', 1340671748: '1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624815_0.png', 1340671749: '1741029331_3083185_1340671570_11d65c69c2469c4b857e9c33b33affa7_rle_crop_3692624840_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/2947bf5f6b07b775e1727f4967b4cee6_65645554.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/792d771baae7256cc10630d8248d4807_46768753.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/b07b43f43df7e83c9eecc936f744b63d_5801821.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/d07cd92199e845b83ee8069cea678aed_4941438.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/7e3de6090a605e278c9b155f97ab2ce3_55203710.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/b253d9fd0236d70f2ac561d801d891fb_96525364.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/971620e0390cb8314a15758555f6e4a7_76051943.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/61f632e6845b556a85b629c88b062b5e_85191374.png change filename to text .wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/322747309693bc4dc0018d7470b90a26_58472385.png change filename to text .wget -O 10.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/5d6491b4e01003fbe323fed293ce5c96_22691891.png change filename to text .imagette209903521741029541/ imagette209903521741029541/1741029071_3078916_1340671320_a3fec5c06cc5adf1ddeeaaba27e68d1f_rle_crop_3692621845_0.png.png imagette209903521741029541/1741029331_3083185_1340671570_11d65c69c2469c4b857e9c33b33affa7_rle_crop_3692624840_0.png.png imagette209903521741029541/1741028732_3073579_1340670837_8cd1dfef44fe59fed412a9daaab71280_rle_crop_3692619934_0.png.png imagette209903521741029541/1741028942_3076839_1340671016_3c5ce4b9564811cee82dcff9ddf3f9a7_rle_crop_3692620807_0.png.png imagette209903521741029541/1741028713_3073344_1340670282_79f0964d84e25e15230f17250695f036_rle_crop_3692619475_0.png.png imagette209903521741029541/1741028942_3076839_1340671211_963f91180d10778dcfbf5032f64402d9_rle_crop_3692620788_0.png.png imagette209903521741029541/1741029071_3078916_1340671250_78413fd56fefaf21e5120764972d4f88_rle_crop_3692621867_0.png.png imagette209903521741029541/1741029331_3083185_1340671577_c86f6130733811091d3781b942e1be97_rle_crop_3692624815_0.png.png imagette209903521741029541/1741029210_3080993_1340671381_ddf983bff689b1ffcc028f8ec3317de5_rle_crop_3692622540_0.png.png imagette209903521741029541/1741028831_3075104_1340670904_de555c7ef425b49c406277f601544895_rle_crop_3692620319_0.png.png imagette209903521741029541/1741028732_3073579_1340670833_2076f9f8e7905b7032ac2d57c07567da_rle_crop_3692620004_0.png.png wget -O 11.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/e622433bb48d3333cec508fa5c8384b1_28026046.png imagette209903521741029541 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=20990317 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/20990355,20990356,20990357,20990358,20990359,20990360,20990361,20990362,20990363,20990364,20990365,20990366?tags=kraft,mal_croppe,metal,flou,Carton_brun,Teint_Dans_La_Masse,cartonnette,environnement,papier,Carton_gris,plastique,autre_refus your option no_mail is active, we will not send the real mail to your client args[1340671798] : ('0.07164252609311128',) no score found for photo 1340671798 We are sending mail with results at report@fotonower.com refus_total : 0.07164252609311128 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=20990317 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_P20990317_03-03-2025_20_18_58.pdf results_Auto_P20990317_03-03-2025_20_18_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20990317_03-03-2025_20_18_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','20990317','results_Auto_P20990317_03-03-2025_20_18_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20990317_03-03-2025_20_18_58.pdf','pdf','','0.19','0.07164252609311128') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20990317]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1340671798] map_info['map_portfolio_photo'] : {20990317: [1340671798, 1340671696, 1340671688, 1340671605, 1340671603, 1340671598, 1340671580, 1340671577, 1340671575, 1340671570, 1340671565, 1340671553, 1340671500, 1340671498, 1340671488, 1340671469, 1340671420, 1340671415, 1340671391, 1340671386, 1340671384, 1340671381, 1340671377, 1340671320, 1340671317, 1340671265, 1340671253, 1340671250, 1340671246, 1340671211, 1340671206, 1340671201, 1340671194, 1340671092, 1340671020, 1340671016, 1340671013, 1340671009, 1340671004, 1340670958, 1340670955, 1340670950, 1340670909, 1340670904, 1340670900, 1340670866, 1340670837, 1340670833, 1340670802, 1340670378, 1340670373, 1340670300, 1340670282, 1340670134, 1340670131, 1340670127, 1340670122]} final : False mtd_id 4302 list_pids : [1340671798] 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, '2630415') ('4302', '20990317', '1340671798', None, None, None, None, None, '2630415') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 1 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', '20990317', '1340671798', None, None, None, None, None, '2630415')] time used for this insertion : 0.0115203857421875 save_final save missing photos in datou_result : time spend for datou_step_exec : 6.915118455886841 time spend to save output : 0.011690378189086914 total time spend for step 4 : 6.926808834075928 step5:split_time_score Mon Mar 3 20:19:05 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 : ['20990317'] 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 : [('20990317',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20990317) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1340671798: {'path': 'temp/1741029538_4133732_1340671798_2c8e2802aa0642852ba7d3e4393915be.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 = 20990317; (('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 = 20990317 group by h (('20', 57),) 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=20990317 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 (20990317) 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 (20990317) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 03032025 20990317 Nombre de photos uploadées : 57 / 23040 (0%) 03032025 20990317 Nombre de photos taguées (types de déchets): 0 / 57 (0%) 03032025 20990317 Nombre de photos taguées (volume) : 0 / 57 (0%) [{'photo_id': 1340670134, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/504c7e39f19a5410f87caa064845396e.jpg', 'username': None, 'uploaded_at': 1741028480, 'text': 'image_03032025_20_00_14_10217.jpg'}, {'photo_id': 1340670131, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/39ab8952c51eade9501022ed32b4a372.jpg', 'username': None, 'uploaded_at': 1741028480, 'text': 'image_03032025_20_00_24_10140.jpg'}, {'photo_id': 1340670127, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/14d4451ccf03aeb68c45d86a85626803.jpg', 'username': None, 'uploaded_at': 1741028480, 'text': 'image_03032025_20_00_34_10143.jpg'}, {'photo_id': 1340670122, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/3/1c86b202ffd1161981606d43f8eb0926.jpg', 'username': None, 'uploaded_at': 1741028480, 'text': 'image_03032025_20_00_44_10142.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.6226043701171875e-06 elapsed_time : order_list_meta_photo_and_scores 6.4373016357421875e-06 ????????????????????????????????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0024259090423583984 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 20990317, '2025-03-03' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1634063,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.0229949951171875 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= 1634063 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1634063, 'dashboard_run_id': 1643410, 'mtr_portfolio_id': 20989064, 'dashboard_result_id': 9180664, '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_P20989064_03-03-2025_19_48_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20989067, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20989068, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20989069, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20989070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20989071, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20989072, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20989073, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20989074, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20989075, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20989076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20989077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20989078, 'pht': 3726}}"}, {'dashboat_entry_day': 1634063, 'dashboard_run_id': 1643410, 'mtr_portfolio_id': 20989548, 'dashboard_result_id': 9180665, '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_P20989548_03-03-2025_20_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20989578, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20989579, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20989580, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20989581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20989582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20989583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20989584, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20989585, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20989586, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20989587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20989588, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20989589, 'pht': 3726}}"}, {'dashboat_entry_day': 1634063, 'dashboard_run_id': 1643410, 'mtr_portfolio_id': 20990317, 'dashboard_result_id': 9180666, '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_P20990317_03-03-2025_20_16_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20990343, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20990344, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20990345, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20990346, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20990347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20990348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20990349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20990350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20990351, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20990352, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20990353, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20990354, 'pht': 3726}}"}, {'dashboat_entry_day': 1634063, 'dashboard_run_id': 1643410, 'mtr_portfolio_id': 20990909, 'dashboard_result_id': 9180667, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] 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 = 20989064 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': 2630331, 'mtr_portfolio_id': 20989064, 'created_at': datetime.datetime(2025, 3, 3, 19, 48, 57), 'result': '0.08738803319697101', 'result_long': None, 'result_double': None}] Qualite : 0.08738803319697101 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20989064 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20989064_03-03-2025_19_48_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20989064 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_P20989064_03-03-2025_19_48_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20989067, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20989068, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20989069, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20989070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20989071, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20989072, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20989073, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20989074, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20989075, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20989076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20989077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20989078, 'pht': 3726}}" where mtr_portfolio_id = 20989064 and dashboard_run_id = 1643410 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`=20989064 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9180664, 0.08738803319697101, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20989064_03-03-2025_19_48_57.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20989067, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20989068, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20989069, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20989070, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20989071, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20989072, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20989073, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20989074, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20989075, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20989076, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20989077, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20989078, '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 = 20989548 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': 2630367, 'mtr_portfolio_id': 20989548, 'created_at': datetime.datetime(2025, 3, 3, 20, 2, 59), 'result': '0.09049298749239297', 'result_long': None, 'result_double': None}] Qualite : 0.09049298749239297 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20989548 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20989548_03-03-2025_20_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20989548 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_P20989548_03-03-2025_20_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20989578, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20989579, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20989580, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20989581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20989582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20989583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20989584, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20989585, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20989586, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20989587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20989588, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20989589, 'pht': 3726}}" where mtr_portfolio_id = 20989548 and dashboard_run_id = 1643410 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`=20989548 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9180665, 0.09049298749239297, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20989548_03-03-2025_20_03_00.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20989578, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20989579, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20989580, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20989581, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20989582, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20989583, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20989584, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20989585, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20989586, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20989587, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20989588, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20989589, '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 = 20990317 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': 2630415, 'mtr_portfolio_id': 20990317, 'created_at': datetime.datetime(2025, 3, 3, 20, 18, 58), 'result': '0.07164252609311128', 'result_long': None, 'result_double': None}] Qualite : 0.07164252609311128 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20990317 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20990317_03-03-2025_20_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20990317 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_P20990317_03-03-2025_20_18_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20990343, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20990344, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20990345, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20990346, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20990347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20990348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20990349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20990350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20990351, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20990352, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20990353, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20990354, 'pht': 3726}}" where mtr_portfolio_id = 20990317 and dashboard_run_id = 1643410 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`=20990317 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9180666, 0.07164252609311128, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P20990317_03-03-2025_20_18_58.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 20990343, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 20990344, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 20990345, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 20990346, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 20990347, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 20990348, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 20990349, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 20990350, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 20990351, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 20990352, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 20990353, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 20990354, '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 = 20990909 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 20990909 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 20990909 order by file_id desc limit 1 select url from MTRUser.mtr_files where text like '%20990909%' order by file_id desc limit 1 find url: select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 20990909 order by id desc limit 1 update MTRPhoto.dashboard_results set completion_json = "{'max_time_prod_two_photos': 0, 'url_report': ''}" where mtr_portfolio_id = 20990909 and dashboard_run_id = 1643410 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20989064,20989548,20990317,20990909) result : ((1340665534,), (1340665543,), (1340665545,), (1340665551,), (1340665555,), (1340665597,), (1340665602,), (1340665605,), (1340665609,), (1340665612,), (1340665675,), (1340665679,), (1340665693,), (1340665696,), (1340665705,), (1340665714,), (1340665737,), (1340665754,), (1340665760,), (1340665763,), (1340665769,), (1340665772,), (1340665793,), (1340665799,), (1340665805,), (1340665810,), (1340665840,), (1340665858,), (1340665863,), (1340665869,), (1340665876,), (1340665895,), (1340665899,), (1340665905,), (1340665911,), (1340665916,), (1340666617,), (1340666629,), (1340666761,), (1340666921,), (1340666924,), (1340666928,), (1340667173,), (1340667176,), (1340667181,), (1340667184,), (1340667188,), (1340667280,), (1340667422,), (1340667425,), (1340667430,), (1340667434,), (1340667439,), (1340667471,), (1340667475,), (1340667478,), (1340667482,), (1340667487,), (1340667541,), (1340667545,), (1340667548,), (1340667554,), (1340667560,), (1340667567,), (1340667595,), (1340667597,), (1340667600,), (1340667605,), (1340667647,), (1340667651,), (1340667654,), (1340667658,), (1340667787,), (1340667692,), (1340667698,), (1340667735,), (1340667926,), (1340667935,), (1340667941,), (1340667950,), (1340667961,), (1340668033,), (1340668432,), (1340668435,), (1340668445,), (1340668574,), (1340668584,), (1340668588,), (1340668592,), (1340668626,), (1340668630,), (1340668636,), (1340668649,), (1340668653,), (1340668659,), (1340668700,), (1340668705,), (1340668712,), (1340668719,), (1340668758,), (1340668821,), (1340668954,), (1340668958,), (1340668962,), (1340669003,), (1340669030,), (1340669036,), (1340669047,), (1340669050,), (1340669074,), (1340669077,), (1340669080,), (1340669085,), (1340669132,), (1340669135,), (1340669138,), (1340669140,), (1340669149,), (1340669184,), (1340669187,), (1340669190,), (1340669248,), (1340669250,), (1340669252,), (1340669255,), (1340669314,), (1340669316,), (1340669318,), (1340669383,), (1340669458,), (1340669521,), (1340669910,), (1340669941,), (1340670044,), (1340670085,), (1340670090,), (1340670139,), (1340670122,), (1340670127,), (1340670131,), (1340670134,), (1340670282,), (1340670300,), (1340670373,), (1340670378,), (1340670802,), (1340670833,), (1340670837,), (1340670866,), (1340670900,), (1340670904,), (1340670909,), (1340670950,), (1340670955,), (1340670958,), (1340671004,), (1340671009,), (1340671013,), (1340671016,), (1340671020,), (1340671092,), (1340671194,), (1340671201,), (1340671206,), (1340671211,), (1340671246,), (1340671250,), (1340671253,), (1340671265,), (1340671317,), (1340671320,), (1340671377,), (1340671381,), (1340671384,), (1340671386,), (1340671391,), (1340671415,), (1340671420,), (1340671469,), (1340671488,), (1340671498,), (1340671500,), (1340671553,), (1340671565,), (1340671570,), (1340671575,), (1340671577,), (1340671580,), (1340671598,), (1340671603,), (1340671605,), (1340671688,), (1340671696,), (1340671798,), (1340671728,), (1340671732,), (1340671735,), (1340671745,), (1340672167,), (1340672170,), (1340672172,), (1340672177,), (1340672181,), (1340672185,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03032025': {'nb_upload': 57, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20990317]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1340671798] map_info['map_portfolio_photo'] : {20990317: [1340671798, 1340671696, 1340671688, 1340671605, 1340671603, 1340671598, 1340671580, 1340671577, 1340671575, 1340671570, 1340671565, 1340671553, 1340671500, 1340671498, 1340671488, 1340671469, 1340671420, 1340671415, 1340671391, 1340671386, 1340671384, 1340671381, 1340671377, 1340671320, 1340671317, 1340671265, 1340671253, 1340671250, 1340671246, 1340671211, 1340671206, 1340671201, 1340671194, 1340671092, 1340671020, 1340671016, 1340671013, 1340671009, 1340671004, 1340670958, 1340670955, 1340670950, 1340670909, 1340670904, 1340670900, 1340670866, 1340670837, 1340670833, 1340670802, 1340670378, 1340670373, 1340670300, 1340670282, 1340670134, 1340670131, 1340670127, 1340670122]} final : True mtd_id 4302 list_pids : [1340671798] Looping around the photos to save general results len do output : 1 /20990317Didn'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, '2630415') ('4302', '20990317', '1340671798', None, None, None, None, None, '2630415') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 2 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, '20990317', 'None', None, None, None, None, '2630415'), ('4302', '20990317', '1340671798', None, None, None, None, None, '2630415')] time used for this insertion : 0.01214146614074707 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0516164302825928 time spend to save output : 0.012365579605102539 total time spend for step 5 : 1.0639820098876953 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 (2630415) 1.81user 2.47system 0:12.58elapsed 34%CPU (0avgtext+0avgdata 156320maxresident)k 672inputs+8776outputs (14major+61653minor)pagefaults 0swaps