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 : 3653368 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 (3432985) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3432985) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636062 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3432985'] with mtr_portfolio_ids : ['25636062'] and first list_photo_ids : [] new path : /proc/3653368/ Name: python3 Umask: 0002 State: R (running) Tgid: 3653368 Ngid: 0 Pid: 3653368 PPid: 3653335 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 3653368 NSpid: 3653368 NSpgid: 3652785 NSsid: 3652785 VmPeak: 1106860 kB VmSize: 1106860 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98528 kB VmRSS: 98528 kB RssAnon: 59816 kB RssFile: 38712 kB RssShmem: 0 kB VmData: 865612 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 564 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 37 nonvoluntary_ctxt_switches: 119 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '3653368', 'Ngid': '0', 'Pid': '3653368', 'PPid': '3653335', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '3653368', 'NSpid': '3653368', 'NSpgid': '3652785', 'NSsid': '3652785', 'VmPeak': '1106860 kB', 'VmSize': '1106860 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98528 kB', 'VmRSS': '98528 kB', 'RssAnon': '59816 kB', 'RssFile': '38712 kB', 'RssShmem': '0 kB', 'VmData': '865612 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '564 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '37', 'nonvoluntary_ctxt_switches': '119'} ('datou_batch_current', '3653368', '1106860', '0', '1106860', '865612', '98528', b'', 'marlene', '3432985') 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 (25636062) 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 (3432985 ) ) 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 (25636062) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1375106621, 'portfolio_id': 25636062}, {'photo_id': 1375106616, 'portfolio_id': 25636062}, {'photo_id': 1375106613, 'portfolio_id': 25636062}, {'photo_id': 1375106600, 'portfolio_id': 25636062}, {'photo_id': 1375106559, 'portfolio_id': 25636062}, {'photo_id': 1375106557, 'portfolio_id': 25636062}, {'photo_id': 1375106555, 'portfolio_id': 25636062}, {'photo_id': 1375106554, 'portfolio_id': 25636062}, {'photo_id': 1375106551, 'portfolio_id': 25636062}] map_portfolio_id_photo_id: {25636062: [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551]} ##### 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.014739751815795898 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Aug 4 11:35:28 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25636062) 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 : 25636062 get user id for portfolio 25636062 get sub ptf for main ptf 25636062, type 3726 and hashtags ['papier', 'environnement', 'plastique', 'metal', 'mal_croppe', 'cartonnette', 'flou', 'Carton_gris', 'kraft', 'Carton_brun', 'autre_refus', '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`=25636062 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','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`=25636062 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[25636062, 25636095, 3726, 0.5, 492668766, 979], [25636062, 25636096, 3726, 0.5, 493012381, 979], [25636062, 25636097, 3726, 0.5, 492725882, 979], [25636062, 25636098, 3726, 0.5, 492628673, 979], [25636062, 25636099, 3726, 0.5, 2107755527, 979], [25636062, 25636100, 3726, 0.5, 702398920, 979], [25636062, 25636101, 3726, 0.5, 492777938, 979], [25636062, 25636102, 3726, 0.5, 2107753020, 979], [25636062, 25636103, 3726, 0.5, 493202403, 979], [25636062, 25636104, 3726, 0.5, 2107753024, 979], [25636062, 25636105, 3726, 0.5, 2107752406, 979], [25636062, 25636106, 3726, 0.5, 2107752385, 979]] 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`=25636062 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','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`=25636062 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25636062, 'sub_port_id': 25636095, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285099, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'environnement': {'main_port_id': 25636062, 'sub_port_id': 25636096, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285100, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'plastique': {'main_port_id': 25636062, 'sub_port_id': 25636097, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285101, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'metal': {'main_port_id': 25636062, 'sub_port_id': 25636098, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285102, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'mal_croppe': {'main_port_id': 25636062, 'sub_port_id': 25636099, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285103, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'cartonnette': {'main_port_id': 25636062, 'sub_port_id': 25636100, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285104, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'flou': {'main_port_id': 25636062, 'sub_port_id': 25636101, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285105, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'Carton_gris': {'main_port_id': 25636062, 'sub_port_id': 25636102, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285106, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'kraft': {'main_port_id': 25636062, 'sub_port_id': 25636103, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285107, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'Carton_brun': {'main_port_id': 25636062, 'sub_port_id': 25636104, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285108, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'autre_refus': {'main_port_id': 25636062, 'sub_port_id': 25636105, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285109, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 25636062, 'sub_port_id': 25636106, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285110, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 25636095 , 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=25636062 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 (25636095) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636096 , 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=25636062 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 (25636096) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636097 , 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=25636062 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 (25636097) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636098 , 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=25636062 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 (25636098) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636099 , 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=25636062 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 (25636099) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636100 , 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=25636062 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 (25636100) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636101 , 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=25636062 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 (25636101) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636102 , 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=25636062 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 (25636102) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636103 , 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=25636062 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 (25636103) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636104 , 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=25636062 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 (25636104) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636105 , 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=25636062 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 (25636105) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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 25636106 , 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=25636062 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 (25636106) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25636062) result : ((1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) 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 (1375106600) 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`=25636062 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','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`=25636062 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_autre_refus_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__04082025_11_31_04_010154_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[25636062, 25636107, 4417, 0.5, 492668766, 979], [25636062, 25636108, 4417, 0.5, 493012381, 979], [25636062, 25636109, 4417, 0.5, 492725882, 979], [25636062, 25636110, 4417, 0.5, 492628673, 979], [25636062, 25636111, 4417, 0.5, 2107755527, 979], [25636062, 25636112, 4417, 0.5, 702398920, 979], [25636062, 25636113, 4417, 0.5, 492777938, 979], [25636062, 25636114, 4417, 0.5, 2107753020, 979], [25636062, 25636115, 4417, 0.5, 493202403, 979], [25636062, 25636116, 4417, 0.5, 2107753024, 979], [25636062, 25636117, 4417, 0.5, 2107752406, 979], [25636062, 25636118, 4417, 0.5, 2107752385, 979]] 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`=25636062 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','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`=25636062 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','environnement','plastique','metal','mal_croppe','cartonnette','flou','Carton_gris','kraft','Carton_brun','autre_refus','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 25636062, 'sub_port_id': 25636107, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285111, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'environnement': {'main_port_id': 25636062, 'sub_port_id': 25636108, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285112, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'plastique': {'main_port_id': 25636062, 'sub_port_id': 25636109, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285113, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'metal': {'main_port_id': 25636062, 'sub_port_id': 25636110, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285114, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'mal_croppe': {'main_port_id': 25636062, 'sub_port_id': 25636111, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285115, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'cartonnette': {'main_port_id': 25636062, 'sub_port_id': 25636112, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285116, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'flou': {'main_port_id': 25636062, 'sub_port_id': 25636113, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285117, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'Carton_gris': {'main_port_id': 25636062, 'sub_port_id': 25636114, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285118, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'kraft': {'main_port_id': 25636062, 'sub_port_id': 25636115, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285119, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'Carton_brun': {'main_port_id': 25636062, 'sub_port_id': 25636116, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285120, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'autre_refus': {'main_port_id': 25636062, 'sub_port_id': 25636117, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285121, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}, 'Teint_Dans_La_Masse': {'main_port_id': 25636062, 'sub_port_id': 25636118, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 17285122, 'last_updated_at': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_desc': datetime.datetime(2025, 8, 4, 11, 35, 29), 'last_updated_at_asc': datetime.datetime(2025, 8, 4, 11, 35, 29)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636107,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636095 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636108,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636096 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636109,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636097 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636110,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636098 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636111,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636099 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636112,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636100 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636113,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636101 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636114,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636102 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636115,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636103 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636116,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636104 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636117,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636105 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 25636118,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 25636106 lien utilise dans velours : https://www.fotonower.com/velours/25636107,25636108,25636109,25636110,25636111,25636112,25636113,25636114,25636115,25636116,25636117,25636118?tags=papier,environnement,plastique,metal,mal_croppe,cartonnette,flou,Carton_gris,kraft,Carton_brun,autre_refus,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25636062]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] map_info['map_portfolio_photo'] : {25636062: [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551]} final : False mtd_id 4302 list_pids : [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] Looping around the photos to save general results len do output : 1 /25636062. 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, '3432985') ('4302', '25636062', '1375106621', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106616', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106613', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106600', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106559', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106557', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106555', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106554', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106551', None, None, None, None, None, '3432985') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '25636062', "{'papier': 25636095, 'environnement': 25636096, 'plastique': 25636097, 'metal': 25636098, 'mal_croppe': 25636099, 'cartonnette': 25636100, 'flou': 25636101, 'Carton_gris': 25636102, 'kraft': 25636103, 'Carton_brun': 25636104, 'autre_refus': 25636105, 'Teint_Dans_La_Masse': 25636106}", None, None, None, None, '3432985'), ('4302', '25636062', '1375106621', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106616', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106613', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106600', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106559', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106557', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106555', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106554', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106551', None, None, None, None, None, '3432985')] time used for this insertion : 0.018730878829956055 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0697300434112549 time spend to save output : 0.018999338150024414 total time spend for step 1 : 1.0887293815612793 step2:final Mon Aug 4 11:35:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25636062) 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 25636062 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1375106559,1375106557,1375106555,1375106554,1375106551,1375106621,1375106616,1375106613,1375106600); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25636062]) Inside saveOutput : final : False verbose : True original output for save of step final : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} new output for save of step final : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] map_info['map_portfolio_photo'] : {25636062: [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551]} final : False mtd_id 4302 list_pids : [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] Looping around the photos to save general results len do output : 9 /1375106621.Didn't retrieve data . /1375106616.Didn't retrieve data . /1375106613.Didn't retrieve data . /1375106600.Didn't retrieve data . /1375106559.Didn't retrieve data . /1375106557.Didn't retrieve data . /1375106555.Didn't retrieve data . /1375106554.Didn't retrieve data . /1375106551.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, '3432985') ('4302', '25636062', '1375106621', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106616', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106613', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106600', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106559', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106557', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106555', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106554', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106551', None, None, None, None, None, '3432985') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 27 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', '25636062', '1375106621', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106616', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106613', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106600', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106559', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106557', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106555', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106554', '0.0', None, None, None, None, '3432985'), ('4302', '25636062', '1375106551', '0.0', None, None, None, None, '3432985')] time used for this insertion : 0.018054485321044922 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.013420343399047852 time spend to save output : 0.01849365234375 total time spend for step 2 : 0.03191399574279785 step3:velours_tree Mon Aug 4 11:35:29 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {25636062: [{'papier': 25636095, 'environnement': 25636096, 'plastique': 25636097, 'metal': 25636098, 'mal_croppe': 25636099, 'cartonnette': 25636100, 'flou': 25636101, 'Carton_gris': 25636102, 'kraft': 25636103, 'Carton_brun': 25636104, 'autre_refus': 25636105, 'Teint_Dans_La_Masse': 25636106}]} input_args_next_step : {25636062: ()} output_args : {25636062: [{'papier': 25636095, 'environnement': 25636096, 'plastique': 25636097, 'metal': 25636098, 'mal_croppe': 25636099, 'cartonnette': 25636100, 'flou': 25636101, 'Carton_gris': 25636102, 'kraft': 25636103, 'Carton_brun': 25636104, 'autre_refus': 25636105, 'Teint_Dans_La_Masse': 25636106}]} args : 25636062 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 : ({'papier': 25636095, 'environnement': 25636096, 'plastique': 25636097, 'metal': 25636098, 'mal_croppe': 25636099, 'cartonnette': 25636100, 'flou': 25636101, 'Carton_gris': 25636102, 'kraft': 25636103, 'Carton_brun': 25636104, 'autre_refus': 25636105, 'Teint_Dans_La_Masse': 25636106},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25636062) 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([25636062]) 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.2749485969543457 time spend to save output : 5.0067901611328125e-05 total time spend for step 3 : 0.27499866485595703 step4:send_mail_cod Mon Aug 4 11:35:30 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} input_args_next_step : {1375106621: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106621 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106616 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106613 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106600 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106559 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106557 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106555 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106554 depend.output_id : 0 input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ()} output_args : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',)} args : 1375106551 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 : {25636062: [{'papier': 25636095, 'environnement': 25636096, 'plastique': 25636097, 'metal': 25636098, 'mal_croppe': 25636099, 'cartonnette': 25636100, 'flou': 25636101, 'Carton_gris': 25636102, 'kraft': 25636103, 'Carton_brun': 25636104, 'autre_refus': 25636105, 'Teint_Dans_La_Masse': 25636106}]} input_args_next_step : {1375106621: ('0.0',), 1375106616: ('0.0',), 1375106613: ('0.0',), 1375106600: ('0.0',), 1375106559: ('0.0',), 1375106557: ('0.0',), 1375106555: ('0.0',), 1375106554: ('0.0',), 1375106551: ('0.0',), 25636062: ()} output_args : {25636062: [{'papier': 25636095, 'environnement': 25636096, 'plastique': 25636097, 'metal': 25636098, 'mal_croppe': 25636099, 'cartonnette': 25636100, 'flou': 25636101, 'Carton_gris': 25636102, 'kraft': 25636103, 'Carton_brun': 25636104, 'autre_refus': 25636105, 'Teint_Dans_La_Masse': 25636106}]} args : 25636062 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 :10, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25636062) 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 (1375106621,1375106616,1375106613,1375106600,1375106559,1375106557,1375106555,1375106554,1375106551) Found this number of photos: 9 ##### Call download_photos : nb_thread : 5 begin to download photo : 1375106551 begin to download photo : 1375106555 begin to download photo : 1375106559 begin to download photo : 1375106613 begin to download photo : 1375106621 download finish for photo 1375106551 begin to download photo : 1375106554 download finish for photo 1375106613 begin to download photo : 1375106616 download finish for photo 1375106555 begin to download photo : 1375106557 download finish for photo 1375106559 begin to download photo : 1375106600 download finish for photo 1375106621 download finish for photo 1375106554 download finish for photo 1375106616 download finish for photo 1375106600 download finish for photo 1375106557 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette256360971754300130/ imagette256360981754300130/ imagette256360991754300130/ imagette256361001754300130/ imagette256361011754300130/ imagette256361031754300130/ imagette256361051754300130/ imagette256361021754300130/ imagette256361041754300130/ imagette256361061754300130/ length of list_filenames : 9 ; length of list_pids : 9 ; length of list_args : 9 results_Auto_P25636062_04-08-2025_11_35_30.pdf 25636097 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=25636097 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256360971754300130 25636098 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=25636098 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256360981754300130 25636099 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=25636099 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256360991754300130 25636100 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=25636100 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256361001754300130 25636101 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=25636101 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256361011754300130 25636103 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=25636103 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256361031754300130 25636105 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=25636105 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256361051754300130 25636102 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=25636102 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256361021754300130 25636104 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=25636104 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256361041754300130 25636106 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=25636106 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette256361061754300130 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=25636062 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/25636107,25636108,25636109,25636110,25636111,25636112,25636113,25636114,25636115,25636116,25636117,25636118?tags=papier,environnement,plastique,metal,mal_croppe,cartonnette,flou,Carton_gris,kraft,Carton_brun,autre_refus,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1375106621] : ('0.0',) no score found for photo 1375106621 We are sending mail with results at report@fotonower.com args[1375106616] : ('0.0',) no score found for photo 1375106616 We are sending mail with results at report@fotonower.com args[1375106613] : ('0.0',) no score found for photo 1375106613 We are sending mail with results at report@fotonower.com args[1375106600] : ('0.0',) no score found for photo 1375106600 We are sending mail with results at report@fotonower.com args[1375106559] : ('0.0',) no score found for photo 1375106559 We are sending mail with results at report@fotonower.com args[1375106557] : ('0.0',) no score found for photo 1375106557 We are sending mail with results at report@fotonower.com args[1375106555] : ('0.0',) no score found for photo 1375106555 We are sending mail with results at report@fotonower.com args[1375106554] : ('0.0',) no score found for photo 1375106554 We are sending mail with results at report@fotonower.com args[1375106551] : ('0.0',) no score found for photo 1375106551 We are sending mail with results at report@fotonower.com refus_total : 0.0 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=25636062 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_P25636062_04-08-2025_11_35_30.pdf results_Auto_P25636062_04-08-2025_11_35_30.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25636062_04-08-2025_11_35_30.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','25636062','results_Auto_P25636062_04-08-2025_11_35_30.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25636062_04-08-2025_11_35_30.pdf','pdf','','0.09','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25636062]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] map_info['map_portfolio_photo'] : {25636062: [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551]} final : False mtd_id 4302 list_pids : [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] 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, '3432985') ('4302', '25636062', '1375106621', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106616', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106613', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106600', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106559', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106557', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106555', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106554', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106551', None, None, None, None, None, '3432985') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 9 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '25636062', '1375106621', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106616', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106613', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106600', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106559', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106557', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106555', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106554', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106551', None, None, None, None, None, '3432985')] time used for this insertion : 0.20984339714050293 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.2609519958496094 time spend to save output : 0.2100691795349121 total time spend for step 4 : 1.4710211753845215 step5:split_time_score Mon Aug 4 11:35:31 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 : ['25636062'] 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 : [('25636062',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (25636062) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1375106621: {'path': 'temp/1754300130_3653368_1375106621_a7ce292869be37fc478531bfcaf70701.jpg', 'extension': 'jpg'}, 1375106551: {'path': 'temp/1754300130_3653368_1375106551_a0a65e11313be7ee38e1c7da27e45b3a.jpg', 'extension': 'jpg'}, 1375106554: {'path': 'temp/1754300130_3653368_1375106554_6a4380fe5523d90ab4c1e572a7375123.jpg', 'extension': 'jpg'}, 1375106613: {'path': 'temp/1754300130_3653368_1375106613_f0f6478aa0bfc35059c32c56ba8a9747.jpg', 'extension': 'jpg'}, 1375106616: {'path': 'temp/1754300130_3653368_1375106616_143b33479dcdb706e677a9cd65245eb1.jpg', 'extension': 'jpg'}, 1375106559: {'path': 'temp/1754300130_3653368_1375106559_4caef45142ead88fd2aebb4375ad6092.jpg', 'extension': 'jpg'}, 1375106600: {'path': 'temp/1754300130_3653368_1375106600_05045bbb3dae48ae4d18d4237267d62f.jpg', 'extension': 'jpg'}, 1375106555: {'path': 'temp/1754300130_3653368_1375106555_160887121aea1e4e951d4a339dd3fd15.jpg', 'extension': 'jpg'}, 1375106557: {'path': 'temp/1754300130_3653368_1375106557_f6e455c4cbe620cfb7420429152347ff.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 = 25636062; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 25636062 group by h (('11', 9),) 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=25636062 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 (25636062) 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 (25636062) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 04082025 25636062 Nombre de photos uploadées : 9 / 23040 (0%) 04082025 25636062 Nombre de photos taguées (types de déchets): 0 / 9 (0%) 04082025 25636062 Nombre de photos taguées (volume) : 0 / 9 (0%) [{'photo_id': 1375106559, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/4caef45142ead88fd2aebb4375ad6092.jpg', 'username': None, 'uploaded_at': 1754299927, 'text': 'image_04082025_11_31_04_10154.jpg'}, {'photo_id': 1375106557, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/f6e455c4cbe620cfb7420429152347ff.jpg', 'username': None, 'uploaded_at': 1754299927, 'text': 'image_04082025_11_31_14_10133.jpg'}, {'photo_id': 1375106555, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/160887121aea1e4e951d4a339dd3fd15.jpg', 'username': None, 'uploaded_at': 1754299927, 'text': 'image_04082025_11_31_23_9126.jpg'}, {'photo_id': 1375106554, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/8/4/6a4380fe5523d90ab4c1e572a7375123.jpg', 'username': None, 'uploaded_at': 1754299927, 'text': 'image_04082025_11_31_33_10136.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.9073486328125e-06 elapsed_time : order_list_meta_photo_and_scores 5.0067901611328125e-06 ????????? elapsed_time : fill_and_build_computed_from_old_data 0.00046324729919433594 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 25636062, '2025-08-04' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 218 and date = '2025-08-04' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2055035,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.21388030052185059 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= 2055035 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2055035, 'dashboard_run_id': 2064691, 'mtr_portfolio_id': 25634599, 'dashboard_result_id': 13535638, '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_P25634599_04-08-2025_11_03_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634635, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634643, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634645, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634646, 'pht': 3726}}"}, {'dashboat_entry_day': 2055035, 'dashboard_run_id': 2064691, 'mtr_portfolio_id': 25635026, 'dashboard_result_id': 13535639, '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_P25635026_04-08-2025_11_19_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25635039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25635040, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25635041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25635042, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25635043, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25635044, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25635045, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25635046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25635047, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25635049, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25635050, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25635051, 'pht': 3726}}"}, {'dashboat_entry_day': 2055035, 'dashboard_run_id': 2064691, 'mtr_portfolio_id': 25635624, 'dashboard_result_id': 13535640, '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_P25635624_04-08-2025_11_35_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25635639, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25635640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25635641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25635642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25635643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25635644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25635645, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25635646, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25635647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25635648, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25635649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25635650, 'pht': 3726}}"}, {'dashboat_entry_day': 2055035, 'dashboard_run_id': 2064691, 'mtr_portfolio_id': 25636062, 'dashboard_result_id': 13535641, 'hashtag': '_______JRM', 'completion_json': "{'max_time_prod_two_photos': 0}"}] SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25634599 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': 3432340, 'mtr_portfolio_id': 25634599, 'created_at': datetime.datetime(2025, 8, 4, 11, 3, 29), 'result': '0.036726822047875356', 'result_long': None, 'result_double': None}] Qualite : 0.036726822047875356 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25634599 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634599_04-08-2025_11_03_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25634599 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_P25634599_04-08-2025_11_03_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634635, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634643, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634645, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634646, 'pht': 3726}}" where mtr_portfolio_id = 25634599 and dashboard_run_id = 2064691 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`=25634599 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13535638, 0.036726822047875356, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25634599_04-08-2025_11_03_29.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25634635, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25634636, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25634637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25634638, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25634639, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25634640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25634641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25634642, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25634643, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25634644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25634645, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25634646, '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 = 25635026 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': 3432547, 'mtr_portfolio_id': 25635026, 'created_at': datetime.datetime(2025, 8, 4, 11, 18, 59), 'result': '0.030708449498992468', 'result_long': None, 'result_double': None}] Qualite : 0.030708449498992468 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25635026 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25635026_04-08-2025_11_19_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25635026 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_P25635026_04-08-2025_11_19_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25635039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25635040, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25635041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25635042, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25635043, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25635044, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25635045, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25635046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25635047, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25635049, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25635050, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25635051, 'pht': 3726}}" where mtr_portfolio_id = 25635026 and dashboard_run_id = 2064691 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`=25635026 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13535639, 0.030708449498992468, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25635026_04-08-2025_11_19_00.pdf', 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25635039, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25635040, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25635041, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25635042, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25635043, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25635044, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25635045, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25635046, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25635047, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25635049, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 25635050, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25635051, '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 = 25635624 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': 3432765, 'mtr_portfolio_id': 25635624, 'created_at': datetime.datetime(2025, 8, 4, 11, 34, 59), 'result': '0.058176054194406863', 'result_long': None, 'result_double': None}] Qualite : 0.058176054194406863 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25635624 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25635624_04-08-2025_11_35_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25635624 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_P25635624_04-08-2025_11_35_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25635639, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25635640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25635641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25635642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25635643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25635644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25635645, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25635646, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25635647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25635648, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25635649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25635650, 'pht': 3726}}" where mtr_portfolio_id = 25635624 and dashboard_run_id = 2064691 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`=25635624 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (13535640, 0.058176054194406863, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25635624_04-08-2025_11_35_00.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 25635639, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 25635640, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 25635641, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 25635642, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 25635643, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 25635644, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 25635645, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 25635646, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 25635647, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 25635648, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 25635649, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 25635650, '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 = 25636062 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25636062 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 25636062 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25636062 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 25636062 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 25636062 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P25636062_04-08-2025_11_35_30.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 25636062 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_P25636062_04-08-2025_11_35_30.pdf'}" where mtr_portfolio_id = 25636062 and dashboard_run_id = 2064691 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (25634599,25635026,25635624,25636062) result : ((1375101296,), (1375101299,), (1375101318,), (1375101321,), (1375101322,), (1375101324,), (1375101342,), (1375101344,), (1375101345,), (1375101347,), (1375101350,), (1375101354,), (1375101372,), (1375101374,), (1375101375,), (1375101377,), (1375101396,), (1375101397,), (1375101399,), (1375101401,), (1375101437,), (1375101439,), (1375101442,), (1375101445,), (1375101449,), (1375101453,), (1375101465,), (1375101467,), (1375101468,), (1375101470,), (1375101490,), (1375101495,), (1375101498,), (1375101501,), (1375101528,), (1375101529,), (1375101531,), (1375101554,), (1375101556,), (1375101558,), (1375101561,), (1375101585,), (1375101612,), (1375101616,), (1375101648,), (1375101651,), (1375101653,), (1375101712,), (1375101717,), (1375101729,), (1375101945,), (1375101894,), (1375101919,), (1375102281,), (1375102329,), (1375102374,), (1375102418,), (1375103387,), (1375103845,), (1375104054,), (1375104077,), (1375104208,), (1375104210,), (1375104211,), (1375104281,), (1375104285,), (1375104303,), (1375104486,), (1375104511,), (1375104799,), (1375104824,), (1375104845,), (1375104987,), (1375105219,), (1375105240,), (1375105242,), (1375105245,), (1375105248,), (1375105265,), (1375105267,), (1375105269,), (1375105272,), (1375105276,), (1375105352,), (1375105351,), (1375105420,), (1375105782,), (1375105783,), (1375105784,), (1375105811,), (1375105812,), (1375105813,), (1375105815,), (1375106012,), (1375106035,), (1375106060,), (1375106085,), (1375106211,), (1375106236,), (1375106271,), (1375106272,), (1375106305,), (1375106308,), (1375106310,), (1375106313,), (1375106317,), (1375106338,), (1375106339,), (1375106341,), (1375106344,), (1375106348,), (1375106371,), (1375106380,), (1375106384,), (1375106386,), (1375106563,), (1375106551,), (1375106554,), (1375106555,), (1375106557,), (1375106559,), (1375106600,), (1375106613,), (1375106616,), (1375106621,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'04082025': {'nb_upload': 9, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([25636062]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] map_info['map_portfolio_photo'] : {25636062: [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551]} final : True mtd_id 4302 list_pids : [1375106621, 1375106616, 1375106613, 1375106600, 1375106559, 1375106557, 1375106555, 1375106554, 1375106551] Looping around the photos to save general results len do output : 1 /25636062Didn'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, '3432985') ('4302', '25636062', '1375106621', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106616', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106613', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106600', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106559', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106557', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106555', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106554', None, None, None, None, None, '3432985') ('4302', None, None, None, None, None, None, None, '3432985') ('4302', '25636062', '1375106551', None, None, None, None, None, '3432985') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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, '25636062', 'None', None, None, None, None, '3432985'), ('4302', '25636062', '1375106621', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106616', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106613', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106600', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106559', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106557', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106555', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106554', None, None, None, None, None, '3432985'), ('4302', '25636062', '1375106551', None, None, None, None, None, '3432985')] time used for this insertion : 0.28716588020324707 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.4985933303833008 time spend to save output : 0.2874128818511963 total time spend for step 5 : 0.7860062122344971 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 (3432985) 1.94user 2.19system 0:07.01elapsed 58%CPU (0avgtext+0avgdata 159132maxresident)k 304inputs+4592outputs (0major+64026minor)pagefaults 0swaps