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 : 814033 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 (3295385) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3295385) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961709 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3295385'] with mtr_portfolio_ids : ['24961709'] and first list_photo_ids : [] new path : /proc/814033/ Name: python3 Umask: 0002 State: R (running) Tgid: 814033 Ngid: 0 Pid: 814033 PPid: 814032 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 814033 NSpid: 814033 NSpgid: 812704 NSsid: 812704 VmPeak: 1106876 kB VmSize: 1106876 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 100136 kB VmRSS: 100136 kB RssAnon: 59820 kB RssFile: 40316 kB RssShmem: 0 kB VmData: 865628 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 6/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: 94 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '814033', 'Ngid': '0', 'Pid': '814033', 'PPid': '814032', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '814033', 'NSpid': '814033', 'NSpgid': '812704', 'NSsid': '812704', 'VmPeak': '1106876 kB', 'VmSize': '1106876 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '100136 kB', 'VmRSS': '100136 kB', 'RssAnon': '59820 kB', 'RssFile': '40316 kB', 'RssShmem': '0 kB', 'VmData': '865628 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '6/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': '94'} ('datou_batch_current', '814033', '1106876', '0', '1106876', '865628', '100136', b'', 'marlene', '3295385') 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 (24961709) 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 (3295385 ) ) 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 (24961709) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1372181268, 'portfolio_id': 24961709}, {'photo_id': 1372181265, 'portfolio_id': 24961709}, {'photo_id': 1372181263, 'portfolio_id': 24961709}, {'photo_id': 1372181256, 'portfolio_id': 24961709}, {'photo_id': 1372181249, 'portfolio_id': 24961709}, {'photo_id': 1372181237, 'portfolio_id': 24961709}, {'photo_id': 1372181217, 'portfolio_id': 24961709}, {'photo_id': 1372181213, 'portfolio_id': 24961709}, {'photo_id': 1372181209, 'portfolio_id': 24961709}, {'photo_id': 1372181207, 'portfolio_id': 24961709}, {'photo_id': 1372181204, 'portfolio_id': 24961709}, {'photo_id': 1372181200, 'portfolio_id': 24961709}] map_portfolio_id_photo_id: {24961709: [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200]} ##### 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.014746427536010742 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Tue Jul 15 14: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 After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24961709) 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 : 24961709 get user id for portfolio 24961709 get sub ptf for main ptf 24961709, type 3726 and hashtags ['metal', 'autre_refus', 'Carton_brun', 'mal_croppe', 'kraft', 'plastique', 'cartonnette', 'flou', 'Carton_gris', 'papier', 'environnement', 'Teint_Dans_La_Masse'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24961709 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24961709 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15072025_14_45_04_010145_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[24961709, 24961715, 3726, 0.5, 492628673, 979], [24961709, 24961716, 3726, 0.5, 2107752406, 979], [24961709, 24961717, 3726, 0.5, 2107753024, 979], [24961709, 24961718, 3726, 0.5, 2107755527, 979], [24961709, 24961719, 3726, 0.5, 493202403, 979], [24961709, 24961720, 3726, 0.5, 492725882, 979], [24961709, 24961721, 3726, 0.5, 702398920, 979], [24961709, 24961722, 3726, 0.5, 492777938, 979], [24961709, 24961723, 3726, 0.5, 2107753020, 979], [24961709, 24961724, 3726, 0.5, 492668766, 979], [24961709, 24961725, 3726, 0.5, 493012381, 979], [24961709, 24961726, 3726, 0.5, 2107752385, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24961709 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24961709 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 24961709, 'sub_port_id': 24961715, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810330, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'autre_refus': {'main_port_id': 24961709, 'sub_port_id': 24961716, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810331, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'Carton_brun': {'main_port_id': 24961709, 'sub_port_id': 24961717, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810332, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'mal_croppe': {'main_port_id': 24961709, 'sub_port_id': 24961718, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810333, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'kraft': {'main_port_id': 24961709, 'sub_port_id': 24961719, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810334, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'plastique': {'main_port_id': 24961709, 'sub_port_id': 24961720, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810335, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'cartonnette': {'main_port_id': 24961709, 'sub_port_id': 24961721, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810336, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'flou': {'main_port_id': 24961709, 'sub_port_id': 24961722, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810337, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'Carton_gris': {'main_port_id': 24961709, 'sub_port_id': 24961723, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810338, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'papier': {'main_port_id': 24961709, 'sub_port_id': 24961724, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810339, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'environnement': {'main_port_id': 24961709, 'sub_port_id': 24961725, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810340, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 24961709, 'sub_port_id': 24961726, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810341, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24961715 , 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=24961709 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 (24961715) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961716 , 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=24961709 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 (24961716) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961717 , 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=24961709 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 (24961717) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961718 , 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=24961709 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 (24961718) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961719 , 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=24961709 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 (24961719) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961720 , 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=24961709 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 (24961720) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961721 , 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=24961709 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 (24961721) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961722 , 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=24961709 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 (24961722) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961723 , 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=24961709 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 (24961723) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961724 , 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=24961709 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 (24961724) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961725 , 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=24961709 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 (24961725) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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 24961726 , 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=24961709 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 (24961726) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24961709) result : ((1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) 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 (1372181200) 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`=24961709 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24961709 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_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__15072025_14_45_04_010145_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__15072025_14_45_04_010145_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[24961709, 24961727, 4417, 0.5, 492628673, 979], [24961709, 24961728, 4417, 0.5, 2107752406, 979], [24961709, 24961729, 4417, 0.5, 2107753024, 979], [24961709, 24961730, 4417, 0.5, 2107755527, 979], [24961709, 24961731, 4417, 0.5, 493202403, 979], [24961709, 24961732, 4417, 0.5, 492725882, 979], [24961709, 24961733, 4417, 0.5, 702398920, 979], [24961709, 24961734, 4417, 0.5, 492777938, 979], [24961709, 24961735, 4417, 0.5, 2107753020, 979], [24961709, 24961736, 4417, 0.5, 492668766, 979], [24961709, 24961737, 4417, 0.5, 493012381, 979], [24961709, 24961738, 4417, 0.5, 2107752385, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24961709 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=24961709 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','autre_refus','Carton_brun','mal_croppe','kraft','plastique','cartonnette','flou','Carton_gris','papier','environnement','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 24961709, 'sub_port_id': 24961727, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810342, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'autre_refus': {'main_port_id': 24961709, 'sub_port_id': 24961728, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810343, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'Carton_brun': {'main_port_id': 24961709, 'sub_port_id': 24961729, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810344, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'mal_croppe': {'main_port_id': 24961709, 'sub_port_id': 24961730, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810345, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'kraft': {'main_port_id': 24961709, 'sub_port_id': 24961731, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810346, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'plastique': {'main_port_id': 24961709, 'sub_port_id': 24961732, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810347, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'cartonnette': {'main_port_id': 24961709, 'sub_port_id': 24961733, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810348, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'flou': {'main_port_id': 24961709, 'sub_port_id': 24961734, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810349, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'Carton_gris': {'main_port_id': 24961709, 'sub_port_id': 24961735, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810350, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'papier': {'main_port_id': 24961709, 'sub_port_id': 24961736, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810351, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'environnement': {'main_port_id': 24961709, 'sub_port_id': 24961737, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810352, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 24961709, 'sub_port_id': 24961738, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16810353, 'last_updated_at': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_desc': datetime.datetime(2025, 7, 15, 14, 48, 58), 'last_updated_at_asc': datetime.datetime(2025, 7, 15, 14, 48, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961727,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961715 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961728,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961716 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961729,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961717 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961730,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961718 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961731,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961719 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961732,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961720 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961733,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961721 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961734,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961722 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961735,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961723 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961736,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961724 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961737,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961725 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24961738,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24961726 lien utilise dans velours : https://www.fotonower.com/velours/24961727,24961728,24961729,24961730,24961731,24961732,24961733,24961734,24961735,24961736,24961737,24961738?tags=metal,autre_refus,Carton_brun,mal_croppe,kraft,plastique,cartonnette,flou,Carton_gris,papier,environnement,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24961709]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] map_info['map_portfolio_photo'] : {24961709: [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200]} final : False mtd_id 4302 list_pids : [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] Looping around the photos to save general results len do output : 1 /24961709. 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, '3295385') ('4302', '24961709', '1372181268', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181265', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181263', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181256', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181249', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181237', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181217', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181213', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181209', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181207', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181204', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181200', None, None, None, None, None, '3295385') 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, '24961709', "{'metal': 24961715, 'autre_refus': 24961716, 'Carton_brun': 24961717, 'mal_croppe': 24961718, 'kraft': 24961719, 'plastique': 24961720, 'cartonnette': 24961721, 'flou': 24961722, 'Carton_gris': 24961723, 'papier': 24961724, 'environnement': 24961725, 'Teint_Dans_La_Masse': 24961726}", None, None, None, None, '3295385'), ('4302', '24961709', '1372181268', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181265', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181263', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181256', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181249', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181237', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181217', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181213', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181209', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181207', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181204', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181200', None, None, None, None, None, '3295385')] time used for this insertion : 0.017640113830566406 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0044786930084229 time spend to save output : 0.01789093017578125 total time spend for step 1 : 1.022369623184204 step2:final Tue Jul 15 14: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 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 (24961709) 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 24961709 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1372181217,1372181213,1372181209,1372181207,1372181204,1372181200,1372181268,1372181265,1372181263,1372181256,1372181249,1372181237); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24961709]) Inside saveOutput : final : False verbose : True original output for save of step final : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} new output for save of step final : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] map_info['map_portfolio_photo'] : {24961709: [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200]} final : False mtd_id 4302 list_pids : [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] Looping around the photos to save general results len do output : 12 /1372181268.Didn't retrieve data . /1372181265.Didn't retrieve data . /1372181263.Didn't retrieve data . /1372181256.Didn't retrieve data . /1372181249.Didn't retrieve data . /1372181237.Didn't retrieve data . /1372181217.Didn't retrieve data . /1372181213.Didn't retrieve data . /1372181209.Didn't retrieve data . /1372181207.Didn't retrieve data . /1372181204.Didn't retrieve data . /1372181200.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, '3295385') ('4302', '24961709', '1372181268', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181265', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181263', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181256', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181249', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181237', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181217', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181213', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181209', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181207', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181204', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181200', None, None, None, None, None, '3295385') 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', '24961709', '1372181268', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181265', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181263', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181256', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181249', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181237', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181217', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181213', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181209', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181207', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181204', '0.0', None, None, None, None, '3295385'), ('4302', '24961709', '1372181200', '0.0', None, None, None, None, '3295385')] time used for this insertion : 0.016047000885009766 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.013419628143310547 time spend to save output : 0.016599416732788086 total time spend for step 2 : 0.030019044876098633 step3:velours_tree Tue Jul 15 14: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 : {24961709: [{'metal': 24961715, 'autre_refus': 24961716, 'Carton_brun': 24961717, 'mal_croppe': 24961718, 'kraft': 24961719, 'plastique': 24961720, 'cartonnette': 24961721, 'flou': 24961722, 'Carton_gris': 24961723, 'papier': 24961724, 'environnement': 24961725, 'Teint_Dans_La_Masse': 24961726}]} input_args_next_step : {24961709: ()} output_args : {24961709: [{'metal': 24961715, 'autre_refus': 24961716, 'Carton_brun': 24961717, 'mal_croppe': 24961718, 'kraft': 24961719, 'plastique': 24961720, 'cartonnette': 24961721, 'flou': 24961722, 'Carton_gris': 24961723, 'papier': 24961724, 'environnement': 24961725, 'Teint_Dans_La_Masse': 24961726}]} args : 24961709 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 : ({'metal': 24961715, 'autre_refus': 24961716, 'Carton_brun': 24961717, 'mal_croppe': 24961718, 'kraft': 24961719, 'plastique': 24961720, 'cartonnette': 24961721, 'flou': 24961722, 'Carton_gris': 24961723, 'papier': 24961724, 'environnement': 24961725, 'Teint_Dans_La_Masse': 24961726},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24961709) 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([24961709]) 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.27147674560546875 time spend to save output : 4.172325134277344e-05 total time spend for step 3 : 0.2715184688568115 step4:send_mail_cod Tue Jul 15 14: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 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 : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} input_args_next_step : {1372181268: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181268 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181265 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181263 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181256 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181249 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181237 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181217 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181213 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181209 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181207 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181204 depend.output_id : 0 input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ()} output_args : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',)} args : 1372181200 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 : {24961709: [{'metal': 24961715, 'autre_refus': 24961716, 'Carton_brun': 24961717, 'mal_croppe': 24961718, 'kraft': 24961719, 'plastique': 24961720, 'cartonnette': 24961721, 'flou': 24961722, 'Carton_gris': 24961723, 'papier': 24961724, 'environnement': 24961725, 'Teint_Dans_La_Masse': 24961726}]} input_args_next_step : {1372181268: ('0.0',), 1372181265: ('0.0',), 1372181263: ('0.0',), 1372181256: ('0.0',), 1372181249: ('0.0',), 1372181237: ('0.0',), 1372181217: ('0.0',), 1372181213: ('0.0',), 1372181209: ('0.0',), 1372181207: ('0.0',), 1372181204: ('0.0',), 1372181200: ('0.0',), 24961709: ()} output_args : {24961709: [{'metal': 24961715, 'autre_refus': 24961716, 'Carton_brun': 24961717, 'mal_croppe': 24961718, 'kraft': 24961719, 'plastique': 24961720, 'cartonnette': 24961721, 'flou': 24961722, 'Carton_gris': 24961723, 'papier': 24961724, 'environnement': 24961725, 'Teint_Dans_La_Masse': 24961726}]} args : 24961709 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 (24961709) 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 (1372181268,1372181265,1372181263,1372181256,1372181249,1372181237,1372181217,1372181213,1372181209,1372181207,1372181204,1372181200) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1372181200 begin to download photo : 1372181209 begin to download photo : 1372181237 begin to download photo : 1372181263 download finish for photo 1372181209 begin to download photo : 1372181213 download finish for photo 1372181200 begin to download photo : 1372181204 download finish for photo 1372181263 begin to download photo : 1372181265 download finish for photo 1372181237 begin to download photo : 1372181249 download finish for photo 1372181213 begin to download photo : 1372181217 download finish for photo 1372181204 begin to download photo : 1372181207 download finish for photo 1372181265 begin to download photo : 1372181268 download finish for photo 1372181249 begin to download photo : 1372181256 download finish for photo 1372181217 download finish for photo 1372181207 download finish for photo 1372181268 download finish for photo 1372181256 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette249617151752583739/ imagette249617161752583739/ imagette249617181752583739/ imagette249617191752583739/ imagette249617201752583739/ imagette249617211752583739/ imagette249617221752583739/ imagette249617171752583739/ imagette249617231752583739/ imagette249617261752583739/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24961709_15-07-2025_14_48_59.pdf 24961715 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=24961715 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617151752583739 24961716 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=24961716 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617161752583739 24961718 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=24961718 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617181752583739 24961719 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=24961719 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617191752583739 24961720 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=24961720 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617201752583739 24961721 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=24961721 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617211752583739 24961722 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=24961722 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617221752583739 24961717 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=24961717 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617171752583739 24961723 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=24961723 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617231752583739 24961726 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=24961726 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette249617261752583739 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24961709 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24961727,24961728,24961729,24961730,24961731,24961732,24961733,24961734,24961735,24961736,24961737,24961738?tags=metal,autre_refus,Carton_brun,mal_croppe,kraft,plastique,cartonnette,flou,Carton_gris,papier,environnement,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1372181268] : ('0.0',) no score found for photo 1372181268 We are sending mail with results at report@fotonower.com args[1372181265] : ('0.0',) no score found for photo 1372181265 We are sending mail with results at report@fotonower.com args[1372181263] : ('0.0',) no score found for photo 1372181263 We are sending mail with results at report@fotonower.com args[1372181256] : ('0.0',) no score found for photo 1372181256 We are sending mail with results at report@fotonower.com args[1372181249] : ('0.0',) no score found for photo 1372181249 We are sending mail with results at report@fotonower.com args[1372181237] : ('0.0',) no score found for photo 1372181237 We are sending mail with results at report@fotonower.com args[1372181217] : ('0.0',) no score found for photo 1372181217 We are sending mail with results at report@fotonower.com args[1372181213] : ('0.0',) no score found for photo 1372181213 We are sending mail with results at report@fotonower.com args[1372181209] : ('0.0',) no score found for photo 1372181209 We are sending mail with results at report@fotonower.com args[1372181207] : ('0.0',) no score found for photo 1372181207 We are sending mail with results at report@fotonower.com args[1372181204] : ('0.0',) no score found for photo 1372181204 We are sending mail with results at report@fotonower.com args[1372181200] : ('0.0',) no score found for photo 1372181200 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=24961709 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_P24961709_15-07-2025_14_48_59.pdf results_Auto_P24961709_15-07-2025_14_48_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24961709_15-07-2025_14_48_59.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','24961709','results_Auto_P24961709_15-07-2025_14_48_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24961709_15-07-2025_14_48_59.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24961709]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] map_info['map_portfolio_photo'] : {24961709: [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200]} final : False mtd_id 4302 list_pids : [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] 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, '3295385') ('4302', '24961709', '1372181268', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181265', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181263', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181256', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181249', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181237', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181217', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181213', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181209', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181207', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181204', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181200', None, None, None, None, None, '3295385') 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', '24961709', '1372181268', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181265', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181263', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181256', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181249', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181237', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181217', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181213', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181209', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181207', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181204', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181200', None, None, None, None, None, '3295385')] time used for this insertion : 0.013907909393310547 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.830371618270874 time spend to save output : 0.014100790023803711 total time spend for step 4 : 1.8444724082946777 step5:split_time_score Tue Jul 15 14:49:00 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 : ['24961709'] 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 : [('24961709',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24961709) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1372181209: {'path': 'temp/1752583739_814033_1372181209_c7fc763080df25deccd577211f7fb6ae.jpg', 'extension': 'jpg'}, 1372181213: {'path': 'temp/1752583739_814033_1372181213_40d741e337fd55e0be1397e2fefa200f.jpg', 'extension': 'jpg'}, 1372181217: {'path': 'temp/1752583739_814033_1372181217_bba1634c282f9c4479bda9d9c9a04e65.jpg', 'extension': 'jpg'}, 1372181200: {'path': 'temp/1752583739_814033_1372181200_39e7451eba25c31ec3db0e276b7b9681.jpg', 'extension': 'jpg'}, 1372181204: {'path': 'temp/1752583739_814033_1372181204_9e91b0a25e7396129f4fac0f226e4951.jpg', 'extension': 'jpg'}, 1372181207: {'path': 'temp/1752583739_814033_1372181207_414faea81a1460a49c4456bd566edf07.jpg', 'extension': 'jpg'}, 1372181263: {'path': 'temp/1752583739_814033_1372181263_8b1d249b3d879dca2cd53b1761120a3f.jpg', 'extension': 'jpg'}, 1372181265: {'path': 'temp/1752583739_814033_1372181265_3e469ca3e1d36e2d0e21eed459d39de5.jpg', 'extension': 'jpg'}, 1372181268: {'path': 'temp/1752583739_814033_1372181268_a2f378b21144a3f0ce112cf88a62f689.jpg', 'extension': 'jpg'}, 1372181237: {'path': 'temp/1752583739_814033_1372181237_a5f82300789f9d2062a42ce201d58609.jpg', 'extension': 'jpg'}, 1372181249: {'path': 'temp/1752583739_814033_1372181249_f53d5db3d69bf7ff0c1740668f7e43c4.jpg', 'extension': 'jpg'}, 1372181256: {'path': 'temp/1752583739_814033_1372181256_05fa88b33f1af0979349d08415871154.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 = 24961709; (('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 = 24961709 group by h (('14', 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=24961709 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 (24961709) 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 (24961709) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 15072025 24961709 Nombre de photos uploadées : 12 / 23040 (0%) 15072025 24961709 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 15072025 24961709 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1372181217, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/15/bba1634c282f9c4479bda9d9c9a04e65.jpg', 'username': None, 'uploaded_at': 1752583564, 'text': 'image_15072025_14_45_04_10145.jpg'}, {'photo_id': 1372181213, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/15/40d741e337fd55e0be1397e2fefa200f.jpg', 'username': None, 'uploaded_at': 1752583564, 'text': 'image_15072025_14_45_14_10135.jpg'}, {'photo_id': 1372181209, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/15/c7fc763080df25deccd577211f7fb6ae.jpg', 'username': None, 'uploaded_at': 1752583564, 'text': 'image_15072025_14_45_25_10132.jpg'}, {'photo_id': 1372181207, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/15/414faea81a1460a49c4456bd566edf07.jpg', 'username': None, 'uploaded_at': 1752583564, 'text': 'image_15072025_14_45_35_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 7.62939453125e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.00063323974609375 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24961709, '2025-07-15' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1978268,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.028351306915283203 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= 1978268 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1978268, 'dashboard_run_id': 1987909, 'mtr_portfolio_id': 24960281, 'dashboard_result_id': 12572413, '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_P24960281_15-07-2025_14_17_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24960290, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24960291, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24960292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24960293, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24960294, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24960295, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24960296, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24960297, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24960298, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24960299, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24960300, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24960301, 'pht': 3726}}"}, {'dashboat_entry_day': 1978268, 'dashboard_run_id': 1987909, 'mtr_portfolio_id': 24960783, 'dashboard_result_id': 12572414, '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_P24960783_15-07-2025_14_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24960794, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24960795, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24960796, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24960797, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24960798, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24960799, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24960800, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24960801, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24960802, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24960803, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24960804, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24960805, 'pht': 3726}}"}, {'dashboat_entry_day': 1978268, 'dashboard_run_id': 1987909, 'mtr_portfolio_id': 24961211, 'dashboard_result_id': 12572415, '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_P24961211_15-07-2025_14_47_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24961232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24961233, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24961234, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24961235, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24961236, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24961237, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24961238, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24961239, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24961240, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24961241, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24961242, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24961243, 'pht': 3726}}"}, {'dashboat_entry_day': 1978268, 'dashboard_run_id': 1987909, 'mtr_portfolio_id': 24961709, 'dashboard_result_id': 12572416, '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 = 24960281 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': 3294608, 'mtr_portfolio_id': 24960281, 'created_at': datetime.datetime(2025, 7, 15, 14, 17), 'result': '0.04323365122278916', 'result_long': None, 'result_double': None}] Qualite : 0.04323365122278916 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24960281 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24960281_15-07-2025_14_17_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24960281 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_P24960281_15-07-2025_14_17_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24960290, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24960291, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24960292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24960293, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24960294, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24960295, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24960296, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24960297, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24960298, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24960299, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24960300, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24960301, 'pht': 3726}}" where mtr_portfolio_id = 24960281 and dashboard_run_id = 1987909 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`=24960281 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12572413, 0.04323365122278916, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24960281_15-07-2025_14_17_01.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24960290, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24960291, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24960292, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24960293, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24960294, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24960295, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24960296, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24960297, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24960298, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24960299, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24960300, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24960301, '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 = 24960783 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': 3294875, 'mtr_portfolio_id': 24960783, 'created_at': datetime.datetime(2025, 7, 15, 14, 33), 'result': '0.04837678195499711', 'result_long': None, 'result_double': None}] Qualite : 0.04837678195499711 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24960783 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24960783_15-07-2025_14_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24960783 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_P24960783_15-07-2025_14_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24960794, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24960795, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24960796, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24960797, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24960798, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24960799, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24960800, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24960801, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24960802, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24960803, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24960804, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24960805, 'pht': 3726}}" where mtr_portfolio_id = 24960783 and dashboard_run_id = 1987909 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`=24960783 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12572414, 0.04837678195499711, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24960783_15-07-2025_14_33_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24960794, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24960795, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24960796, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24960797, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24960798, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24960799, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24960800, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24960801, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24960802, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24960803, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24960804, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24960805, '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 = 24961211 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': 3295111, 'mtr_portfolio_id': 24961211, 'created_at': datetime.datetime(2025, 7, 15, 14, 47, 1), 'result': '0.0525129815655805', 'result_long': None, 'result_double': None}] Qualite : 0.0525129815655805 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24961211 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24961211_15-07-2025_14_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24961211 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_P24961211_15-07-2025_14_47_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24961232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24961233, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24961234, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24961235, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24961236, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24961237, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24961238, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24961239, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24961240, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24961241, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24961242, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24961243, 'pht': 3726}}" where mtr_portfolio_id = 24961211 and dashboard_run_id = 1987909 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`=24961211 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12572415, 0.0525129815655805, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24961211_15-07-2025_14_47_01.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24961232, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24961233, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24961234, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24961235, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24961236, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24961237, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24961238, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24961239, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24961240, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24961241, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24961242, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24961243, '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 = 24961709 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 = 24961709 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 = 24961709 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24961709 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 = 24961709 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 = 24961709 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24961709_15-07-2025_14_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24961709 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_P24961709_15-07-2025_14_48_59.pdf'}" where mtr_portfolio_id = 24961709 and dashboard_run_id = 1987909 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24960281,24960783,24961211,24961709) result : ((1372178332,), (1372178335,), (1372178338,), (1372178341,), (1372178345,), (1372178526,), (1372178561,), (1372178598,), (1372178635,), (1372178671,), (1372178708,), (1372178809,), (1372178813,), (1372178815,), (1372178829,), (1372178866,), (1372178901,), (1372179197,), (1372179245,), (1372179285,), (1372179322,), (1372179353,), (1372179357,), (1372179408,), (1372179418,), (1372179453,), (1372179465,), (1372179468,), (1372179471,), (1372179599,), (1372179613,), (1372179620,), (1372179624,), (1372179627,), (1372179663,), (1372179705,), (1372179735,), (1372179739,), (1372179755,), (1372179761,), (1372179764,), (1372179775,), (1372179777,), (1372179779,), (1372179782,), (1372179785,), (1372179788,), (1372179802,), (1372179806,), (1372179811,), (1372179817,), (1372179822,), (1372179826,), (1372179847,), (1372179849,), (1372179851,), (1372179853,), (1372179857,), (1372179860,), (1372179873,), (1372179876,), (1372179878,), (1372179880,), (1372179884,), (1372179886,), (1372179915,), (1372179917,), (1372179919,), (1372179921,), (1372179925,), (1372179929,), (1372179947,), (1372179950,), (1372179952,), (1372179955,), (1372179960,), (1372179964,), (1372179980,), (1372179983,), (1372179985,), (1372179988,), (1372179993,), (1372179995,), (1372180015,), (1372180017,), (1372180018,), (1372180020,), (1372180024,), (1372180027,), (1372180050,), (1372180052,), (1372180053,), (1372180055,), (1372180060,), (1372180063,), (1372180081,), (1372180082,), (1372180083,), (1372180085,), (1372180087,), (1372180090,), (1372180116,), (1372180119,), (1372180122,), (1372180126,), (1372180130,), (1372180132,), (1372180149,), (1372180152,), (1372180155,), (1372180158,), (1372180162,), (1372180166,), (1372180185,), (1372180193,), (1372180196,), (1372180198,), (1372180202,), (1372180206,), (1372180236,), (1372180261,), (1372180263,), (1372180266,), (1372180269,), (1372180271,), (1372180296,), (1372180298,), (1372180301,), (1372180302,), (1372180306,), (1372180308,), (1372180327,), (1372180363,), (1372180366,), (1372180367,), (1372180370,), (1372180374,), (1372180379,), (1372180397,), (1372180399,), (1372180401,), (1372180404,), (1372180407,), (1372180409,), (1372180433,), (1372180436,), (1372180438,), (1372180442,), (1372180445,), (1372180446,), (1372180457,), (1372180461,), (1372180464,), (1372180467,), (1372180470,), (1372180472,), (1372180488,), (1372180496,), (1372180499,), (1372180503,), (1372180506,), (1372180510,), (1372180523,), (1372180528,), (1372180531,), (1372180534,), (1372180537,), (1372180540,), (1372180553,), (1372180559,), (1372180562,), (1372180565,), (1372180570,), (1372180575,), (1372180618,), (1372180625,), (1372180627,), (1372180630,), (1372180633,), (1372180637,), (1372180661,), (1372180668,), (1372180672,), (1372180675,), (1372180681,), (1372180686,), (1372180697,), (1372180701,), (1372180702,), (1372180705,), (1372180710,), (1372180713,), (1372180736,), (1372180743,), (1372180748,), (1372180751,), (1372180755,), (1372180759,), (1372180777,), (1372180778,), (1372180779,), (1372180781,), (1372180784,), (1372180786,), (1372180806,), (1372180808,), (1372180810,), (1372180812,), (1372180817,), (1372180821,), (1372180846,), (1372180854,), (1372180857,), (1372180860,), (1372180863,), (1372180866,), (1372180887,), (1372180890,), (1372180895,), (1372180898,), (1372180904,), (1372180909,), (1372180924,), (1372180927,), (1372180929,), (1372180932,), (1372180937,), (1372180940,), (1372180959,), (1372180961,), (1372180962,), (1372180965,), (1372180969,), (1372180972,), (1372181004,), (1372181005,), (1372181008,), (1372181012,), (1372181017,), (1372181019,), (1372181045,), (1372181051,), (1372181052,), (1372181055,), (1372181060,), (1372181063,), (1372181080,), (1372181082,), (1372181083,), (1372181086,), (1372181089,), (1372181091,), (1372181108,), (1372181119,), (1372181124,), (1372181129,), (1372181133,), (1372181137,), (1372181152,), (1372181159,), (1372181163,), (1372181166,), (1372181172,), (1372181177,), (1372181200,), (1372181204,), (1372181207,), (1372181209,), (1372181213,), (1372181217,), (1372181237,), (1372181249,), (1372181256,), (1372181263,), (1372181265,), (1372181268,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'15072025': {'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([24961709]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] map_info['map_portfolio_photo'] : {24961709: [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200]} final : True mtd_id 4302 list_pids : [1372181268, 1372181265, 1372181263, 1372181256, 1372181249, 1372181237, 1372181217, 1372181213, 1372181209, 1372181207, 1372181204, 1372181200] Looping around the photos to save general results len do output : 1 /24961709Didn'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, '3295385') ('4302', '24961709', '1372181268', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181265', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181263', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181256', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181249', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181237', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181217', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181213', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181209', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181207', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181204', None, None, None, None, None, '3295385') ('4302', None, None, None, None, None, None, None, '3295385') ('4302', '24961709', '1372181200', None, None, None, None, None, '3295385') 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, '24961709', 'None', None, None, None, None, '3295385'), ('4302', '24961709', '1372181268', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181265', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181263', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181256', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181249', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181237', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181217', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181213', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181209', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181207', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181204', None, None, None, None, None, '3295385'), ('4302', '24961709', '1372181200', None, None, None, None, None, '3295385')] time used for this insertion : 0.016222476959228516 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.31766700744628906 time spend to save output : 0.016440629959106445 total time spend for step 5 : 0.3341076374053955 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 (3295385) 1.99user 2.69system 0:06.30elapsed 74%CPU (0avgtext+0avgdata 160684maxresident)k 0inputs+5576outputs (0major+64091minor)pagefaults 0swaps