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 (2729340) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2729340) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120069 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2729340'] with mtr_portfolio_ids : ['22120069'] and first list_photo_ids : [] new path : /proc/1987339/ Name: python3 Umask: 0002 State: R (running) Tgid: 1987339 Ngid: 0 Pid: 1987339 PPid: 1987338 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1987339 NSpid: 1987339 NSpgid: 1983873 NSsid: 1983873 VmPeak: 1106828 kB VmSize: 1106828 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98108 kB VmRSS: 98108 kB RssAnon: 59768 kB RssFile: 38340 kB RssShmem: 0 kB VmData: 865576 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 612 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 83 nonvoluntary_ctxt_switches: 140 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1987339', 'Ngid': '0', 'Pid': '1987339', 'PPid': '1987338', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1987339', 'NSpid': '1987339', 'NSpgid': '1983873', 'NSsid': '1983873', 'VmPeak': '1106828 kB', 'VmSize': '1106828 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98108 kB', 'VmRSS': '98108 kB', 'RssAnon': '59768 kB', 'RssFile': '38340 kB', 'RssShmem': '0 kB', 'VmData': '865576 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '612 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '83', 'nonvoluntary_ctxt_switches': '140'} ('datou_batch_current', '1987339', '1106828', '0', '1106828', '865576', '98108', b'', 'marlene', '2729340') 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 (22120069) 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 (2729340 ) ) 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 (22120069) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1350621437, 'portfolio_id': 22120069}, {'photo_id': 1350621434, 'portfolio_id': 22120069}, {'photo_id': 1350621430, 'portfolio_id': 22120069}, {'photo_id': 1350621422, 'portfolio_id': 22120069}, {'photo_id': 1350621410, 'portfolio_id': 22120069}, {'photo_id': 1350621363, 'portfolio_id': 22120069}, {'photo_id': 1350621361, 'portfolio_id': 22120069}, {'photo_id': 1350621359, 'portfolio_id': 22120069}, {'photo_id': 1350621355, 'portfolio_id': 22120069}, {'photo_id': 1350621311, 'portfolio_id': 22120069}, {'photo_id': 1350621307, 'portfolio_id': 22120069}] map_portfolio_id_photo_id: {22120069: [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307]} ##### 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.014643430709838867 #### 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 Thu Apr 17 05:48:59 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 (22120069) 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 : 22120069 get user id for portfolio 22120069 get sub ptf for main ptf 22120069, type 3726 and hashtags ['autre_refus', 'Carton_gris', 'flou', 'kraft', 'plastique', 'mal_croppe', 'Teint_Dans_La_Masse', 'metal', 'Carton_brun', 'papier', 'cartonnette', 'environnement'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22120069 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22120069 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[22120069, 22120070, 3726, 0.5, 2107752406, 979], [22120069, 22120071, 3726, 0.5, 2107753020, 979], [22120069, 22120072, 3726, 0.5, 492777938, 979], [22120069, 22120073, 3726, 0.5, 493202403, 979], [22120069, 22120074, 3726, 0.5, 492725882, 979], [22120069, 22120075, 3726, 0.5, 2107755527, 979], [22120069, 22120076, 3726, 0.5, 2107752385, 979], [22120069, 22120077, 3726, 0.5, 492628673, 979], [22120069, 22120078, 3726, 0.5, 2107753024, 979], [22120069, 22120079, 3726, 0.5, 492668766, 979], [22120069, 22120080, 3726, 0.5, 702398920, 979], [22120069, 22120081, 3726, 0.5, 493012381, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22120069 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22120069 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 22120069, 'sub_port_id': 22120070, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602917, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'Carton_gris': {'main_port_id': 22120069, 'sub_port_id': 22120071, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602918, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'flou': {'main_port_id': 22120069, 'sub_port_id': 22120072, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602919, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'kraft': {'main_port_id': 22120069, 'sub_port_id': 22120073, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602920, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'plastique': {'main_port_id': 22120069, 'sub_port_id': 22120074, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602921, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'mal_croppe': {'main_port_id': 22120069, 'sub_port_id': 22120075, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602922, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'Teint_Dans_La_Masse': {'main_port_id': 22120069, 'sub_port_id': 22120076, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602923, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'metal': {'main_port_id': 22120069, 'sub_port_id': 22120077, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602924, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'Carton_brun': {'main_port_id': 22120069, 'sub_port_id': 22120078, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602925, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'papier': {'main_port_id': 22120069, 'sub_port_id': 22120079, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602926, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'cartonnette': {'main_port_id': 22120069, 'sub_port_id': 22120080, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602927, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}, 'environnement': {'main_port_id': 22120069, 'sub_port_id': 22120081, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602928, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120070 , 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=22120069 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 (22120070) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120071 , 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=22120069 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 (22120071) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120072 , 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=22120069 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 (22120072) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120073 , 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=22120069 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 (22120073) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120074 , 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=22120069 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 (22120074) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120075 , 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=22120069 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 (22120075) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120076 , 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=22120069 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 (22120076) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120077 , 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=22120069 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 (22120077) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120078 , 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=22120069 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 (22120078) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120079 , 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=22120069 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 (22120079) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120080 , 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=22120069 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 (22120080) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22120081 , 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=22120069 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 (22120081) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22120069) result : ((1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) 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 () and cspi.crop_hashtag_id = chi.id; Catched exception ! Connect or reconnect ! (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')\n and cspi.crop_hashtag_id = chi.id' at line 3") 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`=22120069 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22120069 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_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__17042025_05_45_34_10135_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[22120069, 22120082, 4417, 0.5, 2107752406, 979], [22120069, 22120083, 4417, 0.5, 2107753020, 979], [22120069, 22120084, 4417, 0.5, 492777938, 979], [22120069, 22120085, 4417, 0.5, 493202403, 979], [22120069, 22120086, 4417, 0.5, 492725882, 979], [22120069, 22120087, 4417, 0.5, 2107755527, 979], [22120069, 22120088, 4417, 0.5, 2107752385, 979], [22120069, 22120089, 4417, 0.5, 492628673, 979], [22120069, 22120090, 4417, 0.5, 2107753024, 979], [22120069, 22120091, 4417, 0.5, 492668766, 979], [22120069, 22120092, 4417, 0.5, 702398920, 979], [22120069, 22120093, 4417, 0.5, 493012381, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22120069 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=22120069 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('autre_refus','Carton_gris','flou','kraft','plastique','mal_croppe','Teint_Dans_La_Masse','metal','Carton_brun','papier','cartonnette','environnement')) AND mptpi.`min_score`=0.5 To do returned map {'autre_refus': {'main_port_id': 22120069, 'sub_port_id': 22120082, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602929, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'Carton_gris': {'main_port_id': 22120069, 'sub_port_id': 22120083, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602930, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'flou': {'main_port_id': 22120069, 'sub_port_id': 22120084, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602931, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'kraft': {'main_port_id': 22120069, 'sub_port_id': 22120085, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602932, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'plastique': {'main_port_id': 22120069, 'sub_port_id': 22120086, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602933, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'mal_croppe': {'main_port_id': 22120069, 'sub_port_id': 22120087, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602934, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 22120069, 'sub_port_id': 22120088, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602935, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'metal': {'main_port_id': 22120069, 'sub_port_id': 22120089, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602936, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'Carton_brun': {'main_port_id': 22120069, 'sub_port_id': 22120090, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602937, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'papier': {'main_port_id': 22120069, 'sub_port_id': 22120091, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602938, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'cartonnette': {'main_port_id': 22120069, 'sub_port_id': 22120092, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602939, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}, 'environnement': {'main_port_id': 22120069, 'sub_port_id': 22120093, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14602940, 'last_updated_at': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 17, 5, 49, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 17, 5, 49, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120082,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120070 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120083,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120071 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120084,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120072 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120085,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120073 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120086,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120074 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120087,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120075 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120088,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120076 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120089,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120077 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120090,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120078 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120091,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120079 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120092,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120080 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22120093,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22120081 lien utilise dans velours : https://www.fotonower.com/velours/22120082,22120083,22120084,22120085,22120086,22120087,22120088,22120089,22120090,22120091,22120092,22120093?tags=autre_refus,Carton_gris,flou,kraft,plastique,mal_croppe,Teint_Dans_La_Masse,metal,Carton_brun,papier,cartonnette,environnement After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22120069]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] map_info['map_portfolio_photo'] : {22120069: [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307]} final : False mtd_id 4302 list_pids : [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] Looping around the photos to save general results len do output : 1 /22120069. 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, '2729340') ('4302', '22120069', '1350621437', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621434', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621430', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621422', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621410', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621363', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621361', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621359', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621355', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621311', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621307', None, None, None, None, None, '2729340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22120069', "{'autre_refus': 22120070, 'Carton_gris': 22120071, 'flou': 22120072, 'kraft': 22120073, 'plastique': 22120074, 'mal_croppe': 22120075, 'Teint_Dans_La_Masse': 22120076, 'metal': 22120077, 'Carton_brun': 22120078, 'papier': 22120079, 'cartonnette': 22120080, 'environnement': 22120081}", None, None, None, None, '2729340'), ('4302', '22120069', '1350621437', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621434', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621430', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621422', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621410', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621363', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621361', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621359', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621355', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621311', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621307', None, None, None, None, None, '2729340')] time used for this insertion : 0.016340017318725586 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.102804660797119 time spend to save output : 0.016811847686767578 total time spend for step 1 : 2.1196165084838867 step2:final Thu Apr 17 05:49:02 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 (22120069) 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 22120069 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1350621311,1350621307,1350621363,1350621361,1350621359,1350621355,1350621437,1350621434,1350621430,1350621422,1350621410); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22120069]) Inside saveOutput : final : False verbose : True original output for save of step final : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} new output for save of step final : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] map_info['map_portfolio_photo'] : {22120069: [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307]} final : False mtd_id 4302 list_pids : [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] Looping around the photos to save general results len do output : 11 /1350621437.Didn't retrieve data . /1350621434.Didn't retrieve data . /1350621430.Didn't retrieve data . /1350621422.Didn't retrieve data . /1350621410.Didn't retrieve data . /1350621363.Didn't retrieve data . /1350621361.Didn't retrieve data . /1350621359.Didn't retrieve data . /1350621355.Didn't retrieve data . /1350621311.Didn't retrieve data . /1350621307.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, '2729340') ('4302', '22120069', '1350621437', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621434', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621430', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621422', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621410', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621363', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621361', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621359', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621355', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621311', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621307', None, None, None, None, None, '2729340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 33 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22120069', '1350621437', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621434', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621430', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621422', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621410', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621363', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621361', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621359', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621355', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621311', '0.0', None, None, None, None, '2729340'), ('4302', '22120069', '1350621307', '0.0', None, None, None, None, '2729340')] time used for this insertion : 0.0139617919921875 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.029391050338745117 time spend to save output : 0.014668703079223633 total time spend for step 2 : 0.04405975341796875 step3:velours_tree Thu Apr 17 05:49:02 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 : {22120069: [{'autre_refus': 22120070, 'Carton_gris': 22120071, 'flou': 22120072, 'kraft': 22120073, 'plastique': 22120074, 'mal_croppe': 22120075, 'Teint_Dans_La_Masse': 22120076, 'metal': 22120077, 'Carton_brun': 22120078, 'papier': 22120079, 'cartonnette': 22120080, 'environnement': 22120081}]} input_args_next_step : {22120069: ()} output_args : {22120069: [{'autre_refus': 22120070, 'Carton_gris': 22120071, 'flou': 22120072, 'kraft': 22120073, 'plastique': 22120074, 'mal_croppe': 22120075, 'Teint_Dans_La_Masse': 22120076, 'metal': 22120077, 'Carton_brun': 22120078, 'papier': 22120079, 'cartonnette': 22120080, 'environnement': 22120081}]} args : 22120069 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 : ({'autre_refus': 22120070, 'Carton_gris': 22120071, 'flou': 22120072, 'kraft': 22120073, 'plastique': 22120074, 'mal_croppe': 22120075, 'Teint_Dans_La_Masse': 22120076, 'metal': 22120077, 'Carton_brun': 22120078, 'papier': 22120079, 'cartonnette': 22120080, 'environnement': 22120081},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22120069) 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([22120069]) 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.3083162307739258 time spend to save output : 5.316734313964844e-05 total time spend for step 3 : 0.30836939811706543 step4:send_mail_cod Thu Apr 17 05:49:02 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 : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} input_args_next_step : {1350621437: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621437 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621434 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621430 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621422 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621410 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621363 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621361 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621359 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621355 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621311 depend.output_id : 0 input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ()} output_args : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',)} args : 1350621307 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 : {22120069: [{'autre_refus': 22120070, 'Carton_gris': 22120071, 'flou': 22120072, 'kraft': 22120073, 'plastique': 22120074, 'mal_croppe': 22120075, 'Teint_Dans_La_Masse': 22120076, 'metal': 22120077, 'Carton_brun': 22120078, 'papier': 22120079, 'cartonnette': 22120080, 'environnement': 22120081}]} input_args_next_step : {1350621437: ('0.0',), 1350621434: ('0.0',), 1350621430: ('0.0',), 1350621422: ('0.0',), 1350621410: ('0.0',), 1350621363: ('0.0',), 1350621361: ('0.0',), 1350621359: ('0.0',), 1350621355: ('0.0',), 1350621311: ('0.0',), 1350621307: ('0.0',), 22120069: ()} output_args : {22120069: [{'autre_refus': 22120070, 'Carton_gris': 22120071, 'flou': 22120072, 'kraft': 22120073, 'plastique': 22120074, 'mal_croppe': 22120075, 'Teint_Dans_La_Masse': 22120076, 'metal': 22120077, 'Carton_brun': 22120078, 'papier': 22120079, 'cartonnette': 22120080, 'environnement': 22120081}]} args : 22120069 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :12, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22120069) 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 (1350621437,1350621434,1350621430,1350621422,1350621410,1350621363,1350621361,1350621359,1350621355,1350621311,1350621307) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1350621307 begin to download photo : 1350621359 begin to download photo : 1350621410 begin to download photo : 1350621434 download finish for photo 1350621434 begin to download photo : 1350621437 download finish for photo 1350621307 begin to download photo : 1350621311 download finish for photo 1350621359 begin to download photo : 1350621361 download finish for photo 1350621410 begin to download photo : 1350621422 download finish for photo 1350621311 begin to download photo : 1350621355 download finish for photo 1350621437 download finish for photo 1350621361 begin to download photo : 1350621363 download finish for photo 1350621422 begin to download photo : 1350621430 download finish for photo 1350621355 download finish for photo 1350621363 download finish for photo 1350621430 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette221200701744861742/ imagette221200721744861742/ imagette221200731744861742/ imagette221200741744861742/ imagette221200751744861742/ imagette221200771744861742/ imagette221200801744861742/ imagette221200711744861742/ imagette221200761744861742/ imagette221200781744861742/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P22120069_17-04-2025_05_49_02.pdf 22120070 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=22120070 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200701744861742 22120072 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=22120072 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200721744861742 22120073 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=22120073 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200731744861742 22120074 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=22120074 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200741744861742 22120075 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=22120075 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200751744861742 22120077 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=22120077 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200771744861742 22120080 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=22120080 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200801744861742 22120071 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=22120071 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200711744861742 22120076 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=22120076 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200761744861742 22120078 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=22120078 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette221200781744861742 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22120069 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22120082,22120083,22120084,22120085,22120086,22120087,22120088,22120089,22120090,22120091,22120092,22120093?tags=autre_refus,Carton_gris,flou,kraft,plastique,mal_croppe,Teint_Dans_La_Masse,metal,Carton_brun,papier,cartonnette,environnement your option no_mail is active, we will not send the real mail to your client args[1350621437] : ('0.0',) no score found for photo 1350621437 We are sending mail with results at report@fotonower.com args[1350621434] : ('0.0',) no score found for photo 1350621434 We are sending mail with results at report@fotonower.com args[1350621430] : ('0.0',) no score found for photo 1350621430 We are sending mail with results at report@fotonower.com args[1350621422] : ('0.0',) no score found for photo 1350621422 We are sending mail with results at report@fotonower.com args[1350621410] : ('0.0',) no score found for photo 1350621410 We are sending mail with results at report@fotonower.com args[1350621363] : ('0.0',) no score found for photo 1350621363 We are sending mail with results at report@fotonower.com args[1350621361] : ('0.0',) no score found for photo 1350621361 We are sending mail with results at report@fotonower.com args[1350621359] : ('0.0',) no score found for photo 1350621359 We are sending mail with results at report@fotonower.com args[1350621355] : ('0.0',) no score found for photo 1350621355 We are sending mail with results at report@fotonower.com args[1350621311] : ('0.0',) no score found for photo 1350621311 We are sending mail with results at report@fotonower.com args[1350621307] : ('0.0',) no score found for photo 1350621307 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=22120069 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_P22120069_17-04-2025_05_49_02.pdf results_Auto_P22120069_17-04-2025_05_49_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22120069_17-04-2025_05_49_02.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','22120069','results_Auto_P22120069_17-04-2025_05_49_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22120069_17-04-2025_05_49_02.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22120069]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] map_info['map_portfolio_photo'] : {22120069: [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307]} final : False mtd_id 4302 list_pids : [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] 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, '2729340') ('4302', '22120069', '1350621437', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621434', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621430', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621422', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621410', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621363', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621361', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621359', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621355', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621311', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621307', None, None, None, None, None, '2729340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '22120069', '1350621437', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621434', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621430', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621422', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621410', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621363', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621361', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621359', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621355', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621311', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621307', None, None, None, None, None, '2729340')] time used for this insertion : 0.016739845275878906 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6127653121948242 time spend to save output : 0.017002105712890625 total time spend for step 4 : 1.6297674179077148 step5:split_time_score Thu Apr 17 05:49:04 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 : ['22120069'] 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 : [('22120069',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22120069) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1350621434: {'path': 'temp/1744861742_1987339_1350621434_da830c6854026d067cbc8f6179d0e353.jpg', 'extension': 'jpg'}, 1350621437: {'path': 'temp/1744861742_1987339_1350621437_2f3ebf2c07d0f4608cd477a8863db19e.jpg', 'extension': 'jpg'}, 1350621307: {'path': 'temp/1744861742_1987339_1350621307_ab19400c8ddedd3656dc2c3162354cf9.jpg', 'extension': 'jpg'}, 1350621311: {'path': 'temp/1744861742_1987339_1350621311_04416e07fb8f2f93875f6fe424d508f7.jpg', 'extension': 'jpg'}, 1350621355: {'path': 'temp/1744861742_1987339_1350621355_fa2442a5c009c21cb5d5568c64791503.jpg', 'extension': 'jpg'}, 1350621359: {'path': 'temp/1744861742_1987339_1350621359_8daccd99c645bb4ed6cdf916bc7a72b0.jpg', 'extension': 'jpg'}, 1350621361: {'path': 'temp/1744861742_1987339_1350621361_4335a32d9e96ca0dfd219cc9fe18c69c.jpg', 'extension': 'jpg'}, 1350621363: {'path': 'temp/1744861742_1987339_1350621363_9c17471057f847eaa563564d064d8ca8.jpg', 'extension': 'jpg'}, 1350621410: {'path': 'temp/1744861742_1987339_1350621410_5ec931c96d90bbf961d8f6ce6b9384c3.jpg', 'extension': 'jpg'}, 1350621422: {'path': 'temp/1744861742_1987339_1350621422_4bc35bde67302e3d6f6e7bf0e92a730f.jpg', 'extension': 'jpg'}, 1350621430: {'path': 'temp/1744861742_1987339_1350621430_c523b7caa2f7231233c9e9628d78a2fb.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 = 22120069; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22120069 group by h (('05', 11),) 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=22120069 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 (22120069) 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 (22120069) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 17042025 22120069 Nombre de photos uploadées : 11 / 23040 (0%) 17042025 22120069 Nombre de photos taguées (types de déchets): 0 / 11 (0%) 17042025 22120069 Nombre de photos taguées (volume) : 0 / 11 (0%) [{'photo_id': 1350621311, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/04416e07fb8f2f93875f6fe424d508f7.jpg', 'username': None, 'uploaded_at': 1744861567, 'text': 'image_17042025_05_45_34_010134m0.jpg 1e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350621307, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/ab19400c8ddedd3656dc2c3162354cf9.jpg', 'username': None, 'uploaded_at': 1744861567, 'text': 'image_17042025_05_45_44_010136m0.jpg 2e-05 for time 1, id_amount 2 this amount prod time diff : 1e-05'}, {'photo_id': 1350621363, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/9c17471057f847eaa563564d064d8ca8.jpg', 'username': None, 'uploaded_at': 1744861627, 'text': 'image_17042025_05_45_54_10137.jpg'}, {'photo_id': 1350621361, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/17/4335a32d9e96ca0dfd219cc9fe18c69c.jpg', 'username': None, 'uploaded_at': 1744861627, 'text': 'image_17042025_05_46_04_10140.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 4.76837158203125e-06 ??????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005571842193603516 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22120069, '2025-04-17' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1721208,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.0293886661529541 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= 1721208 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1721208, 'dashboard_run_id': 1729404, 'mtr_portfolio_id': 22119017, 'dashboard_result_id': 9921567, '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_P22119017_17-04-2025_05_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119018, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119020, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22119021, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119023, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119024, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119027, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119028, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119029, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1729404, 'mtr_portfolio_id': 22119196, 'dashboard_result_id': 9921568, '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_P22119196_17-04-2025_05_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22119197, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119199, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119201, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119202, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119203, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119204, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119207, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119208, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1729404, 'mtr_portfolio_id': 22119607, 'dashboard_result_id': 9921570, '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_P22119607_17-04-2025_05_46_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119608, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119609, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119610, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22119611, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119613, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119614, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119615, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119617, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119618, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119619, 'pht': 3726}}"}, {'dashboat_entry_day': 1721208, 'dashboard_run_id': 1729404, 'mtr_portfolio_id': 22120069, 'dashboard_result_id': 9921572, '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 = 22119017 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': 2729132, 'mtr_portfolio_id': 22119017, 'created_at': datetime.datetime(2025, 4, 17, 5, 16, 58), 'result': '0.02172386645406165', 'result_long': None, 'result_double': None}] Qualite : 0.02172386645406165 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22119017 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119017_17-04-2025_05_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22119017 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_P22119017_17-04-2025_05_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119018, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119020, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22119021, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119023, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119024, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119027, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119028, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119029, 'pht': 3726}}" where mtr_portfolio_id = 22119017 and dashboard_run_id = 1729404 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`=22119017 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9921567, 0.02172386645406165, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119017_17-04-2025_05_16_59.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119018, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119019, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119020, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22119021, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119022, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119023, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119024, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119025, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119026, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119027, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119028, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119029, '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 = 22119196 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': 2729146, 'mtr_portfolio_id': 22119196, 'created_at': datetime.datetime(2025, 4, 17, 5, 32, 59), 'result': '0.040573458815861656', 'result_long': None, 'result_double': None}] Qualite : 0.040573458815861656 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22119196 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119196_17-04-2025_05_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22119196 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_P22119196_17-04-2025_05_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22119197, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119199, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119201, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119202, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119203, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119204, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119207, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119208, 'pht': 3726}}" where mtr_portfolio_id = 22119196 and dashboard_run_id = 1729404 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`=22119196 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9921568, 0.040573458815861656, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119196_17-04-2025_05_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22119197, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119198, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119199, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119200, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119201, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119202, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119203, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119204, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119205, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119206, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119207, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119208, '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 = 22119607 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': 2729177, 'mtr_portfolio_id': 22119607, 'created_at': datetime.datetime(2025, 4, 17, 5, 46, 56), 'result': '0.0435228498817647', 'result_long': None, 'result_double': None}] Qualite : 0.0435228498817647 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22119607 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119607_17-04-2025_05_46_57.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22119607 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_P22119607_17-04-2025_05_46_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119608, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119609, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119610, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22119611, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119613, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119614, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119615, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119617, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119618, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119619, 'pht': 3726}}" where mtr_portfolio_id = 22119607 and dashboard_run_id = 1729404 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`=22119607 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9921570, 0.0435228498817647, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22119607_17-04-2025_05_46_57.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22119608, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22119609, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22119610, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22119611, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22119612, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22119613, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22119614, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22119615, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22119616, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22119617, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22119618, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22119619, '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 = 22120069 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 = 22120069 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 = 22120069 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 22120069 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 = 22120069 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [{'mtr_datou_id': 4302, 'mtr_datou_current_id': 2729340, 'mtr_portfolio_id': 22120069, 'created_at': datetime.datetime(2025, 4, 17, 5, 49, 2), 'result': 0.0, 'result_long': None, 'result_double': None}] Qualite : 0.0 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22120069 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22120069_17-04-2025_05_49_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22120069 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_P22120069_17-04-2025_05_49_02.pdf'}" where mtr_portfolio_id = 22120069 and dashboard_run_id = 1729404 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`=22120069 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9921572, 0.0, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22120069_17-04-2025_05_49_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22120070, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22120071, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22120072, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22120073, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22120074, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22120075, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22120076, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22120077, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22120078, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22120079, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22120080, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22120081, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22119017,22119196,22119607,22120069) result : ((1350618823,), (1350618873,), (1350618878,), (1350619055,), (1350619097,), (1350619108,), (1350619111,), (1350619114,), (1350619118,), (1350619121,), (1350619161,), (1350619169,), (1350619176,), (1350619181,), (1350619186,), (1350619225,), (1350619230,), (1350619271,), (1350619277,), (1350619334,), (1350619338,), (1350619341,), (1350619345,), (1350619349,), (1350619385,), (1350619388,), (1350619392,), (1350619395,), (1350619398,), (1350619451,), (1350619434,), (1350619440,), (1350619446,), (1350619485,), (1350619490,), (1350619495,), (1350619500,), (1350619547,), (1350619552,), (1350619597,), (1350619609,), (1350619612,), (1350619618,), (1350619622,), (1350619657,), (1350619661,), (1350619663,), (1350619665,), (1350619707,), (1350619713,), (1350619717,), (1350619721,), (1350619765,), (1350619775,), (1350619778,), (1350619837,), (1350619843,), (1350619847,), (1350619850,), (1350619854,), (1350619908,), (1350619911,), (1350619914,), (1350619930,), (1350619934,), (1350619943,), (1350619977,), (1350619982,), (1350619986,), (1350619991,), (1350619997,), (1350620043,), (1350620051,), (1350620105,), (1350620108,), (1350620111,), (1350620113,), (1350620116,), (1350620161,), (1350620165,), (1350620168,), (1350620171,), (1350620176,), (1350620240,), (1350620244,), (1350620246,), (1350620275,), (1350620320,), (1350620329,), (1350620336,), (1350620340,), (1350620408,), (1350620399,), (1350620403,), (1350620405,), (1350620406,), (1350620407,), (1350620449,), (1350620451,), (1350620452,), (1350620456,), (1350620500,), (1350620504,), (1350620509,), (1350620514,), (1350620518,), (1350620569,), (1350620572,), (1350620573,), (1350620574,), (1350620576,), (1350620620,), (1350620624,), (1350620628,), (1350620677,), (1350620684,), (1350620689,), (1350620690,), (1350620692,), (1350620725,), (1350620730,), (1350620735,), (1350620739,), (1350620744,), (1350620748,), (1350620790,), (1350620797,), (1350620801,), (1350620805,), (1350620808,), (1350620811,), (1350620851,), (1350620855,), (1350620856,), (1350620862,), (1350620923,), (1350620928,), (1350620932,), (1350620939,), (1350620944,), (1350620995,), (1350621000,), (1350621003,), (1350621005,), (1350621048,), (1350621051,), (1350621056,), (1350621059,), (1350621115,), (1350621119,), (1350621123,), (1350621129,), (1350621133,), (1350621196,), (1350621197,), (1350621200,), (1350621201,), (1350621204,), (1350621205,), (1350621207,), (1350621208,), (1350621213,), (1350621215,), (1350621219,), (1350621222,), (1350621257,), (1350621261,), (1350621264,), (1350621265,), (1350621268,), (1350621314,), (1350621307,), (1350621311,), (1350621355,), (1350621359,), (1350621361,), (1350621363,), (1350621410,), (1350621422,), (1350621430,), (1350621434,), (1350621437,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'17042025': {'nb_upload': 11, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22120069]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] map_info['map_portfolio_photo'] : {22120069: [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307]} final : True mtd_id 4302 list_pids : [1350621437, 1350621434, 1350621430, 1350621422, 1350621410, 1350621363, 1350621361, 1350621359, 1350621355, 1350621311, 1350621307] Looping around the photos to save general results len do output : 1 /22120069Didn'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, '2729340') ('4302', '22120069', '1350621437', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621434', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621430', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621422', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621410', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621363', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621361', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621359', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621355', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621311', None, None, None, None, None, '2729340') ('4302', None, None, None, None, None, None, None, '2729340') ('4302', '22120069', '1350621307', None, None, None, None, None, '2729340') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '22120069', 'None', None, None, None, None, '2729340'), ('4302', '22120069', '1350621437', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621434', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621430', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621422', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621410', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621363', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621361', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621359', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621355', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621311', None, None, None, None, None, '2729340'), ('4302', '22120069', '1350621307', None, None, None, None, None, '2729340')] time used for this insertion : 0.015610456466674805 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.37427568435668945 time spend to save output : 0.015916824340820312 total time spend for step 5 : 0.39019250869750977 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 (2729340) 2.14user 2.12system 0:08.81elapsed 48%CPU (0avgtext+0avgdata 158612maxresident)k 512inputs+6192outputs (13major+72176minor)pagefaults 0swaps