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 : 1849227 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 (3230051) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3230051) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525652 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3230051'] with mtr_portfolio_ids : ['24525652'] and first list_photo_ids : [] new path : /proc/1849227/ Name: python3 Umask: 0002 State: R (running) Tgid: 1849227 Ngid: 0 Pid: 1849227 PPid: 1849226 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1849227 NSpid: 1849227 NSpgid: 1848310 NSsid: 1848310 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99032 kB VmRSS: 99032 kB RssAnon: 59816 kB RssFile: 39216 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 9/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 46 nonvoluntary_ctxt_switches: 25 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1849227', 'Ngid': '0', 'Pid': '1849227', 'PPid': '1849226', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1849227', 'NSpid': '1849227', 'NSpgid': '1848310', 'NSsid': '1848310', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99032 kB', 'VmRSS': '99032 kB', 'RssAnon': '59816 kB', 'RssFile': '39216 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '9/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '46', 'nonvoluntary_ctxt_switches': '25'} ('datou_batch_current', '1849227', '1106868', '0', '1106868', '865620', '99032', b'', 'marlene', '3230051') 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 (24525652) 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 (3230051 ) ) 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 (24525652) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1370098193, 'portfolio_id': 24525652}, {'photo_id': 1370098147, 'portfolio_id': 24525652}, {'photo_id': 1370098094, 'portfolio_id': 24525652}, {'photo_id': 1370098075, 'portfolio_id': 24525652}, {'photo_id': 1370098065, 'portfolio_id': 24525652}, {'photo_id': 1370098058, 'portfolio_id': 24525652}, {'photo_id': 1370097902, 'portfolio_id': 24525652}, {'photo_id': 1370097871, 'portfolio_id': 24525652}, {'photo_id': 1370097824, 'portfolio_id': 24525652}, {'photo_id': 1370097760, 'portfolio_id': 24525652}, {'photo_id': 1370097711, 'portfolio_id': 24525652}, {'photo_id': 1370097647, 'portfolio_id': 24525652}] map_portfolio_id_photo_id: {24525652: [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647]} ##### 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.019721031188964844 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Jul 2 21:18:55 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 (24525652) 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 : 24525652 get user id for portfolio 24525652 get sub ptf for main ptf 24525652, type 3726 and hashtags ['metal', 'flou', 'kraft', 'environnement', 'Teint_Dans_La_Masse', 'plastique', 'Carton_brun', 'Carton_gris', 'autre_refus', 'papier', 'mal_croppe', 'cartonnette'] 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`=24525652 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) 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`=24525652 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_21_15_04_010137_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_3726_cartonnette_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)[[24525652, 24525689, 3726, 0.5, 492628673, 979], [24525652, 24525690, 3726, 0.5, 492777938, 979], [24525652, 24525691, 3726, 0.5, 493202403, 979], [24525652, 24525692, 3726, 0.5, 493012381, 979], [24525652, 24525693, 3726, 0.5, 2107752385, 979], [24525652, 24525694, 3726, 0.5, 492725882, 979], [24525652, 24525695, 3726, 0.5, 2107753024, 979], [24525652, 24525696, 3726, 0.5, 2107753020, 979], [24525652, 24525697, 3726, 0.5, 2107752406, 979], [24525652, 24525698, 3726, 0.5, 492668766, 979], [24525652, 24525699, 3726, 0.5, 2107755527, 979], [24525652, 24525700, 3726, 0.5, 702398920, 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`=24525652 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) 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`=24525652 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 24525652, 'sub_port_id': 24525689, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460498, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'flou': {'main_port_id': 24525652, 'sub_port_id': 24525690, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460499, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'kraft': {'main_port_id': 24525652, 'sub_port_id': 24525691, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460500, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'environnement': {'main_port_id': 24525652, 'sub_port_id': 24525692, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460501, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'Teint_Dans_La_Masse': {'main_port_id': 24525652, 'sub_port_id': 24525693, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460502, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'plastique': {'main_port_id': 24525652, 'sub_port_id': 24525694, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460503, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'Carton_brun': {'main_port_id': 24525652, 'sub_port_id': 24525695, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460504, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'Carton_gris': {'main_port_id': 24525652, 'sub_port_id': 24525696, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460505, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'autre_refus': {'main_port_id': 24525652, 'sub_port_id': 24525697, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460506, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'papier': {'main_port_id': 24525652, 'sub_port_id': 24525698, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460507, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'mal_croppe': {'main_port_id': 24525652, 'sub_port_id': 24525699, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460508, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}, 'cartonnette': {'main_port_id': 24525652, 'sub_port_id': 24525700, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460509, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 56), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 56)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24525689 , 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=24525652 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 (24525689) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525690 , 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=24525652 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 (24525690) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525691 , 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=24525652 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 (24525691) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525692 , 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=24525652 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 (24525692) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525693 , 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=24525652 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 (24525693) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525694 , 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=24525652 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 (24525694) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525695 , 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=24525652 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 (24525695) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525696 , 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=24525652 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 (24525696) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525697 , 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=24525652 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 (24525697) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525698 , 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=24525652 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 (24525698) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525699 , 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=24525652 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 (24525699) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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 24525700 , 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=24525652 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 (24525700) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24525652) result : ((1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) 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`=24525652 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) 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`=24525652 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_21_15_04_010137_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_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__02072025_21_15_04_010137_4417_cartonnette_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)[[24525652, 24525701, 4417, 0.5, 492628673, 979], [24525652, 24525702, 4417, 0.5, 492777938, 979], [24525652, 24525703, 4417, 0.5, 493202403, 979], [24525652, 24525704, 4417, 0.5, 493012381, 979], [24525652, 24525705, 4417, 0.5, 2107752385, 979], [24525652, 24525706, 4417, 0.5, 492725882, 979], [24525652, 24525707, 4417, 0.5, 2107753024, 979], [24525652, 24525708, 4417, 0.5, 2107753020, 979], [24525652, 24525709, 4417, 0.5, 2107752406, 979], [24525652, 24525710, 4417, 0.5, 492668766, 979], [24525652, 24525711, 4417, 0.5, 2107755527, 979], [24525652, 24525712, 4417, 0.5, 702398920, 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`=24525652 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) 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`=24525652 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('metal','flou','kraft','environnement','Teint_Dans_La_Masse','plastique','Carton_brun','Carton_gris','autre_refus','papier','mal_croppe','cartonnette')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 24525652, 'sub_port_id': 24525701, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460510, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'flou': {'main_port_id': 24525652, 'sub_port_id': 24525702, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460511, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'kraft': {'main_port_id': 24525652, 'sub_port_id': 24525703, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460512, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'environnement': {'main_port_id': 24525652, 'sub_port_id': 24525704, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460513, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 24525652, 'sub_port_id': 24525705, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460514, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'plastique': {'main_port_id': 24525652, 'sub_port_id': 24525706, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460515, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'Carton_brun': {'main_port_id': 24525652, 'sub_port_id': 24525707, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460516, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'Carton_gris': {'main_port_id': 24525652, 'sub_port_id': 24525708, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460517, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'autre_refus': {'main_port_id': 24525652, 'sub_port_id': 24525709, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460518, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'papier': {'main_port_id': 24525652, 'sub_port_id': 24525710, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460519, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'mal_croppe': {'main_port_id': 24525652, 'sub_port_id': 24525711, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460520, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}, 'cartonnette': {'main_port_id': 24525652, 'sub_port_id': 24525712, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16460521, 'last_updated_at': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 21, 18, 57), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 21, 18, 57)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525701,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525689 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525702,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525690 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525703,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525691 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525704,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525692 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525705,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525693 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525706,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525694 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525707,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525695 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525708,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525696 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525709,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525697 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525710,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525698 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525711,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525699 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24525712,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24525700 lien utilise dans velours : https://www.fotonower.com/velours/24525701,24525702,24525703,24525704,24525705,24525706,24525707,24525708,24525709,24525710,24525711,24525712?tags=metal,flou,kraft,environnement,Teint_Dans_La_Masse,plastique,Carton_brun,Carton_gris,autre_refus,papier,mal_croppe,cartonnette After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24525652]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] map_info['map_portfolio_photo'] : {24525652: [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647]} final : False mtd_id 4302 list_pids : [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] Looping around the photos to save general results len do output : 1 /24525652. 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, '3230051') ('4302', '24525652', '1370098193', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098147', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098094', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098075', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098065', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098058', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097902', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097871', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097824', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097760', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097711', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097647', None, None, None, None, None, '3230051') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24525652', "{'metal': 24525689, 'flou': 24525690, 'kraft': 24525691, 'environnement': 24525692, 'Teint_Dans_La_Masse': 24525693, 'plastique': 24525694, 'Carton_brun': 24525695, 'Carton_gris': 24525696, 'autre_refus': 24525697, 'papier': 24525698, 'mal_croppe': 24525699, 'cartonnette': 24525700}", None, None, None, None, '3230051'), ('4302', '24525652', '1370098193', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098147', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098094', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098075', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098065', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098058', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097902', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097871', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097824', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097760', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097711', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097647', None, None, None, None, None, '3230051')] time used for this insertion : 0.01763319969177246 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.135226011276245 time spend to save output : 0.017976760864257812 total time spend for step 1 : 2.153202772140503 step2:final Wed Jul 2 21:18: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 (24525652) 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 24525652 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1370097902,1370097871,1370097824,1370097760,1370097711,1370097647,1370098193,1370098147,1370098094,1370098075,1370098065,1370098058); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24525652]) Inside saveOutput : final : False verbose : True original output for save of step final : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} new output for save of step final : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] map_info['map_portfolio_photo'] : {24525652: [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647]} final : False mtd_id 4302 list_pids : [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] Looping around the photos to save general results len do output : 12 /1370098193.Didn't retrieve data . /1370098147.Didn't retrieve data . /1370098094.Didn't retrieve data . /1370098075.Didn't retrieve data . /1370098065.Didn't retrieve data . /1370098058.Didn't retrieve data . /1370097902.Didn't retrieve data . /1370097871.Didn't retrieve data . /1370097824.Didn't retrieve data . /1370097760.Didn't retrieve data . /1370097711.Didn't retrieve data . /1370097647.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, '3230051') ('4302', '24525652', '1370098193', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098147', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098094', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098075', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098065', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098058', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097902', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097871', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097824', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097760', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097711', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097647', None, None, None, None, None, '3230051') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '24525652', '1370098193', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370098147', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370098094', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370098075', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370098065', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370098058', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370097902', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370097871', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370097824', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370097760', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370097711', '0.0', None, None, None, None, '3230051'), ('4302', '24525652', '1370097647', '0.0', None, None, None, None, '3230051')] time used for this insertion : 0.018454551696777344 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.01381540298461914 time spend to save output : 0.019072532653808594 total time spend for step 2 : 0.032887935638427734 step3:velours_tree Wed Jul 2 21:18: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 : {24525652: [{'metal': 24525689, 'flou': 24525690, 'kraft': 24525691, 'environnement': 24525692, 'Teint_Dans_La_Masse': 24525693, 'plastique': 24525694, 'Carton_brun': 24525695, 'Carton_gris': 24525696, 'autre_refus': 24525697, 'papier': 24525698, 'mal_croppe': 24525699, 'cartonnette': 24525700}]} input_args_next_step : {24525652: ()} output_args : {24525652: [{'metal': 24525689, 'flou': 24525690, 'kraft': 24525691, 'environnement': 24525692, 'Teint_Dans_La_Masse': 24525693, 'plastique': 24525694, 'Carton_brun': 24525695, 'Carton_gris': 24525696, 'autre_refus': 24525697, 'papier': 24525698, 'mal_croppe': 24525699, 'cartonnette': 24525700}]} args : 24525652 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'metal': 24525689, 'flou': 24525690, 'kraft': 24525691, 'environnement': 24525692, 'Teint_Dans_La_Masse': 24525693, 'plastique': 24525694, 'Carton_brun': 24525695, 'Carton_gris': 24525696, 'autre_refus': 24525697, 'papier': 24525698, 'mal_croppe': 24525699, 'cartonnette': 24525700},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24525652) 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([24525652]) 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.3222064971923828 time spend to save output : 4.3392181396484375e-05 total time spend for step 3 : 0.3222498893737793 step4:send_mail_cod Wed Jul 2 21:18: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 : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} input_args_next_step : {1370098193: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370098193 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370098147 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370098094 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370098075 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370098065 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370098058 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370097902 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370097871 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370097824 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370097760 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370097711 depend.output_id : 0 input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ()} output_args : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',)} args : 1370097647 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 : {24525652: [{'metal': 24525689, 'flou': 24525690, 'kraft': 24525691, 'environnement': 24525692, 'Teint_Dans_La_Masse': 24525693, 'plastique': 24525694, 'Carton_brun': 24525695, 'Carton_gris': 24525696, 'autre_refus': 24525697, 'papier': 24525698, 'mal_croppe': 24525699, 'cartonnette': 24525700}]} input_args_next_step : {1370098193: ('0.0',), 1370098147: ('0.0',), 1370098094: ('0.0',), 1370098075: ('0.0',), 1370098065: ('0.0',), 1370098058: ('0.0',), 1370097902: ('0.0',), 1370097871: ('0.0',), 1370097824: ('0.0',), 1370097760: ('0.0',), 1370097711: ('0.0',), 1370097647: ('0.0',), 24525652: ()} output_args : {24525652: [{'metal': 24525689, 'flou': 24525690, 'kraft': 24525691, 'environnement': 24525692, 'Teint_Dans_La_Masse': 24525693, 'plastique': 24525694, 'Carton_brun': 24525695, 'Carton_gris': 24525696, 'autre_refus': 24525697, 'papier': 24525698, 'mal_croppe': 24525699, 'cartonnette': 24525700}]} args : 24525652 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24525652) 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 (1370098193,1370098147,1370098094,1370098075,1370098065,1370098058,1370097902,1370097871,1370097824,1370097760,1370097711,1370097647) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1370097647 begin to download photo : 1370097824 begin to download photo : 1370098058 begin to download photo : 1370098094 download finish for photo 1370098094 begin to download photo : 1370098147 download finish for photo 1370097647 begin to download photo : 1370097711 download finish for photo 1370097824 begin to download photo : 1370097871 download finish for photo 1370098058 begin to download photo : 1370098065 download finish for photo 1370097711 begin to download photo : 1370097760 download finish for photo 1370098147 begin to download photo : 1370098193 download finish for photo 1370098065 begin to download photo : 1370098075 download finish for photo 1370097871 begin to download photo : 1370097902 download finish for photo 1370097760 download finish for photo 1370098075 download finish for photo 1370098193 download finish for photo 1370097902 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette245256891751483938/ imagette245256901751483938/ imagette245256911751483938/ imagette245256941751483938/ imagette245256971751483938/ imagette245256991751483938/ imagette245257001751483938/ imagette245256931751483938/ imagette245256951751483938/ imagette245256961751483938/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P24525652_02-07-2025_21_18_58.pdf 24525689 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=24525689 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256891751483938 24525690 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=24525690 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256901751483938 24525691 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=24525691 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256911751483938 24525694 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=24525694 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256941751483938 24525697 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=24525697 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256971751483938 24525699 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=24525699 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256991751483938 24525700 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=24525700 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245257001751483938 24525693 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=24525693 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256931751483938 24525695 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=24525695 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256951751483938 24525696 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=24525696 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245256961751483938 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24525652 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24525701,24525702,24525703,24525704,24525705,24525706,24525707,24525708,24525709,24525710,24525711,24525712?tags=metal,flou,kraft,environnement,Teint_Dans_La_Masse,plastique,Carton_brun,Carton_gris,autre_refus,papier,mal_croppe,cartonnette your option no_mail is active, we will not send the real mail to your client args[1370098193] : ('0.0',) no score found for photo 1370098193 We are sending mail with results at report@fotonower.com args[1370098147] : ('0.0',) no score found for photo 1370098147 We are sending mail with results at report@fotonower.com args[1370098094] : ('0.0',) no score found for photo 1370098094 We are sending mail with results at report@fotonower.com args[1370098075] : ('0.0',) no score found for photo 1370098075 We are sending mail with results at report@fotonower.com args[1370098065] : ('0.0',) no score found for photo 1370098065 We are sending mail with results at report@fotonower.com args[1370098058] : ('0.0',) no score found for photo 1370098058 We are sending mail with results at report@fotonower.com args[1370097902] : ('0.0',) no score found for photo 1370097902 We are sending mail with results at report@fotonower.com args[1370097871] : ('0.0',) no score found for photo 1370097871 We are sending mail with results at report@fotonower.com args[1370097824] : ('0.0',) no score found for photo 1370097824 We are sending mail with results at report@fotonower.com args[1370097760] : ('0.0',) no score found for photo 1370097760 We are sending mail with results at report@fotonower.com args[1370097711] : ('0.0',) no score found for photo 1370097711 We are sending mail with results at report@fotonower.com args[1370097647] : ('0.0',) no score found for photo 1370097647 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24525652 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_P24525652_02-07-2025_21_18_58.pdf results_Auto_P24525652_02-07-2025_21_18_58.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24525652_02-07-2025_21_18_58.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','24525652','results_Auto_P24525652_02-07-2025_21_18_58.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24525652_02-07-2025_21_18_58.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24525652]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] map_info['map_portfolio_photo'] : {24525652: [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647]} final : False mtd_id 4302 list_pids : [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] 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, '3230051') ('4302', '24525652', '1370098193', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098147', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098094', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098075', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098065', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098058', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097902', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097871', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097824', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097760', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097711', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097647', None, None, None, None, None, '3230051') 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', '24525652', '1370098193', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098147', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098094', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098075', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098065', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098058', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097902', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097871', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097824', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097760', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097711', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097647', None, None, None, None, None, '3230051')] time used for this insertion : 0.015204191207885742 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6151158809661865 time spend to save output : 0.015504121780395508 total time spend for step 4 : 1.630620002746582 step5:split_time_score Wed Jul 2 21:19:00 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['24525652'] 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 : [('24525652',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24525652) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1370097647: {'path': 'temp/1751483938_1849227_1370097647_2337d12efb51d3e3db6f6458376e83e9.jpg', 'extension': 'jpg'}, 1370097711: {'path': 'temp/1751483938_1849227_1370097711_a998bff4de301b38b353594c036d2c51.jpg', 'extension': 'jpg'}, 1370097760: {'path': 'temp/1751483938_1849227_1370097760_fc8494c42656204f045552279f9bff30.jpg', 'extension': 'jpg'}, 1370098058: {'path': 'temp/1751483938_1849227_1370098058_f98e86d901ec727e82224369f7b6aabf.jpg', 'extension': 'jpg'}, 1370098065: {'path': 'temp/1751483938_1849227_1370098065_9439dd354a26879eb009def21954375c.jpg', 'extension': 'jpg'}, 1370098075: {'path': 'temp/1751483938_1849227_1370098075_bd682cd21e43c1b8ac69a95333e41df8.jpg', 'extension': 'jpg'}, 1370098094: {'path': 'temp/1751483938_1849227_1370098094_0a7cbd929c6591256b20f0988c9f6f31.jpg', 'extension': 'jpg'}, 1370098147: {'path': 'temp/1751483938_1849227_1370098147_714ec97f932f3a469d4ae76c40034b68.jpg', 'extension': 'jpg'}, 1370098193: {'path': 'temp/1751483938_1849227_1370098193_e5916dca640215ac346b252da41a4aad.jpg', 'extension': 'jpg'}, 1370097824: {'path': 'temp/1751483938_1849227_1370097824_ffc40d598b4abd49f1d8a1c7c79c849f.jpg', 'extension': 'jpg'}, 1370097871: {'path': 'temp/1751483938_1849227_1370097871_a7cb88c3f7cac87d885581399954b4fc.jpg', 'extension': 'jpg'}, 1370097902: {'path': 'temp/1751483938_1849227_1370097902_8417a089a05042489eaba66f8a591ac9.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 = 24525652; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 24525652 group by h (('21', 12),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24525652 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 (24525652) 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 (24525652) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02072025 24525652 Nombre de photos uploadées : 12 / 23040 (0%) 02072025 24525652 Nombre de photos taguées (types de déchets): 0 / 12 (0%) 02072025 24525652 Nombre de photos taguées (volume) : 0 / 12 (0%) [{'photo_id': 1370097902, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/8417a089a05042489eaba66f8a591ac9.jpg', 'username': None, 'uploaded_at': 1751483773, 'text': 'image_02072025_21_15_04_10137.jpg'}, {'photo_id': 1370097871, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/a7cb88c3f7cac87d885581399954b4fc.jpg', 'username': None, 'uploaded_at': 1751483773, 'text': 'image_02072025_21_15_13_9124.jpg'}, {'photo_id': 1370097824, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/ffc40d598b4abd49f1d8a1c7c79c849f.jpg', 'username': None, 'uploaded_at': 1751483773, 'text': 'image_02072025_21_15_23_10135.jpg'}, {'photo_id': 1370097760, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/fc8494c42656204f045552279f9bff30.jpg', 'username': None, 'uploaded_at': 1751483773, 'text': 'image_02072025_21_15_33_10134.jpg'}] 0 [] elapsed_time : load_data_split_time_score 3.0994415283203125e-06 elapsed_time : order_list_meta_photo_and_scores 8.821487426757812e-06 ???????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006155967712402344 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24525652, '2025-07-02' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1944441,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.03336381912231445 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= 1944441 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1944441, 'dashboard_run_id': 1954347, 'mtr_portfolio_id': 24523081, 'dashboard_result_id': 12073049, '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_P24523081_02-07-2025_20_47_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24523103, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24523104, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24523105, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24523106, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24523107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24523108, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24523109, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24523111, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24523112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24523113, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24523114, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24523115, 'pht': 3726}}"}, {'dashboat_entry_day': 1944441, 'dashboard_run_id': 1954347, 'mtr_portfolio_id': 24523925, 'dashboard_result_id': 12073050, '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_P24523925_02-07-2025_21_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24523950, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24523951, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24523952, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24523953, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24523954, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24523955, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24523956, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24523957, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24523958, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24523959, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24523960, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24523961, 'pht': 3726}}"}, {'dashboat_entry_day': 1944441, 'dashboard_run_id': 1954347, 'mtr_portfolio_id': 24524834, 'dashboard_result_id': 12073051, '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_P24524834_02-07-2025_21_16_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24524875, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24524876, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24524877, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24524878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24524879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24524880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24524881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24524882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24524883, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24524884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24524885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24524886, 'pht': 3726}}"}, {'dashboat_entry_day': 1944441, 'dashboard_run_id': 1954347, 'mtr_portfolio_id': 24525652, 'dashboard_result_id': 12073052, '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 = 24523081 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': 3229745, 'mtr_portfolio_id': 24523081, 'created_at': datetime.datetime(2025, 7, 2, 20, 46, 59), 'result': '0.04103468056667251', 'result_long': None, 'result_double': None}] Qualite : 0.04103468056667251 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24523081 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24523081_02-07-2025_20_47_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24523081 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_P24523081_02-07-2025_20_47_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24523103, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24523104, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24523105, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24523106, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24523107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24523108, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24523109, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24523111, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24523112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24523113, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24523114, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24523115, 'pht': 3726}}" where mtr_portfolio_id = 24523081 and dashboard_run_id = 1954347 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`=24523081 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12073049, 0.04103468056667251, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24523081_02-07-2025_20_47_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24523103, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24523104, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24523105, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24523106, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24523107, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24523108, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24523109, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24523111, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24523112, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24523113, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24523114, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24523115, '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 = 24523925 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': 3229862, 'mtr_portfolio_id': 24523925, 'created_at': datetime.datetime(2025, 7, 2, 21, 2, 59), 'result': '0.003972668189494385', 'result_long': None, 'result_double': None}] Qualite : 0.003972668189494385 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24523925 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24523925_02-07-2025_21_03_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24523925 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_P24523925_02-07-2025_21_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24523950, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24523951, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24523952, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24523953, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24523954, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24523955, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24523956, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24523957, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24523958, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24523959, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24523960, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24523961, 'pht': 3726}}" where mtr_portfolio_id = 24523925 and dashboard_run_id = 1954347 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`=24523925 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12073050, 0.003972668189494385, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24523925_02-07-2025_21_03_00.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24523950, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24523951, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24523952, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24523953, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24523954, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24523955, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24523956, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24523957, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24523958, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24523959, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24523960, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24523961, '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 = 24524834 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': 3229954, 'mtr_portfolio_id': 24524834, 'created_at': datetime.datetime(2025, 7, 2, 21, 16, 58), 'result': '0.013495589871050468', 'result_long': None, 'result_double': None}] Qualite : 0.013495589871050468 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24524834 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24524834_02-07-2025_21_16_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24524834 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_P24524834_02-07-2025_21_16_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24524875, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24524876, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24524877, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24524878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24524879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24524880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24524881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24524882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24524883, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24524884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24524885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24524886, 'pht': 3726}}" where mtr_portfolio_id = 24524834 and dashboard_run_id = 1954347 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`=24524834 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12073051, 0.013495589871050468, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24524834_02-07-2025_21_16_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24524875, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24524876, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24524877, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24524878, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24524879, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24524880, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24524881, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24524882, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24524883, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24524884, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24524885, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24524886, '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 = 24525652 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24525652 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 24525652 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24525652 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24525652 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24525652 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24525652_02-07-2025_21_18_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24525652 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_P24525652_02-07-2025_21_18_58.pdf'}" where mtr_portfolio_id = 24525652 and dashboard_run_id = 1954347 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24523081,24523925,24524834,24525652) result : ((1370073757,), (1370073791,), (1370073840,), (1370073905,), (1370073976,), (1370074083,), (1370074617,), (1370074644,), (1370074652,), (1370074656,), (1370074689,), (1370074793,), (1370074918,), (1370074935,), (1370074975,), (1370075034,), (1370075092,), (1370075145,), (1370075211,), (1370075302,), (1370075370,), (1370075454,), (1370075481,), (1370075544,), (1370075922,), (1370076041,), (1370076147,), (1370076270,), (1370076386,), (1370076468,), (1370076767,), (1370076841,), (1370076917,), (1370077011,), (1370077035,), (1370077036,), (1370077314,), (1370077377,), (1370077439,), (1370077475,), (1370077540,), (1370077630,), (1370077811,), (1370077843,), (1370077905,), (1370077963,), (1370077982,), (1370077983,), (1370077993,), (1370078025,), (1370078056,), (1370078065,), (1370078106,), (1370078143,), (1370078834,), (1370078945,), (1370079057,), (1370079128,), (1370079196,), (1370079252,), (1370079420,), (1370079460,), (1370079585,), (1370079733,), (1370079847,), (1370079904,), (1370080082,), (1370080119,), (1370080141,), (1370080146,), (1370080162,), (1370080201,), (1370080567,), (1370080577,), (1370080610,), (1370080640,), (1370080657,), (1370080685,), (1370080859,), (1370080864,), (1370080896,), (1370080902,), (1370080919,), (1370080959,), (1370081154,), (1370081187,), (1370081231,), (1370081269,), (1370081302,), (1370081333,), (1370081406,), (1370081432,), (1370081435,), (1370081436,), (1370081443,), (1370081445,), (1370081667,), (1370081669,), (1370081672,), (1370081673,), (1370081674,), (1370081675,), (1370081682,), (1370081700,), (1370081735,), (1370081775,), (1370081812,), (1370081847,), (1370081999,), (1370082003,), (1370082004,), (1370082008,), (1370082012,), (1370082020,), (1370082546,), (1370082605,), (1370082610,), (1370082634,), (1370082662,), (1370082722,), (1370083046,), (1370083100,), (1370083130,), (1370083162,), (1370083234,), (1370083352,), (1370083532,), (1370083569,), (1370083609,), (1370083644,), (1370083684,), (1370083695,), (1370084388,), (1370084460,), (1370084507,), (1370084538,), (1370084543,), (1370084546,), (1370084580,), (1370084582,), (1370084589,), (1370084622,), (1370084634,), (1370084646,), (1370084746,), (1370084800,), (1370084891,), (1370084968,), (1370085039,), (1370085081,), (1370085363,), (1370085416,), (1370085447,), (1370085500,), (1370085602,), (1370085656,), (1370086424,), (1370086510,), (1370086566,), (1370086607,), (1370086672,), (1370086757,), (1370086952,), (1370087017,), (1370087082,), (1370087135,), (1370087199,), (1370087267,), (1370087472,), (1370087511,), (1370087556,), (1370087591,), (1370087610,), (1370087630,), (1370088067,), (1370088197,), (1370088319,), (1370088443,), (1370088566,), (1370088671,), (1370089038,), (1370089131,), (1370089218,), (1370089317,), (1370089423,), (1370089813,), (1370089886,), (1370089919,), (1370089959,), (1370090029,), (1370090088,), (1370090319,), (1370090381,), (1370090423,), (1370090509,), (1370090609,), (1370090733,), (1370091235,), (1370091372,), (1370091467,), (1370091575,), (1370091670,), (1370091757,), (1370092573,), (1370092640,), (1370092740,), (1370092837,), (1370092914,), (1370092994,), (1370093186,), (1370093280,), (1370093321,), (1370093342,), (1370093390,), (1370093432,), (1370093519,), (1370093523,), (1370093532,), (1370093593,), (1370093632,), (1370093658,), (1370094298,), (1370094352,), (1370094392,), (1370094431,), (1370094497,), (1370094561,), (1370094816,), (1370094848,), (1370094887,), (1370094942,), (1370094982,), (1370094994,), (1370095056,), (1370095071,), (1370095094,), (1370095098,), (1370095114,), (1370095145,), (1370095331,), (1370095346,), (1370095348,), (1370095355,), (1370095357,), (1370095360,), (1370096193,), (1370096211,), (1370096219,), (1370096236,), (1370096288,), (1370096296,), (1370096327,), (1370096344,), (1370096346,), (1370096368,), (1370096401,), (1370096437,), (1370096610,), (1370096612,), (1370096619,), (1370096621,), (1370096624,), (1370096626,), (1370096922,), (1370096961,), (1370096993,), (1370097033,), (1370097076,), (1370097113,), (1370097235,), (1370097266,), (1370097328,), (1370097368,), (1370097404,), (1370097499,), (1370097647,), (1370097711,), (1370097760,), (1370097824,), (1370097871,), (1370097902,), (1370098058,), (1370098065,), (1370098075,), (1370098094,), (1370098147,), (1370098193,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02072025': {'nb_upload': 12, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24525652]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] map_info['map_portfolio_photo'] : {24525652: [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647]} final : True mtd_id 4302 list_pids : [1370098193, 1370098147, 1370098094, 1370098075, 1370098065, 1370098058, 1370097902, 1370097871, 1370097824, 1370097760, 1370097711, 1370097647] Looping around the photos to save general results len do output : 1 /24525652Didn'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, '3230051') ('4302', '24525652', '1370098193', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098147', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098094', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098075', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098065', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370098058', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097902', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097871', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097824', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097760', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097711', None, None, None, None, None, '3230051') ('4302', None, None, None, None, None, None, None, '3230051') ('4302', '24525652', '1370097647', None, None, None, None, None, '3230051') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24525652', 'None', None, None, None, None, '3230051'), ('4302', '24525652', '1370098193', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098147', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098094', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098075', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098065', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370098058', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097902', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097871', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097824', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097760', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097711', None, None, None, None, None, '3230051'), ('4302', '24525652', '1370097647', None, None, None, None, None, '3230051')] time used for this insertion : 0.024585247039794922 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.32569432258605957 time spend to save output : 0.024848461151123047 total time spend for step 5 : 0.3505427837371826 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 (3230051) 2.19user 2.32system 0:05.93elapsed 76%CPU (0avgtext+0avgdata 160472maxresident)k 1464inputs+7944outputs (24major+78152minor)pagefaults 0swaps