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 : 2616186 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 (3299562) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3299562) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997331 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3299562'] with mtr_portfolio_ids : ['24997331'] and first list_photo_ids : [] new path : /proc/2616186/ Name: python3 Umask: 0002 State: R (running) Tgid: 2616186 Ngid: 0 Pid: 2616186 PPid: 2616185 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2616186 NSpid: 2616186 NSpgid: 2614451 NSsid: 2614451 VmPeak: 1106876 kB VmSize: 1106876 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99720 kB VmRSS: 99720 kB RssAnon: 59820 kB RssFile: 39900 kB RssShmem: 0 kB VmData: 865628 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 592 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: 53 nonvoluntary_ctxt_switches: 100 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2616186', 'Ngid': '0', 'Pid': '2616186', 'PPid': '2616185', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2616186', 'NSpid': '2616186', 'NSpgid': '2614451', 'NSsid': '2614451', 'VmPeak': '1106876 kB', 'VmSize': '1106876 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99720 kB', 'VmRSS': '99720 kB', 'RssAnon': '59820 kB', 'RssFile': '39900 kB', 'RssShmem': '0 kB', 'VmData': '865628 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '592 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': '53', 'nonvoluntary_ctxt_switches': '100'} ('datou_batch_current', '2616186', '1106876', '0', '1106876', '865628', '99720', b'', 'marlene', '3299562') 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 (24997331) 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 (3299562 ) ) 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 (24997331) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1372299016, 'portfolio_id': 24997331}, {'photo_id': 1372298978, 'portfolio_id': 24997331}, {'photo_id': 1372298935, 'portfolio_id': 24997331}, {'photo_id': 1372298932, 'portfolio_id': 24997331}, {'photo_id': 1372298927, 'portfolio_id': 24997331}, {'photo_id': 1372298922, 'portfolio_id': 24997331}, {'photo_id': 1372298905, 'portfolio_id': 24997331}, {'photo_id': 1372298900, 'portfolio_id': 24997331}, {'photo_id': 1372298896, 'portfolio_id': 24997331}, {'photo_id': 1372298890, 'portfolio_id': 24997331}, {'photo_id': 1372298885, 'portfolio_id': 24997331}, {'photo_id': 1372298878, 'portfolio_id': 24997331}] map_portfolio_id_photo_id: {24997331: [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878]} ##### 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.01407313346862793 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Jul 16 09:48:56 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24997331) 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 : 24997331 get user id for portfolio 24997331 get sub ptf for main ptf 24997331, type 3726 and hashtags ['Teint_Dans_La_Masse', 'Carton_gris', 'mal_croppe', 'Carton_brun', 'plastique', 'papier', 'flou', 'kraft', 'cartonnette', 'autre_refus', 'metal', 'environnement'] 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`=24997331 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) 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`=24997331 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_09_45_03_010152_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_3726_environnement_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)[[24997331, 24997335, 3726, 0.5, 2107752385, 979], [24997331, 24997336, 3726, 0.5, 2107753020, 979], [24997331, 24997337, 3726, 0.5, 2107755527, 979], [24997331, 24997338, 3726, 0.5, 2107753024, 979], [24997331, 24997339, 3726, 0.5, 492725882, 979], [24997331, 24997340, 3726, 0.5, 492668766, 979], [24997331, 24997341, 3726, 0.5, 492777938, 979], [24997331, 24997342, 3726, 0.5, 493202403, 979], [24997331, 24997343, 3726, 0.5, 702398920, 979], [24997331, 24997344, 3726, 0.5, 2107752406, 979], [24997331, 24997345, 3726, 0.5, 492628673, 979], [24997331, 24997346, 3726, 0.5, 493012381, 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`=24997331 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) 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`=24997331 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 24997331, 'sub_port_id': 24997335, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841676, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'Carton_gris': {'main_port_id': 24997331, 'sub_port_id': 24997336, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841677, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'mal_croppe': {'main_port_id': 24997331, 'sub_port_id': 24997337, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841678, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'Carton_brun': {'main_port_id': 24997331, 'sub_port_id': 24997338, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841679, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'plastique': {'main_port_id': 24997331, 'sub_port_id': 24997339, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841680, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'papier': {'main_port_id': 24997331, 'sub_port_id': 24997340, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841681, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'flou': {'main_port_id': 24997331, 'sub_port_id': 24997341, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841682, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'kraft': {'main_port_id': 24997331, 'sub_port_id': 24997342, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841683, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'cartonnette': {'main_port_id': 24997331, 'sub_port_id': 24997343, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841684, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'autre_refus': {'main_port_id': 24997331, 'sub_port_id': 24997344, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841685, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'metal': {'main_port_id': 24997331, 'sub_port_id': 24997345, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841686, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'environnement': {'main_port_id': 24997331, 'sub_port_id': 24997346, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841687, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24997335 , 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=24997331 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 (24997335) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997336 , 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=24997331 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 (24997336) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997337 , 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=24997331 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 (24997337) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997338 , 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=24997331 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 (24997338) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997339 , 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=24997331 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 (24997339) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997340 , 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=24997331 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 (24997340) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997341 , 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=24997331 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 (24997341) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997342 , 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=24997331 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 (24997342) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997343 , 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=24997331 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 (24997343) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997344 , 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=24997331 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 (24997344) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997345 , 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=24997331 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 (24997345) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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 24997346 , 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=24997331 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 (24997346) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24997331) result : ((1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) 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 (1372298900) 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`=24997331 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) 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`=24997331 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_09_45_03_010152_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_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__16072025_09_45_03_010152_4417_environnement_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)[[24997331, 24997351, 4417, 0.5, 2107752385, 979], [24997331, 24997352, 4417, 0.5, 2107753020, 979], [24997331, 24997353, 4417, 0.5, 2107755527, 979], [24997331, 24997354, 4417, 0.5, 2107753024, 979], [24997331, 24997356, 4417, 0.5, 492725882, 979], [24997331, 24997357, 4417, 0.5, 492668766, 979], [24997331, 24997358, 4417, 0.5, 492777938, 979], [24997331, 24997359, 4417, 0.5, 493202403, 979], [24997331, 24997361, 4417, 0.5, 702398920, 979], [24997331, 24997362, 4417, 0.5, 2107752406, 979], [24997331, 24997363, 4417, 0.5, 492628673, 979], [24997331, 24997364, 4417, 0.5, 493012381, 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`=24997331 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) 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`=24997331 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('Teint_Dans_La_Masse','Carton_gris','mal_croppe','Carton_brun','plastique','papier','flou','kraft','cartonnette','autre_refus','metal','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'Teint_Dans_La_Masse': {'main_port_id': 24997331, 'sub_port_id': 24997351, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841688, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'Carton_gris': {'main_port_id': 24997331, 'sub_port_id': 24997352, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841689, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'mal_croppe': {'main_port_id': 24997331, 'sub_port_id': 24997353, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841690, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'Carton_brun': {'main_port_id': 24997331, 'sub_port_id': 24997354, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841691, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'plastique': {'main_port_id': 24997331, 'sub_port_id': 24997356, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841692, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'papier': {'main_port_id': 24997331, 'sub_port_id': 24997357, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841693, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'flou': {'main_port_id': 24997331, 'sub_port_id': 24997358, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841694, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'kraft': {'main_port_id': 24997331, 'sub_port_id': 24997359, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841695, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'cartonnette': {'main_port_id': 24997331, 'sub_port_id': 24997361, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841696, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'autre_refus': {'main_port_id': 24997331, 'sub_port_id': 24997362, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841697, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'metal': {'main_port_id': 24997331, 'sub_port_id': 24997363, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841698, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}, 'environnement': {'main_port_id': 24997331, 'sub_port_id': 24997364, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16841699, 'last_updated_at': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 16, 9, 48, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 16, 9, 48, 56)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997351,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997335 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997352,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997336 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997353,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997337 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997354,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997338 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997356,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997339 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997357,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997340 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997358,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997341 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997359,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997342 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997361,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997343 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997362,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997344 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997363,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997345 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24997364,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24997346 lien utilise dans velours : https://www.fotonower.com/velours/24997351,24997352,24997353,24997354,24997356,24997357,24997358,24997359,24997361,24997362,24997363,24997364?tags=Teint_Dans_La_Masse,Carton_gris,mal_croppe,Carton_brun,plastique,papier,flou,kraft,cartonnette,autre_refus,metal,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24997331]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] map_info['map_portfolio_photo'] : {24997331: [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878]} final : False mtd_id 4302 list_pids : [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] Looping around the photos to save general results len do output : 1 /24997331. 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, '3299562') ('4302', '24997331', '1372299016', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298978', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298935', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298932', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298927', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298922', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298905', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298900', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298896', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298890', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298885', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298878', None, None, None, None, None, '3299562') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '24997331', "{'Teint_Dans_La_Masse': 24997335, 'Carton_gris': 24997336, 'mal_croppe': 24997337, 'Carton_brun': 24997338, 'plastique': 24997339, 'papier': 24997340, 'flou': 24997341, 'kraft': 24997342, 'cartonnette': 24997343, 'autre_refus': 24997344, 'metal': 24997345, 'environnement': 24997346}", None, None, None, None, '3299562'), ('4302', '24997331', '1372299016', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298978', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298935', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298932', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298927', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298922', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298905', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298900', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298896', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298890', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298885', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298878', None, None, None, None, None, '3299562')] time used for this insertion : 0.01382899284362793 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.9557867050170898 time spend to save output : 0.01411747932434082 total time spend for step 1 : 0.9699041843414307 step2:final Wed Jul 16 09:48:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24997331) 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 24997331 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1372298905,1372298900,1372298896,1372298890,1372298885,1372298878,1372299016,1372298978,1372298935,1372298932,1372298927,1372298922); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24997331]) Inside saveOutput : final : False verbose : True original output for save of step final : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} new output for save of step final : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] map_info['map_portfolio_photo'] : {24997331: [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878]} final : False mtd_id 4302 list_pids : [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] Looping around the photos to save general results len do output : 12 /1372299016.Didn't retrieve data . /1372298978.Didn't retrieve data . /1372298935.Didn't retrieve data . /1372298932.Didn't retrieve data . /1372298927.Didn't retrieve data . /1372298922.Didn't retrieve data . /1372298905.Didn't retrieve data . /1372298900.Didn't retrieve data . /1372298896.Didn't retrieve data . /1372298890.Didn't retrieve data . /1372298885.Didn't retrieve data . /1372298878.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, '3299562') ('4302', '24997331', '1372299016', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298978', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298935', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298932', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298927', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298922', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298905', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298900', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298896', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298890', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298885', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298878', None, None, None, None, None, '3299562') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 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', '24997331', '1372299016', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298978', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298935', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298932', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298927', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298922', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298905', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298900', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298896', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298890', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298885', '0.0', None, None, None, None, '3299562'), ('4302', '24997331', '1372298878', '0.0', None, None, None, None, '3299562')] time used for this insertion : 0.012902975082397461 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.01433706283569336 time spend to save output : 0.013538360595703125 total time spend for step 2 : 0.027875423431396484 step3:velours_tree Wed Jul 16 09:48:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {24997331: [{'Teint_Dans_La_Masse': 24997335, 'Carton_gris': 24997336, 'mal_croppe': 24997337, 'Carton_brun': 24997338, 'plastique': 24997339, 'papier': 24997340, 'flou': 24997341, 'kraft': 24997342, 'cartonnette': 24997343, 'autre_refus': 24997344, 'metal': 24997345, 'environnement': 24997346}]} input_args_next_step : {24997331: ()} output_args : {24997331: [{'Teint_Dans_La_Masse': 24997335, 'Carton_gris': 24997336, 'mal_croppe': 24997337, 'Carton_brun': 24997338, 'plastique': 24997339, 'papier': 24997340, 'flou': 24997341, 'kraft': 24997342, 'cartonnette': 24997343, 'autre_refus': 24997344, 'metal': 24997345, 'environnement': 24997346}]} args : 24997331 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 : ({'Teint_Dans_La_Masse': 24997335, 'Carton_gris': 24997336, 'mal_croppe': 24997337, 'Carton_brun': 24997338, 'plastique': 24997339, 'papier': 24997340, 'flou': 24997341, 'kraft': 24997342, 'cartonnette': 24997343, 'autre_refus': 24997344, 'metal': 24997345, 'environnement': 24997346},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24997331) 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([24997331]) 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.30747032165527344 time spend to save output : 4.410743713378906e-05 total time spend for step 3 : 0.3075144290924072 step4:send_mail_cod Wed Jul 16 09:48:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} input_args_next_step : {1372299016: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372299016 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298978 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298935 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298932 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298927 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298922 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298905 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298900 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298896 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298890 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298885 depend.output_id : 0 input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ()} output_args : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',)} args : 1372298878 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 : {24997331: [{'Teint_Dans_La_Masse': 24997335, 'Carton_gris': 24997336, 'mal_croppe': 24997337, 'Carton_brun': 24997338, 'plastique': 24997339, 'papier': 24997340, 'flou': 24997341, 'kraft': 24997342, 'cartonnette': 24997343, 'autre_refus': 24997344, 'metal': 24997345, 'environnement': 24997346}]} input_args_next_step : {1372299016: ('0.0',), 1372298978: ('0.0',), 1372298935: ('0.0',), 1372298932: ('0.0',), 1372298927: ('0.0',), 1372298922: ('0.0',), 1372298905: ('0.0',), 1372298900: ('0.0',), 1372298896: ('0.0',), 1372298890: ('0.0',), 1372298885: ('0.0',), 1372298878: ('0.0',), 24997331: ()} output_args : {24997331: [{'Teint_Dans_La_Masse': 24997335, 'Carton_gris': 24997336, 'mal_croppe': 24997337, 'Carton_brun': 24997338, 'plastique': 24997339, 'papier': 24997340, 'flou': 24997341, 'kraft': 24997342, 'cartonnette': 24997343, 'autre_refus': 24997344, 'metal': 24997345, 'environnement': 24997346}]} args : 24997331 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 :13, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24997331) 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 (1372299016,1372298978,1372298935,1372298932,1372298927,1372298922,1372298905,1372298900,1372298896,1372298890,1372298885,1372298878) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1372298878 begin to download photo : 1372298896 begin to download photo : 1372298922 begin to download photo : 1372298935 download finish for photo 1372298922 begin to download photo : 1372298927 download finish for photo 1372298935 begin to download photo : 1372298978 download finish for photo 1372298878 begin to download photo : 1372298885 download finish for photo 1372298896 begin to download photo : 1372298900 download finish for photo 1372298927 begin to download photo : 1372298932 download finish for photo 1372298885 begin to download photo : 1372298890 download finish for photo 1372298978 begin to download photo : 1372299016 download finish for photo 1372298900 begin to download photo : 1372298905 download finish for photo 1372298932 download finish for photo 1372299016 download finish for photo 1372298890 download finish for photo 1372298905 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette249973371752652137/ imagette249973391752652137/ imagette249973411752652137/ imagette249973421752652137/ imagette249973431752652137/ imagette249973441752652137/ imagette249973451752652137/ imagette249973351752652137/ imagette249973361752652137/ imagette249973381752652137/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24997331_16-07-2025_09_48_57.pdf 24997337 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=24997337 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973371752652137 24997339 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=24997339 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973391752652137 24997341 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=24997341 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973411752652137 24997342 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=24997342 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973421752652137 24997343 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=24997343 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973431752652137 24997344 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=24997344 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973441752652137 24997345 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=24997345 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973451752652137 24997335 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=24997335 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973351752652137 24997336 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=24997336 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973361752652137 24997338 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=24997338 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249973381752652137 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24997331 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24997351,24997352,24997353,24997354,24997356,24997357,24997358,24997359,24997361,24997362,24997363,24997364?tags=Teint_Dans_La_Masse,Carton_gris,mal_croppe,Carton_brun,plastique,papier,flou,kraft,cartonnette,autre_refus,metal,environnement your option no_mail is active, we will not send the real mail to your client args[1372299016] : ('0.0',) no score found for photo 1372299016 We are sending mail with results at report@fotonower.com args[1372298978] : ('0.0',) no score found for photo 1372298978 We are sending mail with results at report@fotonower.com args[1372298935] : ('0.0',) no score found for photo 1372298935 We are sending mail with results at report@fotonower.com args[1372298932] : ('0.0',) no score found for photo 1372298932 We are sending mail with results at report@fotonower.com args[1372298927] : ('0.0',) no score found for photo 1372298927 We are sending mail with results at report@fotonower.com args[1372298922] : ('0.0',) no score found for photo 1372298922 We are sending mail with results at report@fotonower.com args[1372298905] : ('0.0',) no score found for photo 1372298905 We are sending mail with results at report@fotonower.com args[1372298900] : ('0.0',) no score found for photo 1372298900 We are sending mail with results at report@fotonower.com args[1372298896] : ('0.0',) no score found for photo 1372298896 We are sending mail with results at report@fotonower.com args[1372298890] : ('0.0',) no score found for photo 1372298890 We are sending mail with results at report@fotonower.com args[1372298885] : ('0.0',) no score found for photo 1372298885 We are sending mail with results at report@fotonower.com args[1372298878] : ('0.0',) no score found for photo 1372298878 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=24997331 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_P24997331_16-07-2025_09_48_57.pdf results_Auto_P24997331_16-07-2025_09_48_57.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24997331_16-07-2025_09_48_57.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','24997331','results_Auto_P24997331_16-07-2025_09_48_57.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24997331_16-07-2025_09_48_57.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24997331]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] map_info['map_portfolio_photo'] : {24997331: [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878]} final : False mtd_id 4302 list_pids : [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] 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, '3299562') ('4302', '24997331', '1372299016', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298978', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298935', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298932', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298927', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298922', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298905', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298900', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298896', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298890', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298885', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298878', None, None, None, None, None, '3299562') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24997331', '1372299016', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298978', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298935', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298932', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298927', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298922', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298905', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298900', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298896', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298890', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298885', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298878', None, None, None, None, None, '3299562')] time used for this insertion : 0.012785673141479492 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5361831188201904 time spend to save output : 0.012984991073608398 total time spend for step 4 : 1.5491681098937988 step5:split_time_score Wed Jul 16 09:48:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24997331'] 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 : [('24997331',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24997331) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1372298922: {'path': 'temp/1752652137_2616186_1372298922_4d707c221bf007ae6d0bc122bf7ce390.jpg', 'extension': 'jpg'}, 1372298927: {'path': 'temp/1752652137_2616186_1372298927_963ecda8262fc7cd2a293a3cf421a36b.jpg', 'extension': 'jpg'}, 1372298932: {'path': 'temp/1752652137_2616186_1372298932_d484a345c3c4d50a30f074bc9c20da27.jpg', 'extension': 'jpg'}, 1372298935: {'path': 'temp/1752652137_2616186_1372298935_766955bd467a3798b21f709c92e14b61.jpg', 'extension': 'jpg'}, 1372298978: {'path': 'temp/1752652137_2616186_1372298978_da46aa79c3e231c5ca978b7f01370433.jpg', 'extension': 'jpg'}, 1372299016: {'path': 'temp/1752652137_2616186_1372299016_e0ec7de3cd27bfe016318ac92f4da049.jpg', 'extension': 'jpg'}, 1372298878: {'path': 'temp/1752652137_2616186_1372298878_587b6fbca45d851a639d11da2d2411eb.jpg', 'extension': 'jpg'}, 1372298885: {'path': 'temp/1752652137_2616186_1372298885_7a8b539a4c807bdf3143478621b1ebba.jpg', 'extension': 'jpg'}, 1372298890: {'path': 'temp/1752652137_2616186_1372298890_ea1288efaa7ac61a4543106554e9aec6.jpg', 'extension': 'jpg'}, 1372298896: {'path': 'temp/1752652137_2616186_1372298896_e8d42d2c83dc5bc0a49a90b9d025a75e.jpg', 'extension': 'jpg'}, 1372298900: {'path': 'temp/1752652137_2616186_1372298900_fa454c916e7d8fc1688bdbf7ee2e7460.jpg', 'extension': 'jpg'}, 1372298905: {'path': 'temp/1752652137_2616186_1372298905_1fac36f437c5d62f6d30cdb9d67b92b9.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 = 24997331; (('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 = 24997331 group by h (('09', 12),) 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=24997331 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 (24997331) 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 (24997331) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 16072025 24997331 Nombre de photos uploadées : 12 / 23040 (0%) 16072025 24997331 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 16072025 24997331 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1372298905, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/1fac36f437c5d62f6d30cdb9d67b92b9.jpg', 'username': None, 'uploaded_at': 1752651963, 'text': 'image_16072025_09_45_03_10152.jpg'}, {'photo_id': 1372298900, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/fa454c916e7d8fc1688bdbf7ee2e7460.jpg', 'username': None, 'uploaded_at': 1752651963, 'text': 'image_16072025_09_45_13_10146.jpg'}, {'photo_id': 1372298896, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/e8d42d2c83dc5bc0a49a90b9d025a75e.jpg', 'username': None, 'uploaded_at': 1752651963, 'text': 'image_16072025_09_45_24_10144.jpg'}, {'photo_id': 1372298890, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/16/ea1288efaa7ac61a4543106554e9aec6.jpg', 'username': None, 'uploaded_at': 1752651963, 'text': 'image_16072025_09_45_34_10140.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 6.67572021484375e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.00040841102600097656 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24997331, '2025-07-16' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1982205,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02133488655090332 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= 1982205 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1982205, 'dashboard_run_id': 1991114, 'mtr_portfolio_id': 24995148, 'dashboard_result_id': 12628033, '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_P24995148_16-07-2025_09_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24995163, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24995164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24995165, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24995166, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24995167, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24995168, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24995169, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24995170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24995171, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24995172, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24995173, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24995174, 'pht': 3726}}"}, {'dashboat_entry_day': 1982205, 'dashboard_run_id': 1991114, 'mtr_portfolio_id': 24995501, 'dashboard_result_id': 12628034, '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_P24995501_16-07-2025_09_32_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24995507, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24995508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24995509, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24995510, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24995511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24995512, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24995513, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24995514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24995515, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24995516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24995517, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24995518, 'pht': 3726}}"}, {'dashboat_entry_day': 1982205, 'dashboard_run_id': 1991114, 'mtr_portfolio_id': 24996666, 'dashboard_result_id': 12628035, '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_P24996666_16-07-2025_09_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24996696, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24996697, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24996698, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24996699, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24996700, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24996701, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24996702, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24996703, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24996704, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24996705, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24996706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24996707, 'pht': 3726}}"}, {'dashboat_entry_day': 1982205, 'dashboard_run_id': 1991114, 'mtr_portfolio_id': 24997331, 'dashboard_result_id': 12628036, '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 = 24995148 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': 3299341, 'mtr_portfolio_id': 24995148, 'created_at': datetime.datetime(2025, 7, 16, 9, 16, 58), 'result': '0.149370678706739', 'result_long': None, 'result_double': None}] Qualite : 0.149370678706739 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24995148 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24995148_16-07-2025_09_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24995148 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_P24995148_16-07-2025_09_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24995163, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24995164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24995165, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24995166, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24995167, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24995168, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24995169, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24995170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24995171, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24995172, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24995173, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24995174, 'pht': 3726}}" where mtr_portfolio_id = 24995148 and dashboard_run_id = 1991114 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`=24995148 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12628033, 0.149370678706739, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24995148_16-07-2025_09_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24995163, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24995164, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24995165, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24995166, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24995167, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24995168, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24995169, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24995170, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24995171, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24995172, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24995173, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24995174, '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 = 24995501 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': 3299420, 'mtr_portfolio_id': 24995501, 'created_at': datetime.datetime(2025, 7, 16, 9, 32, 57), 'result': '0.18160830280059292', 'result_long': None, 'result_double': None}] Qualite : 0.18160830280059292 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24995501 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24995501_16-07-2025_09_32_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24995501 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_P24995501_16-07-2025_09_32_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24995507, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24995508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24995509, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24995510, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24995511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24995512, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24995513, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24995514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24995515, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24995516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24995517, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24995518, 'pht': 3726}}" where mtr_portfolio_id = 24995501 and dashboard_run_id = 1991114 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`=24995501 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12628034, 0.18160830280059292, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24995501_16-07-2025_09_32_58.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24995507, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24995508, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24995509, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24995510, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24995511, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24995512, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24995513, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24995514, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24995515, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24995516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24995517, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24995518, '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 = 24996666 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': 3299496, 'mtr_portfolio_id': 24996666, 'created_at': datetime.datetime(2025, 7, 16, 9, 46, 57), 'result': '0.05932904225981402', 'result_long': None, 'result_double': None}] Qualite : 0.05932904225981402 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24996666 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24996666_16-07-2025_09_46_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24996666 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_P24996666_16-07-2025_09_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24996696, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24996697, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24996698, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24996699, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24996700, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24996701, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24996702, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24996703, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24996704, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24996705, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24996706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24996707, 'pht': 3726}}" where mtr_portfolio_id = 24996666 and dashboard_run_id = 1991114 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`=24996666 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12628035, 0.05932904225981402, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24996666_16-07-2025_09_46_58.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24996696, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24996697, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24996698, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24996699, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24996700, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24996701, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24996702, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24996703, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24996704, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24996705, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24996706, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24996707, '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 = 24997331 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 = 24997331 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 = 24997331 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24997331 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 = 24997331 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 = 24997331 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24997331_16-07-2025_09_48_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24997331 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_P24997331_16-07-2025_09_48_57.pdf'}" where mtr_portfolio_id = 24997331 and dashboard_run_id = 1991114 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24995148,24995501,24996666,24997331) result : ((1372292303,), (1372292373,), (1372292449,), (1372292534,), (1372292623,), (1372292674,), (1372293170,), (1372293268,), (1372293327,), (1372293346,), (1372293371,), (1372293376,), (1372293580,), (1372293607,), (1372293624,), (1372293675,), (1372293759,), (1372293839,), (1372294035,), (1372294096,), (1372294136,), (1372294177,), (1372294216,), (1372294254,), (1372294431,), (1372294438,), (1372294441,), (1372294455,), (1372294475,), (1372294509,), (1372294839,), (1372294878,), (1372294911,), (1372294916,), (1372294953,), (1372294962,), (1372295018,), (1372295026,), (1372295029,), (1372295033,), (1372295038,), (1372295041,), (1372295054,), (1372295057,), (1372295059,), (1372295063,), (1372295069,), (1372295073,), (1372295086,), (1372295089,), (1372295093,), (1372295096,), (1372295101,), (1372295110,), (1372295291,), (1372295331,), (1372295367,), (1372295400,), (1372295437,), (1372295446,), (1372295473,), (1372295477,), (1372295480,), (1372295482,), (1372295485,), (1372295486,), (1372295502,), (1372295504,), (1372295506,), (1372295509,), (1372295514,), (1372295517,), (1372295535,), (1372295573,), (1372295579,), (1372295583,), (1372295588,), (1372295593,), (1372295595,), (1372295607,), (1372295611,), (1372295614,), (1372295618,), (1372295623,), (1372295626,), (1372295645,), (1372295648,), (1372295653,), (1372295658,), (1372295663,), (1372295666,), (1372295685,), (1372295690,), (1372295695,), (1372295700,), (1372295703,), (1372295705,), (1372295718,), (1372295723,), (1372295728,), (1372295730,), (1372295733,), (1372295735,), (1372295754,), (1372295759,), (1372295762,), (1372295767,), (1372295771,), (1372295774,), (1372295789,), (1372295795,), (1372295801,), (1372295805,), (1372295810,), (1372295813,), (1372295824,), (1372295829,), (1372295835,), (1372295840,), (1372295843,), (1372295847,), (1372295863,), (1372295868,), (1372295872,), (1372295875,), (1372295877,), (1372295880,), (1372295964,), (1372295967,), (1372295970,), (1372295973,), (1372295977,), (1372296025,), (1372296165,), (1372296168,), (1372296233,), (1372296311,), (1372296368,), (1372296433,), (1372296503,), (1372296508,), (1372296513,), (1372296517,), (1372296522,), (1372296563,), (1372296641,), (1372296648,), (1372296657,), (1372296662,), (1372296698,), (1372296711,), (1372296730,), (1372296761,), (1372296765,), (1372296768,), (1372296771,), (1372296774,), (1372296776,), (1372296795,), (1372296800,), (1372296805,), (1372296811,), (1372296815,), (1372296818,), (1372296838,), (1372296843,), (1372296849,), (1372296854,), (1372296860,), (1372296863,), (1372296890,), (1372296895,), (1372296899,), (1372296904,), (1372296909,), (1372296914,), (1372296934,), (1372296938,), (1372296942,), (1372296947,), (1372296953,), (1372296957,), (1372296981,), (1372296985,), (1372296987,), (1372296989,), (1372296994,), (1372296998,), (1372297017,), (1372297052,), (1372297089,), (1372297131,), (1372297169,), (1372297208,), (1372297396,), (1372297400,), (1372297403,), (1372297406,), (1372297435,), (1372297444,), (1372297529,), (1372297543,), (1372297546,), (1372297549,), (1372297553,), (1372297579,), (1372297698,), (1372297703,), (1372297707,), (1372297712,), (1372297717,), (1372297721,), (1372297739,), (1372297747,), (1372297756,), (1372297776,), (1372297788,), (1372297815,), (1372298009,), (1372298015,), (1372298019,), (1372298024,), (1372298051,), (1372298065,), (1372298119,), (1372298123,), (1372298127,), (1372298132,), (1372298165,), (1372298199,), (1372298264,), (1372298270,), (1372298273,), (1372298277,), (1372298282,), (1372298286,), (1372298405,), (1372298408,), (1372298432,), (1372298436,), (1372298452,), (1372298490,), (1372298567,), (1372298598,), (1372298605,), (1372298610,), (1372298615,), (1372298618,), (1372298671,), (1372298673,), (1372298677,), (1372298685,), (1372298691,), (1372298705,), (1372298784,), (1372298809,), (1372298827,), (1372298838,), (1372298842,), (1372298848,), (1372298878,), (1372298885,), (1372298890,), (1372298896,), (1372298900,), (1372298905,), (1372298922,), (1372298927,), (1372298932,), (1372298935,), (1372298978,), (1372299016,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'16072025': {'nb_upload': 12, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24997331]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] map_info['map_portfolio_photo'] : {24997331: [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878]} final : True mtd_id 4302 list_pids : [1372299016, 1372298978, 1372298935, 1372298932, 1372298927, 1372298922, 1372298905, 1372298900, 1372298896, 1372298890, 1372298885, 1372298878] Looping around the photos to save general results len do output : 1 /24997331Didn'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, '3299562') ('4302', '24997331', '1372299016', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298978', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298935', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298932', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298927', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298922', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298905', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298900', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298896', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298890', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298885', None, None, None, None, None, '3299562') ('4302', None, None, None, None, None, None, None, '3299562') ('4302', '24997331', '1372298878', None, None, None, None, None, '3299562') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 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, '24997331', 'None', None, None, None, None, '3299562'), ('4302', '24997331', '1372299016', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298978', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298935', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298932', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298927', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298922', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298905', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298900', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298896', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298890', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298885', None, None, None, None, None, '3299562'), ('4302', '24997331', '1372298878', None, None, None, None, None, '3299562')] time used for this insertion : 0.012978076934814453 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.29647302627563477 time spend to save output : 0.013253211975097656 total time spend for step 5 : 0.3097262382507324 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 (3299562) 2.01user 2.15system 0:04.56elapsed 91%CPU (0avgtext+0avgdata 160468maxresident)k 400inputs+6736outputs (15major+64199minor)pagefaults 0swaps