python /home/admin/mtr/script_for_cron.py -j datou_current3 -m 20 -a ' -a 4302 -v ' -s datou_current_4302 -M 0 -S 0 -U 95,95,120 import MySQLdb succeeded Import error (python version) ['/Users/moilerat/Documents/Fotonower/install/caffe/distribute/python', '/home/admin/workarea/git/Velours/python/prod', '/home/admin/workarea/install/caffe_cuda8_python3/python', '/home/admin/workarea/install/darknet', '/home/admin/workarea/git/Velours/python', '/home/admin/workarea/install/caffe_frcnn_python3/py-faster-rcnn/caffe-fast-rcnn/python', '/home/admin/mtr/.credentials', '/home/admin/workarea/install/caffe/python', '/home/admin/workarea/install/caffe_frcnn/py-faster-rcnn/tools', '/home/admin/workarea/git/fotonowerpip', '/home/admin/workarea/install/segment-anything', '/home/admin/workarea/git/pyfvs', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/home/admin/.local/lib/python3.8/site-packages', '/usr/local/lib/python3.8/dist-packages', '/usr/lib/python3/dist-packages'] Namespace(auto=False, cert_args='/home/fotonower/https/cert.pem', contextDataFile='', custom_size=0, database='', datou_id='4302', datou_id_excluded='', fifo=False, host='', is_cpu_mode=False, job='batch_current', json_args='', key_args='/home/fotonower/https/vision.fotonower.com.key', limit=1000, list_photo_ids='', local='', mtr_current_id=0, mtr_portfolio_ids='', nb_thread=1, no_current=False, offset=0, only_client=False, output_file='', password='', port=5100, rand=0, save=2, use_client=False, user_id=440, username='', verbose=True) process id : 79843 load datou : 4302 # VR 17-11-17 : to create in DB ! Here we check the datou graph and we reorder steps ! Tree builded and cycle checked, now we need to re-order the steps ! We have currenlty an error because there is no dependence between the last step for the case tile - detect - glue We can either keep the depence of, it is better to keep an order compatible with the id of steps if we do not have sons, so a lexical order : (number_son, step_id) All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! All sons are already in current list ! DONE and to test : checkNoCycle ! Here we check the consistency of inputs/outputs number between the given ones and the db ! eke 1-6-18 : checkConsistencyNbInputNbOutput should be processed after step reordering ! WARNING : number of outputs for step 13596 ventilate_hashtags_in_portfolio is not consistent : 2 used against 1 in the step definition ! Step 11881 final have less inputs used (1) than in the step definition (3) : maybe we manage optionnal inputs ! Step 11881 final have less outputs used (1) than in the step definition (2) : some outputs may be not used ! WARNING : number of outputs for step 13625 velours_tree is not consistent : 2 used against 1 in the step definition ! Step 11884 send_mail_cod have less inputs used (3) than in the step definition (5) : maybe we manage optionnal inputs ! Number of inputs / outputs for each step checked ! Here we check the consistency of outputs/inputs types during steps connections eke 1-6-18 : checkConsistencyTypeOutputInput should be processed after checkConsistencyNbInputNbOutput ! We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 3 of step 11884 have datatype=6 WARNING : type of output 1 of step 13596 doesn't seem to be define in the database( WARNING : type of input 3 of step 11881 doesn't seem to be define in the database( We ignore checkConsistencyTypeOutputInput for datou_step final ! WARNING : output 0 of step 13596 have datatype=10 whereas input 0 of step 13625 have datatype=18 WARNING : type of output 1 of step 13625 doesn't seem to be define in the database( WARNING : type of input 5 of step 11884 doesn't seem to be define in the database( DataTypes for each output/input checked ! Unexpected type seems boolean for variable list_input_json ERROR or WARNING : can't parse json string Expecting value: line 1 column 1 (char 0) Tried to parse : None was removed should we ? donnée sous forme de texte was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? id de la photo (peut être local ou global) was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de nombre was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? (photo_id, hashtag_id, score_max) was removed should we ? donnée sous forme de texte was removed should we ? None was removed should we ? donnée sous forme de texte was removed should we ? [ptf_id0,ptf_id1...] was removed should we ? load thcls load pdts Running datou job : batch_current 4302 [] TODO datou_current to load to do maybe to take outside batchDatouExec SELECT * from MTRPhoto.mtr_datou_current where state = 0 AND mtr_portfolio_id is not NULL AND mtd_id = 4302 order by created_at desc LIMIT 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2709773) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2709773) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915815 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2709773'] with mtr_portfolio_ids : ['21915815'] and first list_photo_ids : [] new path : /proc/79843/ Name: python3 Umask: 0002 State: R (running) Tgid: 79843 Ngid: 0 Pid: 79843 PPid: 79842 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 79843 NSpid: 79843 NSpgid: 76337 NSsid: 76337 VmPeak: 1106840 kB VmSize: 1106840 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 96908 kB VmRSS: 96908 kB RssAnon: 59744 kB RssFile: 37164 kB RssShmem: 0 kB VmData: 865588 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 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: 49 nonvoluntary_ctxt_switches: 107 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '79843', 'Ngid': '0', 'Pid': '79843', 'PPid': '79842', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '79843', 'NSpid': '79843', 'NSpgid': '76337', 'NSsid': '76337', 'VmPeak': '1106840 kB', 'VmSize': '1106840 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '96908 kB', 'VmRSS': '96908 kB', 'RssAnon': '59744 kB', 'RssFile': '37164 kB', 'RssShmem': '0 kB', 'VmData': '865588 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 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': '49', 'nonvoluntary_ctxt_switches': '107'} ('datou_batch_current', '79843', '1106840', '0', '1106840', '865588', '96908', b'', 'marlene', '2709773') 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 (21915815) 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 (2709773 ) ) 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 (21915815) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1349039542, 'portfolio_id': 21915815}, {'photo_id': 1349039502, 'portfolio_id': 21915815}, {'photo_id': 1349039474, 'portfolio_id': 21915815}, {'photo_id': 1349039304, 'portfolio_id': 21915815}, {'photo_id': 1349039296, 'portfolio_id': 21915815}, {'photo_id': 1349039288, 'portfolio_id': 21915815}, {'photo_id': 1349039272, 'portfolio_id': 21915815}, {'photo_id': 1349039246, 'portfolio_id': 21915815}, {'photo_id': 1349038590, 'portfolio_id': 21915815}, {'photo_id': 1349038561, 'portfolio_id': 21915815}, {'photo_id': 1349038527, 'portfolio_id': 21915815}] map_portfolio_id_photo_id: {21915815: [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527]} ##### 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.015109539031982422 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Mon Mar 31 17:04:56 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21915815) 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 : 21915815 get user id for portfolio 21915815 get sub ptf for main ptf 21915815, type 3726 and hashtags ['kraft', 'plastique', 'autre_refus', 'Carton_gris', 'environnement', 'flou', 'papier', 'Carton_brun', 'Teint_Dans_La_Masse', 'cartonnette', 'mal_croppe', 'metal'] 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`=21915815 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) 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`=21915815 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_3726_metal_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)[[21915815, 21915818, 3726, 0.5, 493202403, 979], [21915815, 21915819, 3726, 0.5, 492725882, 979], [21915815, 21915820, 3726, 0.5, 2107752406, 979], [21915815, 21915821, 3726, 0.5, 2107753020, 979], [21915815, 21915822, 3726, 0.5, 493012381, 979], [21915815, 21915823, 3726, 0.5, 492777938, 979], [21915815, 21915824, 3726, 0.5, 492668766, 979], [21915815, 21915825, 3726, 0.5, 2107753024, 979], [21915815, 21915826, 3726, 0.5, 2107752385, 979], [21915815, 21915827, 3726, 0.5, 702398920, 979], [21915815, 21915828, 3726, 0.5, 2107755527, 979], [21915815, 21915829, 3726, 0.5, 492628673, 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`=21915815 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) 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`=21915815 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 21915815, 'sub_port_id': 21915818, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421866, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'plastique': {'main_port_id': 21915815, 'sub_port_id': 21915819, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421867, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'autre_refus': {'main_port_id': 21915815, 'sub_port_id': 21915820, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421868, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'Carton_gris': {'main_port_id': 21915815, 'sub_port_id': 21915821, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421869, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'environnement': {'main_port_id': 21915815, 'sub_port_id': 21915822, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421870, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'flou': {'main_port_id': 21915815, 'sub_port_id': 21915823, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421871, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'papier': {'main_port_id': 21915815, 'sub_port_id': 21915824, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421872, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'Carton_brun': {'main_port_id': 21915815, 'sub_port_id': 21915825, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421873, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 21915815, 'sub_port_id': 21915826, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421874, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'cartonnette': {'main_port_id': 21915815, 'sub_port_id': 21915827, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421875, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'mal_croppe': {'main_port_id': 21915815, 'sub_port_id': 21915828, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421876, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}, 'metal': {'main_port_id': 21915815, 'sub_port_id': 21915829, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421877, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 56), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21915818 , 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=21915815 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 (21915818) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915819 , 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=21915815 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 (21915819) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915820 , 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=21915815 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 (21915820) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915821 , 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=21915815 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 (21915821) result : ((1349039645,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915822 , 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=21915815 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 (21915822) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915823 , 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=21915815 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 (21915823) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915824 , 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=21915815 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 (21915824) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915825 , 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=21915815 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 (21915825) result : ((1349039647,), (1349039648,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915826 , 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=21915815 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 (21915826) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915827 , 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=21915815 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 (21915827) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915828 , 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=21915815 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 (21915828) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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 21915829 , 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=21915815 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 (21915829) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21915815) result : ((1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) 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`=21915815 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) 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`=21915815 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_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__31032025_17_00_04_10145_4417_metal_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)[[21915815, 21915830, 4417, 0.5, 493202403, 979], [21915815, 21915831, 4417, 0.5, 492725882, 979], [21915815, 21915832, 4417, 0.5, 2107752406, 979], [21915815, 21915833, 4417, 0.5, 2107753020, 979], [21915815, 21915834, 4417, 0.5, 493012381, 979], [21915815, 21915835, 4417, 0.5, 492777938, 979], [21915815, 21915836, 4417, 0.5, 492668766, 979], [21915815, 21915837, 4417, 0.5, 2107753024, 979], [21915815, 21915838, 4417, 0.5, 2107752385, 979], [21915815, 21915839, 4417, 0.5, 702398920, 979], [21915815, 21915840, 4417, 0.5, 2107755527, 979], [21915815, 21915841, 4417, 0.5, 492628673, 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`=21915815 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) 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`=21915815 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','plastique','autre_refus','Carton_gris','environnement','flou','papier','Carton_brun','Teint_Dans_La_Masse','cartonnette','mal_croppe','metal')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 21915815, 'sub_port_id': 21915830, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421878, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'plastique': {'main_port_id': 21915815, 'sub_port_id': 21915831, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421879, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'autre_refus': {'main_port_id': 21915815, 'sub_port_id': 21915832, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421880, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'Carton_gris': {'main_port_id': 21915815, 'sub_port_id': 21915833, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421881, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'environnement': {'main_port_id': 21915815, 'sub_port_id': 21915834, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421882, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'flou': {'main_port_id': 21915815, 'sub_port_id': 21915835, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421883, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'papier': {'main_port_id': 21915815, 'sub_port_id': 21915836, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421884, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'Carton_brun': {'main_port_id': 21915815, 'sub_port_id': 21915837, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421885, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 21915815, 'sub_port_id': 21915838, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421886, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'cartonnette': {'main_port_id': 21915815, 'sub_port_id': 21915839, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421887, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'mal_croppe': {'main_port_id': 21915815, 'sub_port_id': 21915840, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421888, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}, 'metal': {'main_port_id': 21915815, 'sub_port_id': 21915841, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14421889, 'last_updated_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 31, 17, 4, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 31, 17, 4, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915830,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915818 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915831,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915819 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915832,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915820 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915833,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915821 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915834,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915822 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915835,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915823 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915836,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915824 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915837,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915825 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915838,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915826 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915839,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915827 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915840,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915828 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21915841,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21915829 lien utilise dans velours : https://www.fotonower.com/velours/21915830,21915831,21915832,21915833,21915834,21915835,21915836,21915837,21915838,21915839,21915840,21915841?tags=kraft,plastique,autre_refus,Carton_gris,environnement,flou,papier,Carton_brun,Teint_Dans_La_Masse,cartonnette,mal_croppe,metal After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21915815]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] map_info['map_portfolio_photo'] : {21915815: [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527]} final : False mtd_id 4302 list_pids : [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] Looping around the photos to save general results len do output : 1 /21915815. 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, '2709773') ('4302', '21915815', '1349039542', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039502', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039474', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039304', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039296', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039288', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039272', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039246', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038590', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038561', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038527', None, None, None, None, None, '2709773') 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, '21915815', "{'kraft': 21915818, 'plastique': 21915819, 'autre_refus': 21915820, 'Carton_gris': 21915821, 'environnement': 21915822, 'flou': 21915823, 'papier': 21915824, 'Carton_brun': 21915825, 'Teint_Dans_La_Masse': 21915826, 'cartonnette': 21915827, 'mal_croppe': 21915828, 'metal': 21915829}", None, None, None, None, '2709773'), ('4302', '21915815', '1349039542', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039502', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039474', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039304', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039296', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039288', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039272', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039246', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038590', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038561', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038527', None, None, None, None, None, '2709773')] time used for this insertion : 0.013379335403442383 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.095836639404297 time spend to save output : 0.013707637786865234 total time spend for step 1 : 2.109544277191162 step2:final Mon Mar 31 17:04:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21915815) 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 21915815 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1349038590,1349038561,1349038527,1349039304,1349039296,1349039288,1349039272,1349039246,1349039542,1349039502,1349039474); 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([21915815]) Inside saveOutput : final : False verbose : True original output for save of step final : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} new output for save of step final : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] map_info['map_portfolio_photo'] : {21915815: [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527]} final : False mtd_id 4302 list_pids : [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] Looping around the photos to save general results len do output : 11 /1349039542.Didn't retrieve data . /1349039502.Didn't retrieve data . /1349039474.Didn't retrieve data . /1349039304.Didn't retrieve data . /1349039296.Didn't retrieve data . /1349039288.Didn't retrieve data . /1349039272.Didn't retrieve data . /1349039246.Didn't retrieve data . /1349038590.Didn't retrieve data . /1349038561.Didn't retrieve data . /1349038527.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, '2709773') ('4302', '21915815', '1349039542', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039502', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039474', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039304', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039296', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039288', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039272', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039246', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038590', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038561', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038527', None, None, None, None, None, '2709773') 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', '21915815', '1349039542', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349039502', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349039474', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349039304', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349039296', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349039288', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349039272', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349039246', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349038590', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349038561', '0.026120691642851357', None, None, None, None, '2709773'), ('4302', '21915815', '1349038527', '0.026120691642851357', None, None, None, None, '2709773')] time used for this insertion : 0.01326751708984375 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.026055097579956055 time spend to save output : 0.013896703720092773 total time spend for step 2 : 0.03995180130004883 step3:velours_tree Mon Mar 31 17:04:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21915815: [{'kraft': 21915818, 'plastique': 21915819, 'autre_refus': 21915820, 'Carton_gris': 21915821, 'environnement': 21915822, 'flou': 21915823, 'papier': 21915824, 'Carton_brun': 21915825, 'Teint_Dans_La_Masse': 21915826, 'cartonnette': 21915827, 'mal_croppe': 21915828, 'metal': 21915829}]} input_args_next_step : {21915815: ()} output_args : {21915815: [{'kraft': 21915818, 'plastique': 21915819, 'autre_refus': 21915820, 'Carton_gris': 21915821, 'environnement': 21915822, 'flou': 21915823, 'papier': 21915824, 'Carton_brun': 21915825, 'Teint_Dans_La_Masse': 21915826, 'cartonnette': 21915827, 'mal_croppe': 21915828, 'metal': 21915829}]} args : 21915815 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 : ({'kraft': 21915818, 'plastique': 21915819, 'autre_refus': 21915820, 'Carton_gris': 21915821, 'environnement': 21915822, 'flou': 21915823, 'papier': 21915824, 'Carton_brun': 21915825, 'Teint_Dans_La_Masse': 21915826, 'cartonnette': 21915827, 'mal_croppe': 21915828, 'metal': 21915829},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21915815) 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([21915815]) 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.34772825241088867 time spend to save output : 5.9604644775390625e-05 total time spend for step 3 : 0.34778785705566406 step4:send_mail_cod Mon Mar 31 17:04:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} input_args_next_step : {1349039542: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039542 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039502 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039474 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039304 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039296 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039288 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039272 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349039246 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349038590 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349038561 depend.output_id : 0 input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ()} output_args : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',)} args : 1349038527 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 : {21915815: [{'kraft': 21915818, 'plastique': 21915819, 'autre_refus': 21915820, 'Carton_gris': 21915821, 'environnement': 21915822, 'flou': 21915823, 'papier': 21915824, 'Carton_brun': 21915825, 'Teint_Dans_La_Masse': 21915826, 'cartonnette': 21915827, 'mal_croppe': 21915828, 'metal': 21915829}]} input_args_next_step : {1349039542: ('0.026120691642851357',), 1349039502: ('0.026120691642851357',), 1349039474: ('0.026120691642851357',), 1349039304: ('0.026120691642851357',), 1349039296: ('0.026120691642851357',), 1349039288: ('0.026120691642851357',), 1349039272: ('0.026120691642851357',), 1349039246: ('0.026120691642851357',), 1349038590: ('0.026120691642851357',), 1349038561: ('0.026120691642851357',), 1349038527: ('0.026120691642851357',), 21915815: ()} output_args : {21915815: [{'kraft': 21915818, 'plastique': 21915819, 'autre_refus': 21915820, 'Carton_gris': 21915821, 'environnement': 21915822, 'flou': 21915823, 'papier': 21915824, 'Carton_brun': 21915825, 'Teint_Dans_La_Masse': 21915826, 'cartonnette': 21915827, 'mal_croppe': 21915828, 'metal': 21915829}]} args : 21915815 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.026120691642851357',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21915815) 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 (1349039542,1349039502,1349039474,1349039304,1349039296,1349039288,1349039272,1349039246,1349038590,1349038561,1349038527) Found this number of photos: 11 ##### Call download_photos : nb_thread : 5 begin to download photo : 1349038527 begin to download photo : 1349039246 begin to download photo : 1349039296 begin to download photo : 1349039502 download finish for photo 1349039502 begin to download photo : 1349039542 download finish for photo 1349039296 begin to download photo : 1349039304 download finish for photo 1349039246 begin to download photo : 1349039272 download finish for photo 1349039542 download finish for photo 1349039304 begin to download photo : 1349039474 download finish for photo 1349039272 begin to download photo : 1349039288 download finish for photo 1349039474 download finish for photo 1349039288 download finish for photo 1349038527 begin to download photo : 1349038561 download finish for photo 1349038561 begin to download photo : 1349038590 download finish for photo 1349038590 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette219158181743433499/ imagette219158191743433499/ imagette219158201743433499/ imagette219158231743433499/ imagette219158271743433499/ imagette219158281743433499/ imagette219158291743433499/ length of list_filenames : 11 ; length of list_pids : 11 ; length of list_args : 11 results_Auto_P21915815_31-03-2025_17_04_59.pdf 21915818 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=21915818 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158181743433499 21915819 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=21915819 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158191743433499 21915820 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=21915820 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158201743433499 21915823 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=21915823 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158231743433499 21915827 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=21915827 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158271743433499 21915828 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=21915828 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158281743433499 21915829 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=21915829 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158291743433499 21915821 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=21915821 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349039645: '1743433391_3627328_1349038590_6ba3fc25e72a025e395bb8ec7eabf895_rle_crop_3741260639_0.png'} change filename to text .imagette219158211743433499/ imagette219158211743433499/1743433391_3627328_1349038590_6ba3fc25e72a025e395bb8ec7eabf895_rle_crop_3741260639_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/2bd54b41c167a1bc724a548abf518062_9588685.png imagette219158211743433499 21915825 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=21915825 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1349039647: '1743433391_3627328_1349038561_3d09f02d8f80a9a75d52cca65a61806c_rle_crop_3741260675_0.png', 1349039648: '1743433391_3627328_1349038527_77b0898dfb11e6cc046562171bf98562_rle_crop_3741260713_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/c87a0171f4f5825bf424537c63081ece_74054997.png change filename to text .imagette219158251743433499/ imagette219158251743433499/1743433391_3627328_1349038527_77b0898dfb11e6cc046562171bf98562_rle_crop_3741260713_0.png.png imagette219158251743433499/1743433391_3627328_1349038561_3d09f02d8f80a9a75d52cca65a61806c_rle_crop_3741260675_0.png.png imagette219158261743433499/ wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/31a435edd816ccdcc910933726b3bcb1_10492110.png imagette219158251743433499 21915826 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=21915826 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette219158261743433499 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21915815 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21915830,21915831,21915832,21915833,21915834,21915835,21915836,21915837,21915838,21915839,21915840,21915841?tags=kraft,plastique,autre_refus,Carton_gris,environnement,flou,papier,Carton_brun,Teint_Dans_La_Masse,cartonnette,mal_croppe,metal your option no_mail is active, we will not send the real mail to your client args[1349039542] : ('0.026120691642851357',) no score found for photo 1349039542 We are sending mail with results at report@fotonower.com args[1349039502] : ('0.026120691642851357',) no score found for photo 1349039502 We are sending mail with results at report@fotonower.com args[1349039474] : ('0.026120691642851357',) no score found for photo 1349039474 We are sending mail with results at report@fotonower.com args[1349039304] : ('0.026120691642851357',) no score found for photo 1349039304 We are sending mail with results at report@fotonower.com args[1349039296] : ('0.026120691642851357',) no score found for photo 1349039296 We are sending mail with results at report@fotonower.com args[1349039288] : ('0.026120691642851357',) no score found for photo 1349039288 We are sending mail with results at report@fotonower.com args[1349039272] : ('0.026120691642851357',) no score found for photo 1349039272 We are sending mail with results at report@fotonower.com args[1349039246] : ('0.026120691642851357',) no score found for photo 1349039246 We are sending mail with results at report@fotonower.com args[1349038590] : ('0.026120691642851357',) no score found for photo 1349038590 We are sending mail with results at report@fotonower.com args[1349038561] : ('0.026120691642851357',) no score found for photo 1349038561 We are sending mail with results at report@fotonower.com args[1349038527] : ('0.026120691642851357',) no score found for photo 1349038527 We are sending mail with results at report@fotonower.com refus_total : 0.026120691642851357 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=21915815 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_P21915815_31-03-2025_17_04_59.pdf results_Auto_P21915815_31-03-2025_17_04_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915815_31-03-2025_17_04_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','21915815','results_Auto_P21915815_31-03-2025_17_04_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915815_31-03-2025_17_04_59.pdf','pdf','','0.11','0.026120691642851357') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21915815]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] map_info['map_portfolio_photo'] : {21915815: [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527]} final : False mtd_id 4302 list_pids : [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] 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, '2709773') ('4302', '21915815', '1349039542', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039502', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039474', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039304', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039296', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039288', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039272', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039246', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038590', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038561', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038527', None, None, None, None, None, '2709773') 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', '21915815', '1349039542', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039502', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039474', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039304', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039296', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039288', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039272', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039246', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038590', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038561', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038527', None, None, None, None, None, '2709773')] time used for this insertion : 0.01364445686340332 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.568899393081665 time spend to save output : 0.013917207717895508 total time spend for step 4 : 2.5828166007995605 step5:split_time_score Mon Mar 31 17:05:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['21915815'] 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 : [('21915815',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21915815) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1349039502: {'path': 'temp/1743433498_79843_1349039502_f43d52fc17e7c319aa1c48fdc09ed1eb.jpg', 'extension': 'jpg'}, 1349039542: {'path': 'temp/1743433498_79843_1349039542_fd4d19e0a5ec4ee01552dd1b5bd6f22c.jpg', 'extension': 'jpg'}, 1349039296: {'path': 'temp/1743433498_79843_1349039296_b24f610b62a9d6424dcf175190a29761.jpg', 'extension': 'jpg'}, 1349039304: {'path': 'temp/1743433498_79843_1349039304_f8124b629401af1a864c971c843d918c.jpg', 'extension': 'jpg'}, 1349039474: {'path': 'temp/1743433498_79843_1349039474_b05054045f2001bcd8f3d91848c3c58f.jpg', 'extension': 'jpg'}, 1349039246: {'path': 'temp/1743433498_79843_1349039246_db1a1c541e28014987605a95a7b82304.jpg', 'extension': 'jpg'}, 1349039272: {'path': 'temp/1743433498_79843_1349039272_e0d495a83abbe596284b1b6f7c86153c.jpg', 'extension': 'jpg'}, 1349039288: {'path': 'temp/1743433498_79843_1349039288_2dfa874e96e0c0372ef33c56c927a928.jpg', 'extension': 'jpg'}, 1349038527: {'path': 'temp/1743433498_79843_1349038527_77b0898dfb11e6cc046562171bf98562.jpg', 'extension': 'jpg'}, 1349038561: {'path': 'temp/1743433498_79843_1349038561_3d09f02d8f80a9a75d52cca65a61806c.jpg', 'extension': 'jpg'}, 1349038590: {'path': 'temp/1743433498_79843_1349038590_6ba3fc25e72a025e395bb8ec7eabf895.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 = 21915815; (('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 = 21915815 group by h (('17', 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=21915815 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 (21915815) 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 (21915815) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 31032025 21915815 Nombre de photos uploadées : 11 / 23040 (0%) 31032025 21915815 Nombre de photos taguées (types de déchets): 0 / 11 (0%) 31032025 21915815 Nombre de photos taguées (volume) : 0 / 11 (0%) [{'photo_id': 1349038590, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/6ba3fc25e72a025e395bb8ec7eabf895.jpg', 'username': None, 'uploaded_at': 1743433267, 'text': 'image_31032025_17_00_04_010144m0.jpg 1e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1349038561, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/3d09f02d8f80a9a75d52cca65a61806c.jpg', 'username': None, 'uploaded_at': 1743433267, 'text': 'image_31032025_17_00_24_010136m0.jpg 2e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1349038527, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/77b0898dfb11e6cc046562171bf98562.jpg', 'username': None, 'uploaded_at': 1743433267, 'text': 'image_31032025_17_00_43_010135m0.jpg 3.0000000000000004e-05 for time 1, id_amount 3 this amount prod time diff : 1e-05'}, {'photo_id': 1349039304, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/31/f8124b629401af1a864c971c843d918c.jpg', 'username': None, 'uploaded_at': 1743433327, 'text': 'image_31032025_17_00_53_10135.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.814697265625e-06 elapsed_time : order_list_meta_photo_and_scores 1.0013580322265625e-05 ??????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006313323974609375 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21915815, '2025-03-31' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1702716,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02524590492248535 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= 1702716 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711814, 'mtr_portfolio_id': 21913884, 'dashboard_result_id': 9762949, '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_P21913884_31-03-2025_16_33_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21913888, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21913889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21913890, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21913891, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21913892, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21913893, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21913894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21913895, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21913896, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21913897, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21913898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21913899, 'pht': 3726}}"}, {'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711814, 'mtr_portfolio_id': 21914431, 'dashboard_result_id': 9762950, '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_P21914431_31-03-2025_16_47_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21914461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21914462, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21914463, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21914464, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21914465, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21914466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21914467, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21914468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21914469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21914470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21914471, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21914472, 'pht': 3726}}"}, {'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711814, 'mtr_portfolio_id': 21915225, 'dashboard_result_id': 9762951, '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_P21915225_31-03-2025_17_03_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21915230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915233, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915237, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915238, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915239, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915240, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915241, 'pht': 3726}}"}, {'dashboat_entry_day': 1702716, 'dashboard_run_id': 1711814, 'mtr_portfolio_id': 21915815, 'dashboard_result_id': 9762952, '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 = 21913884 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': 2709590, 'mtr_portfolio_id': 21913884, 'created_at': datetime.datetime(2025, 3, 31, 16, 33, 1), 'result': '0.035654363824717386', 'result_long': None, 'result_double': None}] Qualite : 0.035654363824717386 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21913884 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21913884_31-03-2025_16_33_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21913884 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_P21913884_31-03-2025_16_33_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21913888, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21913889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21913890, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21913891, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21913892, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21913893, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21913894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21913895, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21913896, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21913897, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21913898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21913899, 'pht': 3726}}" where mtr_portfolio_id = 21913884 and dashboard_run_id = 1711814 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`=21913884 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9762949, 0.035654363824717386, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21913884_31-03-2025_16_33_02.pdf', 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21913888, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21913889, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21913890, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21913891, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21913892, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21913893, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21913894, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21913895, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21913896, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21913897, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21913898, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21913899, '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 = 21914431 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': 2709654, 'mtr_portfolio_id': 21914431, 'created_at': datetime.datetime(2025, 3, 31, 16, 47), 'result': '0.03604852935870458', 'result_long': None, 'result_double': None}] Qualite : 0.03604852935870458 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21914431 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21914431_31-03-2025_16_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21914431 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_P21914431_31-03-2025_16_47_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21914461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21914462, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21914463, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21914464, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21914465, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21914466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21914467, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21914468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21914469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21914470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21914471, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21914472, 'pht': 3726}}" where mtr_portfolio_id = 21914431 and dashboard_run_id = 1711814 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`=21914431 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9762950, 0.03604852935870458, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21914431_31-03-2025_16_47_01.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21914461, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21914462, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21914463, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21914464, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21914465, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21914466, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21914467, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21914468, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21914469, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21914470, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21914471, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21914472, '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 = 21915225 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': 2709710, 'mtr_portfolio_id': 21915225, 'created_at': datetime.datetime(2025, 3, 31, 17, 3, 1), 'result': '0.03260065306735251', 'result_long': None, 'result_double': None}] Qualite : 0.03260065306735251 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21915225 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915225_31-03-2025_17_03_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21915225 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_P21915225_31-03-2025_17_03_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21915230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915233, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915237, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915238, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915239, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915240, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915241, 'pht': 3726}}" where mtr_portfolio_id = 21915225 and dashboard_run_id = 1711814 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`=21915225 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9762951, 0.03260065306735251, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915225_31-03-2025_17_03_02.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 21915230, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915231, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915232, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915233, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915234, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915235, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915236, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915237, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915238, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915239, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915240, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915241, '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 = 21915815 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': 2709773, 'mtr_portfolio_id': 21915815, 'created_at': datetime.datetime(2025, 3, 31, 17, 4, 58), 'result': '0.026120691642851357', 'result_long': None, 'result_double': None}] Qualite : 0.026120691642851357 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21915815 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915815_31-03-2025_17_04_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21915815 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_P21915815_31-03-2025_17_04_59.pdf'}" where mtr_portfolio_id = 21915815 and dashboard_run_id = 1711814 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`=21915815 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9762952, 0.026120691642851357, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21915815_31-03-2025_17_04_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21915818, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21915819, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21915820, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21915821, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21915822, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21915823, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21915824, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21915825, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21915826, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21915827, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21915828, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21915829, '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 (21913884,21914431,21915225,21915815) result : ((1349029298,), (1349029301,), (1349029382,), (1349029389,), (1349029433,), (1349029439,), (1349029448,), (1349029455,), (1349029470,), (1349029499,), (1349029611,), (1349029613,), (1349029618,), (1349029622,), (1349029631,), (1349030427,), (1349030430,), (1349030434,), (1349030439,), (1349030629,), (1349030720,), (1349030754,), (1349030758,), (1349030785,), (1349030846,), (1349031018,), (1349031194,), (1349031198,), (1349031204,), (1349031247,), (1349031253,), (1349031262,), (1349031281,), (1349031286,), (1349031320,), (1349031322,), (1349031327,), (1349031331,), (1349031337,), (1349031374,), (1349031378,), (1349031392,), (1349031399,), (1349031406,), (1349031547,), (1349031501,), (1349031505,), (1349031543,), (1349031666,), (1349031684,), (1349031692,), (1349031720,), (1349031727,), (1349031877,), (1349031883,), (1349031887,), (1349031897,), (1349031921,), (1349032055,), (1349032129,), (1349032167,), (1349032175,), (1349032282,), (1349032286,), (1349032290,), (1349032319,), (1349032468,), (1349032527,), (1349032556,), (1349032582,), (1349032610,), (1349032622,), (1349032712,), (1349032772,), (1349032791,), (1349032802,), (1349032889,), (1349032925,), (1349032959,), (1349032982,), (1349033071,), (1349033075,), (1349033330,), (1349033334,), (1349033339,), (1349033460,), (1349033463,), (1349033466,), (1349033469,), (1349033473,), (1349033491,), (1349033526,), (1349033529,), (1349033533,), (1349033537,), (1349033645,), (1349033729,), (1349033769,), (1349033807,), (1349034186,), (1349034223,), (1349034267,), (1349034307,), (1349034419,), (1349034443,), (1349034464,), (1349034468,), (1349034495,), (1349034673,), (1349034657,), (1349034660,), (1349034723,), (1349034725,), (1349034854,), (1349034922,), (1349034927,), (1349034930,), (1349034936,), (1349035034,), (1349035038,), (1349035048,), (1349035049,), (1349035084,), (1349035177,), (1349035180,), (1349035183,), (1349035186,), (1349035189,), (1349035294,), (1349035329,), (1349035414,), (1349036122,), (1349036126,), (1349036134,), (1349036139,), (1349036144,), (1349036150,), (1349036236,), (1349036238,), (1349036252,), (1349036256,), (1349036340,), (1349036346,), (1349036350,), (1349036352,), (1349036357,), (1349036496,), (1349036497,), (1349036498,), (1349036499,), (1349036503,), (1349036508,), (1349036527,), (1349036530,), (1349036535,), (1349036540,), (1349036546,), (1349036548,), (1349036553,), (1349036616,), (1349036627,), (1349036631,), (1349036636,), (1349036696,), (1349036699,), (1349036702,), (1349036704,), (1349036707,), (1349036710,), (1349037690,), (1349037744,), (1349037804,), (1349037892,), (1349037946,), (1349038071,), (1349038128,), (1349038182,), (1349038247,), (1349038617,), (1349038527,), (1349038561,), (1349038590,), (1349039246,), (1349039272,), (1349039288,), (1349039296,), (1349039304,), (1349039474,), (1349039502,), (1349039542,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'31032025': {'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([21915815]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] map_info['map_portfolio_photo'] : {21915815: [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527]} final : True mtd_id 4302 list_pids : [1349039542, 1349039502, 1349039474, 1349039304, 1349039296, 1349039288, 1349039272, 1349039246, 1349038590, 1349038561, 1349038527] Looping around the photos to save general results len do output : 1 /21915815Didn'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, '2709773') ('4302', '21915815', '1349039542', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039502', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039474', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039304', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039296', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039288', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039272', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349039246', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038590', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038561', None, None, None, None, None, '2709773') ('4302', None, None, None, None, None, None, None, '2709773') ('4302', '21915815', '1349038527', None, None, None, None, None, '2709773') 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, '21915815', 'None', None, None, None, None, '2709773'), ('4302', '21915815', '1349039542', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039502', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039474', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039304', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039296', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039288', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039272', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349039246', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038590', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038561', None, None, None, None, None, '2709773'), ('4302', '21915815', '1349038527', None, None, None, None, None, '2709773')] time used for this insertion : 0.014060497283935547 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.41354799270629883 time spend to save output : 0.014342069625854492 total time spend for step 5 : 0.4278900623321533 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 (2709773) 2.31user 2.18system 0:07.02elapsed 64%CPU (0avgtext+0avgdata 158412maxresident)k 776inputs+7112outputs (10major+74941minor)pagefaults 0swaps