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 : 2739163 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 (2598523) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2598523) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663118 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2598523'] with mtr_portfolio_ids : ['20663118'] and first list_photo_ids : [] new path : /proc/2739163/ Name: python3 Umask: 0002 State: R (running) Tgid: 2739163 Ngid: 0 Pid: 2739163 PPid: 2739162 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2739163 NSpid: 2739163 NSpgid: 2738121 NSsid: 2738121 VmPeak: 1106840 kB VmSize: 1106840 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98048 kB VmRSS: 98048 kB RssAnon: 59756 kB RssFile: 38292 kB RssShmem: 0 kB VmData: 865592 kB VmStk: 132 kB VmExe: 2640 kB VmLib: 130468 kB VmPTE: 556 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 4/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: 46 nonvoluntary_ctxt_switches: 164 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2739163', 'Ngid': '0', 'Pid': '2739163', 'PPid': '2739162', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2739163', 'NSpid': '2739163', 'NSpgid': '2738121', 'NSsid': '2738121', 'VmPeak': '1106840 kB', 'VmSize': '1106840 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98048 kB', 'VmRSS': '98048 kB', 'RssAnon': '59756 kB', 'RssFile': '38292 kB', 'RssShmem': '0 kB', 'VmData': '865592 kB', 'VmStk': '132 kB', 'VmExe': '2640 kB', 'VmLib': '130468 kB', 'VmPTE': '556 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '4/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': '46', 'nonvoluntary_ctxt_switches': '164'} ('datou_batch_current', '2739163', '1106840', '0', '1106840', '865592', '98048', b'', 'marlene', '2598523') 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 (20663118) 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 (2598523 ) ) 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 (20663118) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1338474973, 'portfolio_id': 20663118}, {'photo_id': 1338474971, 'portfolio_id': 20663118}, {'photo_id': 1338474966, 'portfolio_id': 20663118}, {'photo_id': 1338474962, 'portfolio_id': 20663118}, {'photo_id': 1338474960, 'portfolio_id': 20663118}, {'photo_id': 1338474930, 'portfolio_id': 20663118}, {'photo_id': 1338474929, 'portfolio_id': 20663118}, {'photo_id': 1338474928, 'portfolio_id': 20663118}, {'photo_id': 1338474927, 'portfolio_id': 20663118}, {'photo_id': 1338474926, 'portfolio_id': 20663118}, {'photo_id': 1338474904, 'portfolio_id': 20663118}, {'photo_id': 1338474902, 'portfolio_id': 20663118}, {'photo_id': 1338474900, 'portfolio_id': 20663118}, {'photo_id': 1338474899, 'portfolio_id': 20663118}, {'photo_id': 1338474898, 'portfolio_id': 20663118}, {'photo_id': 1338474897, 'portfolio_id': 20663118}, {'photo_id': 1338474637, 'portfolio_id': 20663118}, {'photo_id': 1338474633, 'portfolio_id': 20663118}, {'photo_id': 1338474625, 'portfolio_id': 20663118}, {'photo_id': 1338474320, 'portfolio_id': 20663118}, {'photo_id': 1338474278, 'portfolio_id': 20663118}, {'photo_id': 1338474277, 'portfolio_id': 20663118}, {'photo_id': 1338474276, 'portfolio_id': 20663118}, {'photo_id': 1338474256, 'portfolio_id': 20663118}, {'photo_id': 1338474254, 'portfolio_id': 20663118}, {'photo_id': 1338474233, 'portfolio_id': 20663118}, {'photo_id': 1338474232, 'portfolio_id': 20663118}, {'photo_id': 1338474231, 'portfolio_id': 20663118}, {'photo_id': 1338473995, 'portfolio_id': 20663118}, {'photo_id': 1338473994, 'portfolio_id': 20663118}, {'photo_id': 1338473993, 'portfolio_id': 20663118}, {'photo_id': 1338473992, 'portfolio_id': 20663118}, {'photo_id': 1338473990, 'portfolio_id': 20663118}, {'photo_id': 1338473044, 'portfolio_id': 20663118}, {'photo_id': 1338473043, 'portfolio_id': 20663118}, {'photo_id': 1338473042, 'portfolio_id': 20663118}, {'photo_id': 1338473041, 'portfolio_id': 20663118}, {'photo_id': 1338472596, 'portfolio_id': 20663118}, {'photo_id': 1338472594, 'portfolio_id': 20663118}, {'photo_id': 1338472593, 'portfolio_id': 20663118}, {'photo_id': 1338472592, 'portfolio_id': 20663118}, {'photo_id': 1338472591, 'portfolio_id': 20663118}, {'photo_id': 1338472578, 'portfolio_id': 20663118}, {'photo_id': 1338472577, 'portfolio_id': 20663118}, {'photo_id': 1338472576, 'portfolio_id': 20663118}, {'photo_id': 1338472575, 'portfolio_id': 20663118}, {'photo_id': 1338472560, 'portfolio_id': 20663118}, {'photo_id': 1338472559, 'portfolio_id': 20663118}, {'photo_id': 1338472557, 'portfolio_id': 20663118}] map_portfolio_id_photo_id: {20663118: [1338474973, 1338474971, 1338474966, 1338474962, 1338474960, 1338474930, 1338474929, 1338474928, 1338474927, 1338474926, 1338474904, 1338474902, 1338474900, 1338474899, 1338474898, 1338474897, 1338474637, 1338474633, 1338474625, 1338474320, 1338474278, 1338474277, 1338474276, 1338474256, 1338474254, 1338474233, 1338474232, 1338474231, 1338473995, 1338473994, 1338473993, 1338473992, 1338473990, 1338473044, 1338473043, 1338473042, 1338473041, 1338472596, 1338472594, 1338472593, 1338472592, 1338472591, 1338472578, 1338472577, 1338472576, 1338472575, 1338472560, 1338472559, 1338472557]} ##### 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.016450166702270508 #### 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 Wed Feb 19 06:14:28 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 (20663118) 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 : 20663118 get user id for portfolio 20663118 get sub ptf for main ptf 20663118, type 3726 and hashtags ['autre_refus', 'papier', 'plastique', 'kraft', 'mal_croppe', 'cartonnette', 'flou', 'Teint_Dans_La_Masse', 'Carton_brun', 'environnement', 'Carton_gris', 'metal'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20663118 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','plastique','kraft','mal_croppe','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','environnement','Carton_gris','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20663118 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','plastique','kraft','mal_croppe','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','environnement','Carton_gris','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 20663118, 'sub_port_id': 20663145, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315068, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'autre_refus': {'main_port_id': 20663118, 'sub_port_id': 20663146, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315069, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'plastique': {'main_port_id': 20663118, 'sub_port_id': 20663147, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315070, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'metal': {'main_port_id': 20663118, 'sub_port_id': 20663148, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315071, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'Carton_brun': {'main_port_id': 20663118, 'sub_port_id': 20663149, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315072, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'mal_croppe': {'main_port_id': 20663118, 'sub_port_id': 20663150, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315073, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 20663118, 'sub_port_id': 20663151, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315074, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'flou': {'main_port_id': 20663118, 'sub_port_id': 20663152, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315075, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'cartonnette': {'main_port_id': 20663118, 'sub_port_id': 20663153, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315076, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'environnement': {'main_port_id': 20663118, 'sub_port_id': 20663154, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315077, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'papier': {'main_port_id': 20663118, 'sub_port_id': 20663155, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315078, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}, 'kraft': {'main_port_id': 20663118, 'sub_port_id': 20663156, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315079, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 58)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 20663145 , 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=20663118 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 (20663145) result : ((1338472743,), (1338474188,), (1338474189,), (1338474536,), (1338474537,), (1338474907,), (1338474947,), (1338474948,), (1338474949,), (1338474950,), (1338474967,), (1338474968,), (1338474990,), (1338474991,), (1338474992,), (1338475034,), (1338475035,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663146 , 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=20663118 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 (20663146) result : ((1338472727,), (1338472728,), (1338473038,), (1338473039,), (1338474183,), (1338474184,), (1338474185,), (1338474533,), (1338474534,), (1338474944,), (1338474945,), (1338474988,), (1338474989,), (1338475001,), (1338475002,), (1338475003,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663147 , 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=20663118 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 (20663147) result : ((1338472775,), (1338472776,), (1338474192,), (1338474541,), (1338474542,), (1338474924,), (1338474925,), (1338474955,), (1338474956,), (1338474957,), (1338475039,), (1338475040,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663148 , 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=20663118 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 (20663148) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663149 , 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=20663118 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 (20663149) result : ((1338472757,), (1338473040,), (1338474190,), (1338474191,), (1338474193,), (1338474194,), (1338474195,), (1338474196,), (1338474197,), (1338474539,), (1338474540,), (1338474923,), (1338474953,), (1338474954,), (1338475000,), (1338475004,), (1338475037,), (1338475038,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663150 , 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=20663118 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 (20663150) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663151 , 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=20663118 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 (20663151) result : ((1338472699,), (1338472701,), (1338472702,), (1338473036,), (1338474150,), (1338474152,), (1338474154,), (1338474156,), (1338474158,), (1338474182,), (1338474522,), (1338474524,), (1338474905,), (1338474906,), (1338474919,), (1338474920,), (1338474921,), (1338474922,), (1338474941,), (1338474942,), (1338474943,), (1338474964,), (1338474965,), (1338474984,), (1338474985,), (1338474986,), (1338474987,), (1338474999,), (1338475033,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663152 , 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=20663118 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 (20663152) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663153 , 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=20663118 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 (20663153) result : ((1338474186,), (1338474187,), (1338474538,), (1338474951,), (1338474952,), (1338474994,), (1338474995,), (1338474996,), (1338474997,), (1338474998,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663154 , 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=20663118 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 (20663154) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663155 , 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=20663118 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 (20663155) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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 20663156 , 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=20663118 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 (20663156) result : ((1338474198,), (1338474199,), (1338474908,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (20663118) result : ((1338472557,), (1338472559,), (1338472560,), (1338472575,), (1338472576,), (1338472577,), (1338472578,), (1338472591,), (1338472592,), (1338472593,), (1338472594,), (1338472596,), (1338473041,), (1338473042,), (1338473043,), (1338473044,), (1338473990,), (1338473992,), (1338473993,), (1338473994,), (1338473995,), (1338474231,), (1338474232,), (1338474233,), (1338474254,), (1338474256,), (1338474276,), (1338474277,), (1338474278,), (1338474320,), (1338474625,), (1338474633,), (1338474637,), (1338474897,), (1338474898,), (1338474899,), (1338474900,), (1338474902,), (1338474904,), (1338474926,), (1338474927,), (1338474928,), (1338474929,), (1338474930,), (1338474960,), (1338474962,), (1338474966,), (1338474971,), (1338474973,)) 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 (1338474900) 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`=20663118 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','plastique','kraft','mal_croppe','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','environnement','Carton_gris','metal')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=20663118 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','papier','plastique','kraft','mal_croppe','cartonnette','flou','Teint_Dans_La_Masse','Carton_brun','environnement','Carton_gris','metal')) AND mptpi.`min_score`=0.5 To do returned map {'Carton_gris': {'main_port_id': 20663118, 'sub_port_id': 20663157, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315080, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'autre_refus': {'main_port_id': 20663118, 'sub_port_id': 20663158, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315081, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'plastique': {'main_port_id': 20663118, 'sub_port_id': 20663159, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315082, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'metal': {'main_port_id': 20663118, 'sub_port_id': 20663160, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315083, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'Carton_brun': {'main_port_id': 20663118, 'sub_port_id': 20663161, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315084, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'mal_croppe': {'main_port_id': 20663118, 'sub_port_id': 20663162, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315085, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 20663118, 'sub_port_id': 20663163, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315086, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'flou': {'main_port_id': 20663118, 'sub_port_id': 20663164, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315087, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'cartonnette': {'main_port_id': 20663118, 'sub_port_id': 20663165, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315088, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'environnement': {'main_port_id': 20663118, 'sub_port_id': 20663166, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315089, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'papier': {'main_port_id': 20663118, 'sub_port_id': 20663167, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315090, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 4, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}, 'kraft': {'main_port_id': 20663118, 'sub_port_id': 20663168, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13315091, 'last_updated_at': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_desc': datetime.datetime(2025, 2, 19, 6, 10, 59), 'last_updated_at_asc': datetime.datetime(2025, 2, 19, 6, 4, 59)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663157,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663145 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663158,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663146 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663159,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663147 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663160,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663148 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663161,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663149 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663162,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663150 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663163,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663151 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663164,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663152 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663165,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663153 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663166,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663154 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663167,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663155 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 20663168,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 20663156 lien utilise dans velours : https://www.fotonower.com/velours/20663157,20663158,20663159,20663160,20663161,20663162,20663163,20663164,20663165,20663166,20663167,20663168?tags=Carton_gris,autre_refus,plastique,metal,Carton_brun,mal_croppe,Teint_Dans_La_Masse,flou,cartonnette,environnement,papier,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([20663118]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1338474973, 1338474971, 1338474966, 1338474962, 1338474960] map_info['map_portfolio_photo'] : {20663118: [1338474973, 1338474971, 1338474966, 1338474962, 1338474960, 1338474930, 1338474929, 1338474928, 1338474927, 1338474926, 1338474904, 1338474902, 1338474900, 1338474899, 1338474898, 1338474897, 1338474637, 1338474633, 1338474625, 1338474320, 1338474278, 1338474277, 1338474276, 1338474256, 1338474254, 1338474233, 1338474232, 1338474231, 1338473995, 1338473994, 1338473993, 1338473992, 1338473990, 1338473044, 1338473043, 1338473042, 1338473041, 1338472596, 1338472594, 1338472593, 1338472592, 1338472591, 1338472578, 1338472577, 1338472576, 1338472575, 1338472560, 1338472559, 1338472557]} final : False mtd_id 4302 list_pids : [1338474973, 1338474971, 1338474966, 1338474962, 1338474960] Looping around the photos to save general results len do output : 1 /20663118. 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, '2598523') ('4302', '20663118', '1338474973', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474971', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474966', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474962', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474960', None, None, None, None, None, '2598523') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 6 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, '20663118', "{'Carton_gris': 20663145, 'autre_refus': 20663146, 'plastique': 20663147, 'metal': 20663148, 'Carton_brun': 20663149, 'mal_croppe': 20663150, 'Teint_Dans_La_Masse': 20663151, 'flou': 20663152, 'cartonnette': 20663153, 'environnement': 20663154, 'papier': 20663155, 'kraft': 20663156}", None, None, None, None, '2598523'), ('4302', '20663118', '1338474973', None, None, None, None, None, '2598523'), ('4302', '20663118', '1338474971', None, None, None, None, None, '2598523'), ('4302', '20663118', '1338474966', None, None, None, None, None, '2598523'), ('4302', '20663118', '1338474962', None, None, None, None, None, '2598523'), ('4302', '20663118', '1338474960', None, None, None, None, None, '2598523')] time used for this insertion : 0.017729997634887695 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.7632002830505371 time spend to save output : 0.017986297607421875 total time spend for step 1 : 0.781186580657959 step2:final Wed Feb 19 06:14:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20663118) 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 20663118 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1338472560,1338472559,1338472557,1338472578,1338472577,1338472576,1338472575,1338472596,1338472594,1338472593,1338472592,1338472591,1338473044,1338473043,1338473042,1338473041,1338473995,1338473994,1338473993,1338473992,1338473990,1338474256,1338474254,1338474233,1338474232,1338474231,1338474320,1338474278,1338474277,1338474276,1338474637,1338474633,1338474625,1338474904,1338474902,1338474900,1338474899,1338474898,1338474897,1338474930,1338474929,1338474928,1338474927,1338474926,1338474973,1338474971,1338474966,1338474962,1338474960); 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([20663118]) Inside saveOutput : final : False verbose : True original output for save of step final : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} new output for save of step final : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} [1338474973, 1338474971, 1338474966, 1338474962, 1338474960] map_info['map_portfolio_photo'] : {20663118: [1338474973, 1338474971, 1338474966, 1338474962, 1338474960, 1338474930, 1338474929, 1338474928, 1338474927, 1338474926, 1338474904, 1338474902, 1338474900, 1338474899, 1338474898, 1338474897, 1338474637, 1338474633, 1338474625, 1338474320, 1338474278, 1338474277, 1338474276, 1338474256, 1338474254, 1338474233, 1338474232, 1338474231, 1338473995, 1338473994, 1338473993, 1338473992, 1338473990, 1338473044, 1338473043, 1338473042, 1338473041, 1338472596, 1338472594, 1338472593, 1338472592, 1338472591, 1338472578, 1338472577, 1338472576, 1338472575, 1338472560, 1338472559, 1338472557]} final : False mtd_id 4302 list_pids : [1338474973, 1338474971, 1338474966, 1338474962, 1338474960] Looping around the photos to save general results len do output : 5 /1338474973.Didn't retrieve data . /1338474971.Didn't retrieve data . /1338474966.Didn't retrieve data . /1338474962.Didn't retrieve data . /1338474960.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, '2598523') ('4302', '20663118', '1338474973', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474971', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474966', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474962', None, None, None, None, None, '2598523') ('4302', None, None, None, None, None, None, None, '2598523') ('4302', '20663118', '1338474960', None, None, None, None, None, '2598523') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '20663118', '1338474973', '0.0564841544903937', None, None, None, None, '2598523'), ('4302', '20663118', '1338474971', '0.0564841544903937', None, None, None, None, '2598523'), ('4302', '20663118', '1338474966', '0.0564841544903937', None, None, None, None, '2598523'), ('4302', '20663118', '1338474962', '0.0564841544903937', None, None, None, None, '2598523'), ('4302', '20663118', '1338474960', '0.0564841544903937', None, None, None, None, '2598523')] time used for this insertion : 0.013403654098510742 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.07618474960327148 time spend to save output : 0.013833284378051758 total time spend for step 2 : 0.09001803398132324 step3:velours_tree Wed Feb 19 06:14:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {20663118: [{'Carton_gris': 20663145, 'autre_refus': 20663146, 'plastique': 20663147, 'metal': 20663148, 'Carton_brun': 20663149, 'mal_croppe': 20663150, 'Teint_Dans_La_Masse': 20663151, 'flou': 20663152, 'cartonnette': 20663153, 'environnement': 20663154, 'papier': 20663155, 'kraft': 20663156}]} input_args_next_step : {20663118: ()} output_args : {20663118: [{'Carton_gris': 20663145, 'autre_refus': 20663146, 'plastique': 20663147, 'metal': 20663148, 'Carton_brun': 20663149, 'mal_croppe': 20663150, 'Teint_Dans_La_Masse': 20663151, 'flou': 20663152, 'cartonnette': 20663153, 'environnement': 20663154, 'papier': 20663155, 'kraft': 20663156}]} args : 20663118 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'Carton_gris': 20663145, 'autre_refus': 20663146, 'plastique': 20663147, 'metal': 20663148, 'Carton_brun': 20663149, 'mal_croppe': 20663150, 'Teint_Dans_La_Masse': 20663151, 'flou': 20663152, 'cartonnette': 20663153, 'environnement': 20663154, 'papier': 20663155, 'kraft': 20663156},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20663118) 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([20663118]) 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.5634710788726807 time spend to save output : 4.744529724121094e-05 total time spend for step 3 : 0.5635185241699219 step4:send_mail_cod Wed Feb 19 06:14:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} input_args_next_step : {1338474973: ()} output_args : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} args : 1338474973 depend.output_id : 0 input_args_next_step : {1338474973: ('0.0564841544903937',), 1338474971: ()} output_args : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} args : 1338474971 depend.output_id : 0 input_args_next_step : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ()} output_args : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} args : 1338474966 depend.output_id : 0 input_args_next_step : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ()} output_args : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} args : 1338474962 depend.output_id : 0 input_args_next_step : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ()} output_args : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',)} args : 1338474960 depend.output_id : 0 Inconsistent number of input and output, step which parrallelize and manage error in input by avoiding sending an output for this data can't be used in tree dependencies of input and output complete output_args for input 3 : {20663118: [{'Carton_gris': 20663145, 'autre_refus': 20663146, 'plastique': 20663147, 'metal': 20663148, 'Carton_brun': 20663149, 'mal_croppe': 20663150, 'Teint_Dans_La_Masse': 20663151, 'flou': 20663152, 'cartonnette': 20663153, 'environnement': 20663154, 'papier': 20663155, 'kraft': 20663156}]} input_args_next_step : {1338474973: ('0.0564841544903937',), 1338474971: ('0.0564841544903937',), 1338474966: ('0.0564841544903937',), 1338474962: ('0.0564841544903937',), 1338474960: ('0.0564841544903937',), 20663118: ()} output_args : {20663118: [{'Carton_gris': 20663145, 'autre_refus': 20663146, 'plastique': 20663147, 'metal': 20663148, 'Carton_brun': 20663149, 'mal_croppe': 20663150, 'Teint_Dans_La_Masse': 20663151, 'flou': 20663152, 'cartonnette': 20663153, 'environnement': 20663154, 'papier': 20663155, 'kraft': 20663156}]} args : 20663118 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 :6, first value : ('0.0564841544903937',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (20663118) new photo added, this last batch is non a complet batch, should exit and reload photo caffe_path_current : About to save ! 2 After save, about to update current ! 1.61user 2.15system 0:04.86elapsed 77%CPU (0avgtext+0avgdata 142928maxresident)k 92728inputs+152outputs (421major+55797minor)pagefaults 0swaps