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 : 3011040 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 (2656687) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2656687) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258215 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2656687'] with mtr_portfolio_ids : ['21258215'] and first list_photo_ids : [] new path : /proc/3011040/ Name: python3 Umask: 0002 State: R (running) Tgid: 3011040 Ngid: 0 Pid: 3011040 PPid: 3011039 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3011040 NSpid: 3011040 NSpgid: 3008658 NSsid: 3008658 VmPeak: 1106848 kB VmSize: 1106848 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98492 kB VmRSS: 98492 kB RssAnon: 59756 kB RssFile: 38736 kB RssShmem: 0 kB VmData: 865596 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/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: 47 nonvoluntary_ctxt_switches: 98 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3011040', 'Ngid': '0', 'Pid': '3011040', 'PPid': '3011039', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3011040', 'NSpid': '3011040', 'NSpgid': '3008658', 'NSsid': '3008658', 'VmPeak': '1106848 kB', 'VmSize': '1106848 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98492 kB', 'VmRSS': '98492 kB', 'RssAnon': '59756 kB', 'RssFile': '38736 kB', 'RssShmem': '0 kB', 'VmData': '865596 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/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': '47', 'nonvoluntary_ctxt_switches': '98'} ('datou_batch_current', '3011040', '1106848', '0', '1106848', '865596', '98492', b'', 'marlene', '2656687') 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 (21258215) 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 (2656687 ) ) 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 (21258215) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1342828072, 'portfolio_id': 21258215}, {'photo_id': 1342828059, 'portfolio_id': 21258215}, {'photo_id': 1342828052, 'portfolio_id': 21258215}, {'photo_id': 1342828047, 'portfolio_id': 21258215}, {'photo_id': 1342828042, 'portfolio_id': 21258215}, {'photo_id': 1342827755, 'portfolio_id': 21258215}, {'photo_id': 1342827732, 'portfolio_id': 21258215}, {'photo_id': 1342827723, 'portfolio_id': 21258215}, {'photo_id': 1342827720, 'portfolio_id': 21258215}, {'photo_id': 1342827715, 'portfolio_id': 21258215}, {'photo_id': 1342827708, 'portfolio_id': 21258215}, {'photo_id': 1342827478, 'portfolio_id': 21258215}, {'photo_id': 1342827434, 'portfolio_id': 21258215}, {'photo_id': 1342827429, 'portfolio_id': 21258215}, {'photo_id': 1342827281, 'portfolio_id': 21258215}, {'photo_id': 1342827272, 'portfolio_id': 21258215}, {'photo_id': 1342827268, 'portfolio_id': 21258215}, {'photo_id': 1342827246, 'portfolio_id': 21258215}, {'photo_id': 1342827242, 'portfolio_id': 21258215}, {'photo_id': 1342827238, 'portfolio_id': 21258215}, {'photo_id': 1342827173, 'portfolio_id': 21258215}, {'photo_id': 1342827154, 'portfolio_id': 21258215}, {'photo_id': 1342827144, 'portfolio_id': 21258215}, {'photo_id': 1342827130, 'portfolio_id': 21258215}, {'photo_id': 1342826710, 'portfolio_id': 21258215}, {'photo_id': 1342826700, 'portfolio_id': 21258215}, {'photo_id': 1342826002, 'portfolio_id': 21258215}, {'photo_id': 1342825998, 'portfolio_id': 21258215}, {'photo_id': 1342825951, 'portfolio_id': 21258215}] map_portfolio_id_photo_id: {21258215: [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708, 1342827478, 1342827434, 1342827429, 1342827281, 1342827272, 1342827268, 1342827246, 1342827242, 1342827238, 1342827173, 1342827154, 1342827144, 1342827130, 1342826710, 1342826700, 1342826002, 1342825998, 1342825951]} ##### 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.017043590545654297 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Tue Mar 11 05:13:56 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 (21258215) 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 : 21258215 get user id for portfolio 21258215 get sub ptf for main ptf 21258215, type 3726 and hashtags ['Carton_gris', 'mal_croppe', 'Carton_brun', 'environnement', 'kraft', 'cartonnette', 'flou', 'plastique', 'metal', 'autre_refus', 'papier', '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`=21258215 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','mal_croppe','Carton_brun','environnement','kraft','cartonnette','flou','plastique','metal','autre_refus','papier','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`=21258215 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','mal_croppe','Carton_brun','environnement','kraft','cartonnette','flou','plastique','metal','autre_refus','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21258215, 'sub_port_id': 21258216, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846134, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'autre_refus': {'main_port_id': 21258215, 'sub_port_id': 21258217, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846135, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'metal': {'main_port_id': 21258215, 'sub_port_id': 21258218, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846136, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'papier': {'main_port_id': 21258215, 'sub_port_id': 21258219, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846137, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'flou': {'main_port_id': 21258215, 'sub_port_id': 21258220, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846138, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 21258215, 'sub_port_id': 21258221, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846139, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'kraft': {'main_port_id': 21258215, 'sub_port_id': 21258222, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846140, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'cartonnette': {'main_port_id': 21258215, 'sub_port_id': 21258223, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846141, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'Carton_gris': {'main_port_id': 21258215, 'sub_port_id': 21258224, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846142, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'mal_croppe': {'main_port_id': 21258215, 'sub_port_id': 21258225, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846143, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'Carton_brun': {'main_port_id': 21258215, 'sub_port_id': 21258226, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846144, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}, 'plastique': {'main_port_id': 21258215, 'sub_port_id': 21258227, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846145, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21258216 , 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=21258215 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 (21258216) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258217 , 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=21258215 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 (21258217) result : ((1342826758,), (1342827573,), (1342827575,), (1342827577,), (1342827579,), (1342828056,), (1342828078,), (1342828080,), (1342828082,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258218 , 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=21258215 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 (21258218) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258219 , 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=21258215 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 (21258219) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258220 , 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=21258215 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 (21258220) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258221 , 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=21258215 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 (21258221) result : ((1342827561,), (1342828055,), (1342828061,), (1342828063,), (1342828065,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258222 , 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=21258215 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 (21258222) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258223 , 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=21258215 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 (21258223) result : ((1342827585,), (1342828058,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258224 , 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=21258215 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 (21258224) result : ((1342827506,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258225 , 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=21258215 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 (21258225) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258226 , 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=21258215 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 (21258226) result : ((1342827514,), (1342828089,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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 21258227 , 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=21258215 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 (21258227) result : ((1342827485,), (1342827516,), (1342827598,), (1342827600,), (1342827603,), (1342827605,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21258215) result : ((1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) 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 (1342826700) 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`=21258215 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','mal_croppe','Carton_brun','environnement','kraft','cartonnette','flou','plastique','metal','autre_refus','papier','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`=21258215 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Carton_gris','mal_croppe','Carton_brun','environnement','kraft','cartonnette','flou','plastique','metal','autre_refus','papier','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'environnement': {'main_port_id': 21258215, 'sub_port_id': 21258228, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846146, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'autre_refus': {'main_port_id': 21258215, 'sub_port_id': 21258229, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846147, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'metal': {'main_port_id': 21258215, 'sub_port_id': 21258230, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846148, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'papier': {'main_port_id': 21258215, 'sub_port_id': 21258231, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846149, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'flou': {'main_port_id': 21258215, 'sub_port_id': 21258232, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846150, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 21258215, 'sub_port_id': 21258233, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846151, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'kraft': {'main_port_id': 21258215, 'sub_port_id': 21258234, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846152, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'cartonnette': {'main_port_id': 21258215, 'sub_port_id': 21258235, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846153, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'Carton_gris': {'main_port_id': 21258215, 'sub_port_id': 21258236, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846154, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'mal_croppe': {'main_port_id': 21258215, 'sub_port_id': 21258237, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846155, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'Carton_brun': {'main_port_id': 21258215, 'sub_port_id': 21258238, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846156, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 9, 29), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}, 'plastique': {'main_port_id': 21258215, 'sub_port_id': 21258239, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 13846157, 'last_updated_at': datetime.datetime(2025, 3, 11, 5, 11, 59), 'last_updated_at_desc': datetime.datetime(2025, 3, 11, 5, 11, 59), 'last_updated_at_asc': datetime.datetime(2025, 3, 11, 5, 9, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258228,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258216 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258229,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258217 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258230,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258218 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258231,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258219 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258232,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258220 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258233,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258221 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258234,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258222 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258235,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258223 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258236,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258224 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258237,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258225 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258238,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258226 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21258239,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21258227 lien utilise dans velours : https://www.fotonower.com/velours/21258228,21258229,21258230,21258231,21258232,21258233,21258234,21258235,21258236,21258237,21258238,21258239?tags=environnement,autre_refus,metal,papier,flou,Teint_Dans_La_Masse,kraft,cartonnette,Carton_gris,mal_croppe,Carton_brun,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21258215]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] map_info['map_portfolio_photo'] : {21258215: [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708, 1342827478, 1342827434, 1342827429, 1342827281, 1342827272, 1342827268, 1342827246, 1342827242, 1342827238, 1342827173, 1342827154, 1342827144, 1342827130, 1342826710, 1342826700, 1342826002, 1342825998, 1342825951]} final : False mtd_id 4302 list_pids : [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] Looping around the photos to save general results len do output : 1 /21258215. 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, '2656687') ('4302', '21258215', '1342828072', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828059', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828052', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828047', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828042', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827755', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827732', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827723', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827720', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827715', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827708', None, None, None, None, None, '2656687') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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, '21258215', "{'environnement': 21258216, 'autre_refus': 21258217, 'metal': 21258218, 'papier': 21258219, 'flou': 21258220, 'Teint_Dans_La_Masse': 21258221, 'kraft': 21258222, 'cartonnette': 21258223, 'Carton_gris': 21258224, 'mal_croppe': 21258225, 'Carton_brun': 21258226, 'plastique': 21258227}", None, None, None, None, '2656687'), ('4302', '21258215', '1342828072', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828059', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828052', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828047', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828042', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827755', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827732', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827723', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827720', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827715', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827708', None, None, None, None, None, '2656687')] time used for this insertion : 0.01369619369506836 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.6232242584228516 time spend to save output : 0.013965129852294922 total time spend for step 1 : 0.6371893882751465 step2:final Tue Mar 11 05:13:56 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 (21258215) 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 21258215 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1342826002,1342825998,1342825951,1342826710,1342826700,1342827173,1342827154,1342827144,1342827130,1342827246,1342827242,1342827238,1342827281,1342827272,1342827478,1342827268,1342827434,1342827429,1342827755,1342827732,1342827723,1342827720,1342827715,1342827708,1342828072,1342828059,1342828052,1342828047,1342828042); 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([21258215]) Inside saveOutput : final : False verbose : True original output for save of step final : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} new output for save of step final : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] map_info['map_portfolio_photo'] : {21258215: [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708, 1342827478, 1342827434, 1342827429, 1342827281, 1342827272, 1342827268, 1342827246, 1342827242, 1342827238, 1342827173, 1342827154, 1342827144, 1342827130, 1342826710, 1342826700, 1342826002, 1342825998, 1342825951]} final : False mtd_id 4302 list_pids : [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] Looping around the photos to save general results len do output : 11 /1342828072.Didn't retrieve data . /1342828059.Didn't retrieve data . /1342828052.Didn't retrieve data . /1342828047.Didn't retrieve data . /1342828042.Didn't retrieve data . /1342827755.Didn't retrieve data . /1342827732.Didn't retrieve data . /1342827723.Didn't retrieve data . /1342827720.Didn't retrieve data . /1342827715.Didn't retrieve data . /1342827708.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, '2656687') ('4302', '21258215', '1342828072', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828059', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828052', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828047', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828042', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827755', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827732', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827723', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827720', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827715', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827708', None, None, None, None, None, '2656687') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 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', '21258215', '1342828072', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342828059', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342828052', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342828047', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342828042', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342827755', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342827732', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342827723', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342827720', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342827715', '0.07354822159740972', None, None, None, None, '2656687'), ('4302', '21258215', '1342827708', '0.07354822159740972', None, None, None, None, '2656687')] time used for this insertion : 0.013421773910522461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.10106515884399414 time spend to save output : 0.013994216918945312 total time spend for step 2 : 0.11505937576293945 step3:velours_tree Tue Mar 11 05:13:56 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 : {21258215: [{'environnement': 21258216, 'autre_refus': 21258217, 'metal': 21258218, 'papier': 21258219, 'flou': 21258220, 'Teint_Dans_La_Masse': 21258221, 'kraft': 21258222, 'cartonnette': 21258223, 'Carton_gris': 21258224, 'mal_croppe': 21258225, 'Carton_brun': 21258226, 'plastique': 21258227}]} input_args_next_step : {21258215: ()} output_args : {21258215: [{'environnement': 21258216, 'autre_refus': 21258217, 'metal': 21258218, 'papier': 21258219, 'flou': 21258220, 'Teint_Dans_La_Masse': 21258221, 'kraft': 21258222, 'cartonnette': 21258223, 'Carton_gris': 21258224, 'mal_croppe': 21258225, 'Carton_brun': 21258226, 'plastique': 21258227}]} args : 21258215 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 : ({'environnement': 21258216, 'autre_refus': 21258217, 'metal': 21258218, 'papier': 21258219, 'flou': 21258220, 'Teint_Dans_La_Masse': 21258221, 'kraft': 21258222, 'cartonnette': 21258223, 'Carton_gris': 21258224, 'mal_croppe': 21258225, 'Carton_brun': 21258226, 'plastique': 21258227},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21258215) 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([21258215]) 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.3493692874908447 time spend to save output : 6.008148193359375e-05 total time spend for step 3 : 0.3494293689727783 step4:send_mail_cod Tue Mar 11 05:13:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} input_args_next_step : {1342828072: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342828072 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342828059 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342828052 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342828047 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342828042 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342827755 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342827732 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342827723 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342827720 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342827715 depend.output_id : 0 input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ()} output_args : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',)} args : 1342827708 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 : {21258215: [{'environnement': 21258216, 'autre_refus': 21258217, 'metal': 21258218, 'papier': 21258219, 'flou': 21258220, 'Teint_Dans_La_Masse': 21258221, 'kraft': 21258222, 'cartonnette': 21258223, 'Carton_gris': 21258224, 'mal_croppe': 21258225, 'Carton_brun': 21258226, 'plastique': 21258227}]} input_args_next_step : {1342828072: ('0.07354822159740972',), 1342828059: ('0.07354822159740972',), 1342828052: ('0.07354822159740972',), 1342828047: ('0.07354822159740972',), 1342828042: ('0.07354822159740972',), 1342827755: ('0.07354822159740972',), 1342827732: ('0.07354822159740972',), 1342827723: ('0.07354822159740972',), 1342827720: ('0.07354822159740972',), 1342827715: ('0.07354822159740972',), 1342827708: ('0.07354822159740972',), 21258215: ()} output_args : {21258215: [{'environnement': 21258216, 'autre_refus': 21258217, 'metal': 21258218, 'papier': 21258219, 'flou': 21258220, 'Teint_Dans_La_Masse': 21258221, 'kraft': 21258222, 'cartonnette': 21258223, 'Carton_gris': 21258224, 'mal_croppe': 21258225, 'Carton_brun': 21258226, 'plastique': 21258227}]} args : 21258215 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 :12, first value : ('0.07354822159740972',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21258215) 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 (1342828072,1342828059,1342828052,1342828047,1342828042,1342827755,1342827732,1342827723,1342827720,1342827715,1342827708) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1342827708 begin to download photo : 1342827723 begin to download photo : 1342828042 begin to download photo : 1342828059 download finish for photo 1342828059 begin to download photo : 1342828072 download finish for photo 1342828042 begin to download photo : 1342828047 download finish for photo 1342827708 begin to download photo : 1342827715 download finish for photo 1342827723 begin to download photo : 1342827732 download finish for photo 1342827715 begin to download photo : 1342827720 download finish for photo 1342828072 download finish for photo 1342827732 begin to download photo : 1342827755 download finish for photo 1342828047 begin to download photo : 1342828052 download finish for photo 1342827720 download finish for photo 1342827755 download finish for photo 1342828052 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 : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P21258215_11-03-2025_05_13_57.pdf 21258217 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=21258217 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1342826758: '1741665974_543323_1342825951_07c6648a92b0e43498ecac567a25b84d_rle_crop_3704297096_0.png', 1342827573: '1741666225_235299_1342827246_9f3e9d7d19e0f3f3e19448dffbb70966_rle_crop_3704299816_0.png', 1342827575: '1741666225_235299_1342827154_ea5fe09d58a051e0dadf219e16f265ae_rle_crop_3704299822_0.png', 1342827577: '1741666225_235299_1342827144_6529e83216d6df0a8789c568e23f50fb_rle_crop_3704299850_0.png', 1342827579: '1741666225_235299_1342827130_b464759f3c150af4c8b8d24dc820d308_rle_crop_3704299861_0.png', 1342828056: '1741666334_545986_1342827434_5526d20df4abdc4fea19302badb29432_rle_crop_3704300983_0.png', 1342828078: '1741666347_966733_1342827478_8f31e748124a6317d55d05603b71db81_rle_crop_3704300998_0.png', 1342828080: '1741666347_966733_1342827272_81fff787a676711f64ef01b628714e50_rle_crop_3704301017_0.png', 1342828082: '1741666347_966733_1342827268_bb5212526072f13693f2b7f3be3fa537_rle_crop_3704301027_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/9158ebb85c4b849f011295d539512dce_39422754.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/470c254faf5962e6f7b54d5a97bbec51_77344076.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/630b30208b1b768136b3385c55a4a726_80773212.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/27d9e7402bdfcb9ae853dc2ca606c34c_42690768.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/fdf4875064e947a83b97bc33a813076e_38691607.png change filename to text .wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/e06571db2d797b8fa8b09f3bd5d21c98_70754672.png change filename to text .wget -O 7.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/5d6e575363e831f202396b6436bdcb1a_86245805.png change filename to text .wget -O 8.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/69002967d1fb46177fa92ed774f3970a_90396112.png change filename to text .imagette212582171741666437/ imagette212582171741666437/1741666225_235299_1342827246_9f3e9d7d19e0f3f3e19448dffbb70966_rle_crop_3704299816_0.png.png imagette212582171741666437/1741666347_966733_1342827268_bb5212526072f13693f2b7f3be3fa537_rle_crop_3704301027_0.png.png imagette212582171741666437/1741666225_235299_1342827130_b464759f3c150af4c8b8d24dc820d308_rle_crop_3704299861_0.png.png imagette212582171741666437/1741666225_235299_1342827144_6529e83216d6df0a8789c568e23f50fb_rle_crop_3704299850_0.png.png imagette212582171741666437/1741666334_545986_1342827434_5526d20df4abdc4fea19302badb29432_rle_crop_3704300983_0.png.png imagette212582171741666437/1741666347_966733_1342827478_8f31e748124a6317d55d05603b71db81_rle_crop_3704300998_0.png.png imagette212582171741666437/1741666347_966733_1342827272_81fff787a676711f64ef01b628714e50_rle_crop_3704301017_0.png.png imagette212582171741666437/1741666225_235299_1342827154_ea5fe09d58a051e0dadf219e16f265ae_rle_crop_3704299822_0.png.png imagette212582171741666437/1741665974_543323_1342825951_07c6648a92b0e43498ecac567a25b84d_rle_crop_3704297096_0.png.png imagette212582181741666438/ imagette212582201741666438/ imagette212582221741666438/ wget -O 9.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/5fe4cf3218e322aaf886112df8a9e479_60577319.png imagette212582171741666437 21258218 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=21258218 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette212582181741666438 21258220 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=21258220 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette212582201741666438 21258222 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=21258222 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette212582221741666438 21258223 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=21258223 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1342827585: '1741666225_235299_1342827130_b464759f3c150af4c8b8d24dc820d308_rle_crop_3704299860_0.png', 1342828058: '1741666334_545986_1342827434_5526d20df4abdc4fea19302badb29432_rle_crop_3704300978_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/aec28ebb0dbaf0e531d347116e0c6fec_31848057.png change filename to text .imagette212582231741666438/ imagette212582231741666438/1741666334_545986_1342827434_5526d20df4abdc4fea19302badb29432_rle_crop_3704300978_0.png.png imagette212582231741666438/1741666225_235299_1342827130_b464759f3c150af4c8b8d24dc820d308_rle_crop_3704299860_0.png.png imagette212582251741666438/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/ab5f3681fe833ca7a4f5d5c98defa905_89687355.png imagette212582231741666438 21258225 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=21258225 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette212582251741666438 21258227 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=21258227 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1342827485: '1741666213_544981_1342827242_b51fac96cbf60b4319d35a5f3d0aff66_rle_crop_3704299753_0.png', 1342827516: '1741666227_964106_1342827173_10d3d8b5535f07ed0b2bb81bc6b9af58_rle_crop_3704299776_0.png', 1342827598: '1741666225_235299_1342827246_9f3e9d7d19e0f3f3e19448dffbb70966_rle_crop_3704299811_0.png', 1342827600: '1741666225_235299_1342827154_ea5fe09d58a051e0dadf219e16f265ae_rle_crop_3704299821_0.png', 1342827603: '1741666225_235299_1342827144_6529e83216d6df0a8789c568e23f50fb_rle_crop_3704299846_0.png', 1342827605: '1741666225_235299_1342827130_b464759f3c150af4c8b8d24dc820d308_rle_crop_3704299858_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/bcc3c18853db1cacad235cda3beacc7d_96542406.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/d279d7c2356c480900bd73d89cd468d3_98400337.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/c536f5fa34d16f76ae6b6ed34a34fab5_33104799.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/4bc9061a7958a8ca80eed35b3b4f6e9d_60942681.png change filename to text .wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/4b0dc17dbdf7b0b80c3b34511832c8d8_67661199.png change filename to text .imagette212582271741666438/ imagette212582271741666438/1741666213_544981_1342827242_b51fac96cbf60b4319d35a5f3d0aff66_rle_crop_3704299753_0.png.png imagette212582271741666438/1741666227_964106_1342827173_10d3d8b5535f07ed0b2bb81bc6b9af58_rle_crop_3704299776_0.png.png imagette212582271741666438/1741666225_235299_1342827154_ea5fe09d58a051e0dadf219e16f265ae_rle_crop_3704299821_0.png.png imagette212582271741666438/1741666225_235299_1342827246_9f3e9d7d19e0f3f3e19448dffbb70966_rle_crop_3704299811_0.png.png imagette212582271741666438/1741666225_235299_1342827130_b464759f3c150af4c8b8d24dc820d308_rle_crop_3704299858_0.png.png imagette212582271741666438/1741666225_235299_1342827144_6529e83216d6df0a8789c568e23f50fb_rle_crop_3704299846_0.png.png wget -O 6.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/60318c71dd088527ca2bb89c2fcb2dcd_42455113.png imagette212582271741666438 21258221 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=21258221 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1342827561: '1741666225_235299_1342827246_9f3e9d7d19e0f3f3e19448dffbb70966_rle_crop_3704299815_0.png', 1342828055: '1741666334_545986_1342827434_5526d20df4abdc4fea19302badb29432_rle_crop_3704300981_0.png', 1342828061: '1741666347_966733_1342827478_8f31e748124a6317d55d05603b71db81_rle_crop_3704300997_0.png', 1342828063: '1741666347_966733_1342827272_81fff787a676711f64ef01b628714e50_rle_crop_3704301012_0.png', 1342828065: '1741666347_966733_1342827268_bb5212526072f13693f2b7f3be3fa537_rle_crop_3704301031_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/fe9f1f2660685b8a140fc585495ee5ab_54737765.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/bf7d48f905467e8c108794281b396ec9_29235734.png change filename to text .wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/44f1e42eaf220842ec6e244ba29c8609_49963882.png change filename to text .wget -O 4.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/c36551532131d22a6af863878bd0e7d4_75534971.png change filename to text .imagette212582211741666438/ imagette212582211741666438/1741666334_545986_1342827434_5526d20df4abdc4fea19302badb29432_rle_crop_3704300981_0.png.png imagette212582211741666438/1741666225_235299_1342827246_9f3e9d7d19e0f3f3e19448dffbb70966_rle_crop_3704299815_0.png.png imagette212582211741666438/1741666347_966733_1342827478_8f31e748124a6317d55d05603b71db81_rle_crop_3704300997_0.png.png imagette212582211741666438/1741666347_966733_1342827272_81fff787a676711f64ef01b628714e50_rle_crop_3704301012_0.png.png imagette212582211741666438/1741666347_966733_1342827268_bb5212526072f13693f2b7f3be3fa537_rle_crop_3704301031_0.png.png wget -O 5.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/407857bbe38d65367d81249f804d94b2_58033530.png imagette212582211741666438 21258224 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=21258224 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1342827506: '1741666227_964106_1342827173_10d3d8b5535f07ed0b2bb81bc6b9af58_rle_crop_3704299777_0.png'} change filename to text .imagette212582241741666439/ imagette212582241741666439/1741666227_964106_1342827173_10d3d8b5535f07ed0b2bb81bc6b9af58_rle_crop_3704299777_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/74d0e5d93a00431d41ecb122456a3eb6_89980856.png imagette212582241741666439 21258226 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=21258226 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1342827514: '1741666227_964106_1342826700_c104cfc16f7b0530ddd4ff08ef4bd9a8_rle_crop_3704299796_0.png', 1342828089: '1741666347_966733_1342827272_81fff787a676711f64ef01b628714e50_rle_crop_3704301011_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/688031c9639a9b8dc9a658731c94568f_57705204.png change filename to text .imagette212582261741666439/ imagette212582261741666439/1741666227_964106_1342826700_c104cfc16f7b0530ddd4ff08ef4bd9a8_rle_crop_3704299796_0.png.png imagette212582261741666439/1741666347_966733_1342827272_81fff787a676711f64ef01b628714e50_rle_crop_3704301011_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/4fc29e00f031a32785a4472f0436cc8c_29523426.png imagette212582261741666439 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21258215 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21258228,21258229,21258230,21258231,21258232,21258233,21258234,21258235,21258236,21258237,21258238,21258239?tags=environnement,autre_refus,metal,papier,flou,Teint_Dans_La_Masse,kraft,cartonnette,Carton_gris,mal_croppe,Carton_brun,plastique your option no_mail is active, we will not send the real mail to your client args[1342828072] : ('0.07354822159740972',) no score found for photo 1342828072 We are sending mail with results at report@fotonower.com args[1342828059] : ('0.07354822159740972',) no score found for photo 1342828059 We are sending mail with results at report@fotonower.com args[1342828052] : ('0.07354822159740972',) no score found for photo 1342828052 We are sending mail with results at report@fotonower.com args[1342828047] : ('0.07354822159740972',) no score found for photo 1342828047 We are sending mail with results at report@fotonower.com args[1342828042] : ('0.07354822159740972',) no score found for photo 1342828042 We are sending mail with results at report@fotonower.com args[1342827755] : ('0.07354822159740972',) no score found for photo 1342827755 We are sending mail with results at report@fotonower.com args[1342827732] : ('0.07354822159740972',) no score found for photo 1342827732 We are sending mail with results at report@fotonower.com args[1342827723] : ('0.07354822159740972',) no score found for photo 1342827723 We are sending mail with results at report@fotonower.com args[1342827720] : ('0.07354822159740972',) no score found for photo 1342827720 We are sending mail with results at report@fotonower.com args[1342827715] : ('0.07354822159740972',) no score found for photo 1342827715 We are sending mail with results at report@fotonower.com args[1342827708] : ('0.07354822159740972',) no score found for photo 1342827708 We are sending mail with results at report@fotonower.com refus_total : 0.07354822159740972 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=21258215 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_P21258215_11-03-2025_05_13_57.pdf results_Auto_P21258215_11-03-2025_05_13_57.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21258215_11-03-2025_05_13_57.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','21258215','results_Auto_P21258215_11-03-2025_05_13_57.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21258215_11-03-2025_05_13_57.pdf','pdf','','0.24','0.07354822159740972') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21258215]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] map_info['map_portfolio_photo'] : {21258215: [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708, 1342827478, 1342827434, 1342827429, 1342827281, 1342827272, 1342827268, 1342827246, 1342827242, 1342827238, 1342827173, 1342827154, 1342827144, 1342827130, 1342826710, 1342826700, 1342826002, 1342825998, 1342825951]} final : False mtd_id 4302 list_pids : [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] 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, '2656687') ('4302', '21258215', '1342828072', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828059', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828052', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828047', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828042', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827755', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827732', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827723', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827720', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827715', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827708', None, None, None, None, None, '2656687') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 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', '21258215', '1342828072', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828059', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828052', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828047', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828042', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827755', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827732', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827723', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827720', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827715', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827708', None, None, None, None, None, '2656687')] time used for this insertion : 0.013492584228515625 save_final save missing photos in datou_result : time spend for datou_step_exec : 4.114931583404541 time spend to save output : 0.013739824295043945 total time spend for step 4 : 4.128671407699585 step5:split_time_score Tue Mar 11 05:14:01 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 : ['21258215'] 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 : [('21258215',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21258215) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1342828059: {'path': 'temp/1741666437_3011040_1342828059_f522ad0a1273856a493c4db5e1af2ee4.jpg', 'extension': 'jpg'}, 1342828072: {'path': 'temp/1741666437_3011040_1342828072_71c1190f90566a1afc0069564ab8571d.jpg', 'extension': 'jpg'}, 1342827708: {'path': 'temp/1741666437_3011040_1342827708_9401802ea95a9c39a515fe096eb5ce9f.jpg', 'extension': 'jpg'}, 1342827715: {'path': 'temp/1741666437_3011040_1342827715_8d5d228c5c91e105c3ee49e91a6c5022.jpg', 'extension': 'jpg'}, 1342827720: {'path': 'temp/1741666437_3011040_1342827720_66b11b9fe44dd69a174257bea0a82b77.jpg', 'extension': 'jpg'}, 1342827723: {'path': 'temp/1741666437_3011040_1342827723_566a91f971686828c1940a4b47bb9303.jpg', 'extension': 'jpg'}, 1342827732: {'path': 'temp/1741666437_3011040_1342827732_69fb69f71865dfdb1df3e5759e62e2fd.jpg', 'extension': 'jpg'}, 1342827755: {'path': 'temp/1741666437_3011040_1342827755_c441d5517f0a8a3f472d38f8ebfc0ca4.jpg', 'extension': 'jpg'}, 1342828042: {'path': 'temp/1741666437_3011040_1342828042_73c8a622640e244b2af1154ac6b5cc31.jpg', 'extension': 'jpg'}, 1342828047: {'path': 'temp/1741666437_3011040_1342828047_d084c111b46457eba484e11e71389b9b.jpg', 'extension': 'jpg'}, 1342828052: {'path': 'temp/1741666437_3011040_1342828052_91d4d8fae647e1b1369058a3e8d286a0.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 = 21258215; (('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 = 21258215 group by h (('05', 29),) 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=21258215 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 (21258215) 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 (21258215) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 11032025 21258215 Nombre de photos uploadées : 29 / 23040 (0%) 11032025 21258215 Nombre de photos taguées (types de déchets): 0 / 29 (0%) 11032025 21258215 Nombre de photos taguées (volume) : 0 / 29 (0%) [{'photo_id': 1342826002, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/befeb02fc8d3d900b59aa818bdff167e.jpg', 'username': None, 'uploaded_at': 1741665817, 'text': 'image_11032025_05_01_24_10139.jpg'}, {'photo_id': 1342825998, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/413235096587b98083917faae4164eef.jpg', 'username': None, 'uploaded_at': 1741665817, 'text': 'image_11032025_05_02_14_10134.jpg'}, {'photo_id': 1342825951, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/07c6648a92b0e43498ecac567a25b84d.jpg', 'username': None, 'uploaded_at': 1741665817, 'text': 'image_11032025_05_02_24_10135.jpg'}, {'photo_id': 1342826710, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/11/f46c974f5780540dca7e06ece436b626.jpg', 'username': None, 'uploaded_at': 1741665998, 'text': 'image_11032025_05_02_34_10139.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.384185791015625e-06 elapsed_time : order_list_meta_photo_and_scores 6.67572021484375e-06 ????????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.002475261688232422 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21258215, '2025-03-11' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1656727,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03087925910949707 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= 1656727 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1656727, 'dashboard_run_id': 1664902, 'mtr_portfolio_id': 21256458, 'dashboard_result_id': 9332874, '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_P21256458_11-03-2025_04_35_44.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21256508, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21256509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21256510, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21256511, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21256512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21256513, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21256514, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21256515, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21256516, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21256517, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21256518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21256519, 'pht': 3726}}"}, {'dashboat_entry_day': 1656727, 'dashboard_run_id': 1664902, 'mtr_portfolio_id': 21257252, 'dashboard_result_id': 9332875, '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_P21257252_11-03-2025_05_04_37.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21257269, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21257270, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21257271, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21257272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21257273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21257274, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21257275, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21257276, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21257277, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21257278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21257279, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21257280, 'pht': 3726}}"}, {'dashboat_entry_day': 1656727, 'dashboard_run_id': 1664902, 'mtr_portfolio_id': 21258215, 'dashboard_result_id': 9332876, '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_P21258215_11-03-2025_05_11_59.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21258216, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21258217, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21258218, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21258219, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21258220, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21258221, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21258222, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21258223, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21258224, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21258225, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21258226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21258227, 'pht': 3726}}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 21256458 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': 2656604, 'mtr_portfolio_id': 21256458, 'created_at': datetime.datetime(2025, 3, 11, 4, 35, 44), 'result': '0.060155935914765195', 'result_long': None, 'result_double': None}] Qualite : 0.060155935914765195 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21256458 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21256458_11-03-2025_04_35_44.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21256458 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_P21256458_11-03-2025_04_35_44.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21256508, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21256509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21256510, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21256511, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21256512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21256513, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21256514, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21256515, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21256516, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21256517, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21256518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21256519, 'pht': 3726}}" where mtr_portfolio_id = 21256458 and dashboard_run_id = 1664902 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`=21256458 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9332874, 0.060155935914765195, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21256458_11-03-2025_04_35_44.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21256508, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21256509, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21256510, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21256511, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21256512, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21256513, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21256514, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21256515, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21256516, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21256517, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21256518, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21256519, '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 = 21257252 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': 2656633, 'mtr_portfolio_id': 21257252, 'created_at': datetime.datetime(2025, 3, 11, 5, 4, 37), 'result': '0.05129987222388668', 'result_long': None, 'result_double': None}] Qualite : 0.05129987222388668 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21257252 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21257252_11-03-2025_05_04_37.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21257252 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_P21257252_11-03-2025_05_04_37.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21257269, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21257270, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21257271, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21257272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21257273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21257274, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21257275, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21257276, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21257277, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21257278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21257279, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21257280, 'pht': 3726}}" where mtr_portfolio_id = 21257252 and dashboard_run_id = 1664902 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`=21257252 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9332875, 0.05129987222388668, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21257252_11-03-2025_05_04_37.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21257269, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21257270, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21257271, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21257272, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21257273, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21257274, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21257275, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21257276, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21257277, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21257278, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21257279, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21257280, '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 = 21258215 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': 2656687, 'mtr_portfolio_id': 21258215, 'created_at': datetime.datetime(2025, 3, 11, 5, 13, 56), 'result': '0.07354822159740972', 'result_long': None, 'result_double': None}] Qualite : 0.07354822159740972 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21258215 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21258215_11-03-2025_05_13_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21258215 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_P21258215_11-03-2025_05_13_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21258216, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21258217, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21258218, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21258219, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21258220, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21258221, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21258222, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21258223, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21258224, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21258225, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21258226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21258227, 'pht': 3726}}" where mtr_portfolio_id = 21258215 and dashboard_run_id = 1664902 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`=21258215 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9332876, 0.07354822159740972, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21258215_11-03-2025_05_13_57.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21258216, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21258217, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21258218, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21258219, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21258220, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21258221, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21258222, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21258223, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21258224, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21258225, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21258226, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21258227, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21256458,21257252,21258215) result : ((1342810630,), (1342810635,), (1342810640,), (1342810644,), (1342810648,), (1342810942,), (1342810970,), (1342810975,), (1342811021,), (1342811025,), (1342811113,), (1342811165,), (1342811234,), (1342811317,), (1342811583,), (1342811593,), (1342811599,), (1342811605,), (1342811750,), (1342811775,), (1342811780,), (1342811823,), (1342811837,), (1342811849,), (1342811915,), (1342811926,), (1342812024,), (1342812195,), (1342812378,), (1342812751,), (1342812764,), (1342812768,), (1342812774,), (1342813375,), (1342813399,), (1342813446,), (1342813676,), (1342813693,), (1342813699,), (1342813709,), (1342813712,), (1342813772,), (1342813776,), (1342813782,), (1342813786,), (1342813790,), (1342813894,), (1342813923,), (1342813947,), (1342814222,), (1342814229,), (1342814233,), (1342814240,), (1342814244,), (1342814258,), (1342814570,), (1342814574,), (1342814602,), (1342814607,), (1342814714,), (1342814758,), (1342814806,), (1342814884,), (1342814921,), (1342814950,), (1342815324,), (1342815378,), (1342815926,), (1342815894,), (1342815909,), (1342816596,), (1342816656,), (1342816825,), (1342816957,), (1342817760,), (1342817820,), (1342817927,), (1342817978,), (1342818085,), (1342818397,), (1342818463,), (1342818550,), (1342819013,), (1342819089,), (1342819142,), (1342819218,), (1342819258,), (1342819308,), (1342819312,), (1342819316,), (1342819320,), (1342819322,), (1342819353,), (1342819370,), (1342819376,), (1342819381,), (1342819563,), (1342819594,), (1342819617,), (1342819839,), (1342819841,), (1342819844,), (1342819850,), (1342819857,), (1342819939,), (1342819951,), (1342819981,), (1342820041,), (1342820062,), (1342820257,), (1342820293,), (1342820301,), (1342820308,), (1342825679,), (1342825951,), (1342825998,), (1342826002,), (1342826700,), (1342826710,), (1342827130,), (1342827144,), (1342827154,), (1342827173,), (1342827238,), (1342827242,), (1342827246,), (1342827268,), (1342827272,), (1342827281,), (1342827429,), (1342827434,), (1342827478,), (1342827708,), (1342827715,), (1342827720,), (1342827723,), (1342827732,), (1342827755,), (1342828042,), (1342828047,), (1342828052,), (1342828059,), (1342828072,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'11032025': {'nb_upload': 29, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21258215]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] map_info['map_portfolio_photo'] : {21258215: [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708, 1342827478, 1342827434, 1342827429, 1342827281, 1342827272, 1342827268, 1342827246, 1342827242, 1342827238, 1342827173, 1342827154, 1342827144, 1342827130, 1342826710, 1342826700, 1342826002, 1342825998, 1342825951]} final : True mtd_id 4302 list_pids : [1342828072, 1342828059, 1342828052, 1342828047, 1342828042, 1342827755, 1342827732, 1342827723, 1342827720, 1342827715, 1342827708] Looping around the photos to save general results len do output : 1 /21258215Didn'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, '2656687') ('4302', '21258215', '1342828072', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828059', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828052', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828047', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342828042', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827755', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827732', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827723', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827720', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827715', None, None, None, None, None, '2656687') ('4302', None, None, None, None, None, None, None, '2656687') ('4302', '21258215', '1342827708', None, None, None, None, None, '2656687') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 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, '21258215', 'None', None, None, None, None, '2656687'), ('4302', '21258215', '1342828072', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828059', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828052', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828047', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342828042', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827755', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827732', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827723', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827720', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827715', None, None, None, None, None, '2656687'), ('4302', '21258215', '1342827708', None, None, None, None, None, '2656687')] time used for this insertion : 0.014052391052246094 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.2916121482849121 time spend to save output : 0.014284372329711914 total time spend for step 5 : 0.305896520614624 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 (2656687) 2.28user 2.33system 0:07.03elapsed 65%CPU (0avgtext+0avgdata 159720maxresident)k 16032inputs+14592outputs (112major+71476minor)pagefaults 0swaps