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 : 149825 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 (2751774) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2751774) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330414 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2751774'] with mtr_portfolio_ids : ['22330414'] and first list_photo_ids : [] new path : /proc/149825/ Name: python3 Umask: 0002 State: R (running) Tgid: 149825 Ngid: 0 Pid: 149825 PPid: 149824 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 149825 NSpid: 149825 NSpgid: 143895 NSsid: 143895 VmPeak: 1106936 kB VmSize: 1106936 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97732 kB VmRSS: 97732 kB RssAnon: 59764 kB RssFile: 37968 kB RssShmem: 0 kB VmData: 865684 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 608 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 48 nonvoluntary_ctxt_switches: 93 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '149825', 'Ngid': '0', 'Pid': '149825', 'PPid': '149824', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '149825', 'NSpid': '149825', 'NSpgid': '143895', 'NSsid': '143895', 'VmPeak': '1106936 kB', 'VmSize': '1106936 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97732 kB', 'VmRSS': '97732 kB', 'RssAnon': '59764 kB', 'RssFile': '37968 kB', 'RssShmem': '0 kB', 'VmData': '865684 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '608 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '48', 'nonvoluntary_ctxt_switches': '93'} ('datou_batch_current', '149825', '1106936', '0', '1106936', '865684', '97732', b'', 'marlene', '2751774') 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 (22330414) 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 (2751774 ) ) 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 (22330414) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1352934603, 'portfolio_id': 22330414}, {'photo_id': 1352934601, 'portfolio_id': 22330414}, {'photo_id': 1352934599, 'portfolio_id': 22330414}, {'photo_id': 1352934596, 'portfolio_id': 22330414}, {'photo_id': 1352934554, 'portfolio_id': 22330414}, {'photo_id': 1352934551, 'portfolio_id': 22330414}, {'photo_id': 1352934547, 'portfolio_id': 22330414}, {'photo_id': 1352934543, 'portfolio_id': 22330414}, {'photo_id': 1352934538, 'portfolio_id': 22330414}, {'photo_id': 1352934532, 'portfolio_id': 22330414}, {'photo_id': 1352934456, 'portfolio_id': 22330414}, {'photo_id': 1352934455, 'portfolio_id': 22330414}, {'photo_id': 1352934452, 'portfolio_id': 22330414}, {'photo_id': 1352934446, 'portfolio_id': 22330414}] map_portfolio_id_photo_id: {22330414: [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446]} ##### 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.015142440795898438 #### 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 Apr 23 07:34:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22330414) 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 : 22330414 get user id for portfolio 22330414 get sub ptf for main ptf 22330414, type 3726 and hashtags ['flou', 'cartonnette', 'plastique', 'mal_croppe', 'autre_refus', 'Carton_gris', 'Carton_brun', 'Teint_Dans_La_Masse', 'papier', 'metal', 'environnement', 'kraft'] 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`=22330414 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) 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`=22330414 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23042025_07_30_14_10133_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__23042025_07_30_14_10133_3726_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_3726_kraft_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)[[22330414, 22330454, 3726, 0.5, 492777938, 979], [22330414, 22330455, 3726, 0.5, 702398920, 979], [22330414, 22330456, 3726, 0.5, 492725882, 979], [22330414, 22330457, 3726, 0.5, 2107755527, 979], [22330414, 22330458, 3726, 0.5, 2107752406, 979], [22330414, 22330459, 3726, 0.5, 2107753020, 979], [22330414, 22330460, 3726, 0.5, 2107753024, 979], [22330414, 22330461, 3726, 0.5, 2107752385, 979], [22330414, 22330462, 3726, 0.5, 492668766, 979], [22330414, 22330463, 3726, 0.5, 492628673, 979], [22330414, 22330464, 3726, 0.5, 493012381, 979], [22330414, 22330465, 3726, 0.5, 493202403, 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`=22330414 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) 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`=22330414 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 22330414, 'sub_port_id': 22330454, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788362, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'cartonnette': {'main_port_id': 22330414, 'sub_port_id': 22330455, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788363, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'plastique': {'main_port_id': 22330414, 'sub_port_id': 22330456, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788364, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'mal_croppe': {'main_port_id': 22330414, 'sub_port_id': 22330457, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788365, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'autre_refus': {'main_port_id': 22330414, 'sub_port_id': 22330458, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788366, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'Carton_gris': {'main_port_id': 22330414, 'sub_port_id': 22330459, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788367, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'Carton_brun': {'main_port_id': 22330414, 'sub_port_id': 22330460, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788368, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'Teint_Dans_La_Masse': {'main_port_id': 22330414, 'sub_port_id': 22330461, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788369, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'papier': {'main_port_id': 22330414, 'sub_port_id': 22330462, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788370, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'metal': {'main_port_id': 22330414, 'sub_port_id': 22330463, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788371, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'environnement': {'main_port_id': 22330414, 'sub_port_id': 22330464, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788372, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}, 'kraft': {'main_port_id': 22330414, 'sub_port_id': 22330465, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788373, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 34, 59), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 34, 59)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 22330454 , 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=22330414 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 (22330454) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330455 , 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=22330414 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 (22330455) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330456 , 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=22330414 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 (22330456) result : ((1352934790,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330457 , 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=22330414 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 (22330457) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330458 , 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=22330414 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 (22330458) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330459 , 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=22330414 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 (22330459) result : ((1352934786,), (1352934787,), (1352934788,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330460 , 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=22330414 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 (22330460) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330461 , 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=22330414 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 (22330461) result : ((1352934784,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330462 , 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=22330414 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 (22330462) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330463 , 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=22330414 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 (22330463) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330464 , 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=22330414 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 (22330464) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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 22330465 , 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=22330414 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 (22330465) result : ((1352934800,), (1352934801,)) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22330414) result : ((1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) 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`=22330414 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) 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`=22330414 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23042025_07_30_14_10133_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__23042025_07_30_14_10133_4417_cartonnette_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_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__23042025_07_30_14_10133_4417_kraft_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)[[22330414, 22330466, 4417, 0.5, 492777938, 979], [22330414, 22330467, 4417, 0.5, 702398920, 979], [22330414, 22330468, 4417, 0.5, 492725882, 979], [22330414, 22330469, 4417, 0.5, 2107755527, 979], [22330414, 22330470, 4417, 0.5, 2107752406, 979], [22330414, 22330471, 4417, 0.5, 2107753020, 979], [22330414, 22330472, 4417, 0.5, 2107753024, 979], [22330414, 22330473, 4417, 0.5, 2107752385, 979], [22330414, 22330474, 4417, 0.5, 492668766, 979], [22330414, 22330475, 4417, 0.5, 492628673, 979], [22330414, 22330476, 4417, 0.5, 493012381, 979], [22330414, 22330477, 4417, 0.5, 493202403, 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`=22330414 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) 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`=22330414 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('flou','cartonnette','plastique','mal_croppe','autre_refus','Carton_gris','Carton_brun','Teint_Dans_La_Masse','papier','metal','environnement','kraft')) AND mptpi.`min_score`=0.5 To do returned map {'flou': {'main_port_id': 22330414, 'sub_port_id': 22330466, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788374, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'cartonnette': {'main_port_id': 22330414, 'sub_port_id': 22330467, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788375, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'plastique': {'main_port_id': 22330414, 'sub_port_id': 22330468, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788376, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'mal_croppe': {'main_port_id': 22330414, 'sub_port_id': 22330469, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788377, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'autre_refus': {'main_port_id': 22330414, 'sub_port_id': 22330470, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788378, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'Carton_gris': {'main_port_id': 22330414, 'sub_port_id': 22330471, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788379, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'Carton_brun': {'main_port_id': 22330414, 'sub_port_id': 22330472, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788380, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'Teint_Dans_La_Masse': {'main_port_id': 22330414, 'sub_port_id': 22330473, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788381, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'papier': {'main_port_id': 22330414, 'sub_port_id': 22330474, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788382, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'metal': {'main_port_id': 22330414, 'sub_port_id': 22330475, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788383, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'environnement': {'main_port_id': 22330414, 'sub_port_id': 22330476, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788384, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}, 'kraft': {'main_port_id': 22330414, 'sub_port_id': 22330477, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14788385, 'last_updated_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_desc': datetime.datetime(2025, 4, 23, 7, 35, 1), 'last_updated_at_asc': datetime.datetime(2025, 4, 23, 7, 35, 1)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330466,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330454 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330467,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330455 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330468,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330456 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330469,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330457 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330470,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330458 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330471,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330459 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330472,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330460 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330473,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330461 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330474,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330462 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330475,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330463 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330476,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330464 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 22330477,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 22330465 lien utilise dans velours : https://www.fotonower.com/velours/22330466,22330467,22330468,22330469,22330470,22330471,22330472,22330473,22330474,22330475,22330476,22330477?tags=flou,cartonnette,plastique,mal_croppe,autre_refus,Carton_gris,Carton_brun,Teint_Dans_La_Masse,papier,metal,environnement,kraft After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22330414]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] map_info['map_portfolio_photo'] : {22330414: [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446]} final : False mtd_id 4302 list_pids : [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] Looping around the photos to save general results len do output : 1 /22330414. 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, '2751774') ('4302', '22330414', '1352934603', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934601', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934599', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934596', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934554', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934551', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934547', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934543', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934538', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934532', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934456', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934455', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934452', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934446', None, None, None, None, None, '2751774') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '22330414', "{'flou': 22330454, 'cartonnette': 22330455, 'plastique': 22330456, 'mal_croppe': 22330457, 'autre_refus': 22330458, 'Carton_gris': 22330459, 'Carton_brun': 22330460, 'Teint_Dans_La_Masse': 22330461, 'papier': 22330462, 'metal': 22330463, 'environnement': 22330464, 'kraft': 22330465}", None, None, None, None, '2751774'), ('4302', '22330414', '1352934603', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934601', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934599', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934596', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934554', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934551', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934547', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934543', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934538', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934532', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934456', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934455', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934452', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934446', None, None, None, None, None, '2751774')] time used for this insertion : 0.013723611831665039 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.0384790897369385 time spend to save output : 0.014009475708007812 total time spend for step 1 : 2.0524885654449463 step2:final Wed Apr 23 07:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 (22330414) 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 22330414 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1352934456,1352934455,1352934452,1352934446,1352934554,1352934551,1352934547,1352934543,1352934538,1352934532,1352934603,1352934601,1352934599,1352934596); insert ignore into MTRUser.portfolio_carac_ratio (portfolio_id, hashtag_type, hashtag_id, value) values (%s,%s,%s,%s) on DUPLICATE KEY UPDATE value=VALUES(value) After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22330414]) Inside saveOutput : final : False verbose : True original output for save of step final : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} new output for save of step final : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] map_info['map_portfolio_photo'] : {22330414: [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446]} final : False mtd_id 4302 list_pids : [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] Looping around the photos to save general results len do output : 14 /1352934603.Didn't retrieve data . /1352934601.Didn't retrieve data . /1352934599.Didn't retrieve data . /1352934596.Didn't retrieve data . /1352934554.Didn't retrieve data . /1352934551.Didn't retrieve data . /1352934547.Didn't retrieve data . /1352934543.Didn't retrieve data . /1352934538.Didn't retrieve data . /1352934532.Didn't retrieve data . /1352934456.Didn't retrieve data . /1352934455.Didn't retrieve data . /1352934452.Didn't retrieve data . /1352934446.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, '2751774') ('4302', '22330414', '1352934603', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934601', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934599', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934596', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934554', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934551', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934547', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934543', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934538', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934532', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934456', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934455', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934452', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934446', None, None, None, None, None, '2751774') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 42 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', '22330414', '1352934603', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934601', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934599', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934596', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934554', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934551', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934547', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934543', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934538', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934532', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934456', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934455', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934452', '0.08631159230667465', None, None, None, None, '2751774'), ('4302', '22330414', '1352934446', '0.08631159230667465', None, None, None, None, '2751774')] time used for this insertion : 0.013357162475585938 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.026065349578857422 time spend to save output : 0.013835668563842773 total time spend for step 2 : 0.039901018142700195 step3:velours_tree Wed Apr 23 07:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {22330414: [{'flou': 22330454, 'cartonnette': 22330455, 'plastique': 22330456, 'mal_croppe': 22330457, 'autre_refus': 22330458, 'Carton_gris': 22330459, 'Carton_brun': 22330460, 'Teint_Dans_La_Masse': 22330461, 'papier': 22330462, 'metal': 22330463, 'environnement': 22330464, 'kraft': 22330465}]} input_args_next_step : {22330414: ()} output_args : {22330414: [{'flou': 22330454, 'cartonnette': 22330455, 'plastique': 22330456, 'mal_croppe': 22330457, 'autre_refus': 22330458, 'Carton_gris': 22330459, 'Carton_brun': 22330460, 'Teint_Dans_La_Masse': 22330461, 'papier': 22330462, 'metal': 22330463, 'environnement': 22330464, 'kraft': 22330465}]} args : 22330414 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 : ({'flou': 22330454, 'cartonnette': 22330455, 'plastique': 22330456, 'mal_croppe': 22330457, 'autre_refus': 22330458, 'Carton_gris': 22330459, 'Carton_brun': 22330460, 'Teint_Dans_La_Masse': 22330461, 'papier': 22330462, 'metal': 22330463, 'environnement': 22330464, 'kraft': 22330465},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22330414) 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([22330414]) 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.3380739688873291 time spend to save output : 6.175041198730469e-05 total time spend for step 3 : 0.3381357192993164 step4:send_mail_cod Wed Apr 23 07:35:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed 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 : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} input_args_next_step : {1352934603: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934603 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934601 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934599 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934596 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934554 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934551 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934547 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934543 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934538 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934532 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934456 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934455 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934452 depend.output_id : 0 input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ()} output_args : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',)} args : 1352934446 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 : {22330414: [{'flou': 22330454, 'cartonnette': 22330455, 'plastique': 22330456, 'mal_croppe': 22330457, 'autre_refus': 22330458, 'Carton_gris': 22330459, 'Carton_brun': 22330460, 'Teint_Dans_La_Masse': 22330461, 'papier': 22330462, 'metal': 22330463, 'environnement': 22330464, 'kraft': 22330465}]} input_args_next_step : {1352934603: ('0.08631159230667465',), 1352934601: ('0.08631159230667465',), 1352934599: ('0.08631159230667465',), 1352934596: ('0.08631159230667465',), 1352934554: ('0.08631159230667465',), 1352934551: ('0.08631159230667465',), 1352934547: ('0.08631159230667465',), 1352934543: ('0.08631159230667465',), 1352934538: ('0.08631159230667465',), 1352934532: ('0.08631159230667465',), 1352934456: ('0.08631159230667465',), 1352934455: ('0.08631159230667465',), 1352934452: ('0.08631159230667465',), 1352934446: ('0.08631159230667465',), 22330414: ()} output_args : {22330414: [{'flou': 22330454, 'cartonnette': 22330455, 'plastique': 22330456, 'mal_croppe': 22330457, 'autre_refus': 22330458, 'Carton_gris': 22330459, 'Carton_brun': 22330460, 'Teint_Dans_La_Masse': 22330461, 'papier': 22330462, 'metal': 22330463, 'environnement': 22330464, 'kraft': 22330465}]} args : 22330414 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 :15, first value : ('0.08631159230667465',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22330414) 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 (1352934603,1352934601,1352934599,1352934596,1352934554,1352934551,1352934547,1352934543,1352934538,1352934532,1352934456,1352934455,1352934452,1352934446) Found this number of photos: 14 ##### Call download_photos : nb_thread : 5 begin to download photo : 1352934446 begin to download photo : 1352934456 begin to download photo : 1352934543 begin to download photo : 1352934554 begin to download photo : 1352934601 download finish for photo 1352934446 begin to download photo : 1352934452 download finish for photo 1352934456 begin to download photo : 1352934532 download finish for photo 1352934601 begin to download photo : 1352934603 download finish for photo 1352934554 begin to download photo : 1352934596 download finish for photo 1352934543 begin to download photo : 1352934547 download finish for photo 1352934452 begin to download photo : 1352934455 download finish for photo 1352934547 begin to download photo : 1352934551 download finish for photo 1352934596 begin to download photo : 1352934599 download finish for photo 1352934532 begin to download photo : 1352934538 download finish for photo 1352934603 download finish for photo 1352934455 download finish for photo 1352934599 download finish for photo 1352934551 download finish for photo 1352934538 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette223304541745386502/ imagette223304551745386502/ length of list_filenames : 14 ; length of list_pids : 14 ; length of list_args : 14 results_Auto_P22330414_23-04-2025_07_35_02.pdf 22330454 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=22330454 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223304541745386502 22330455 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=22330455 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223304551745386502 22330456 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=22330456 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352934790: '1745386393_3895949_1352934456_bde91c2d232a29286eb1ab2ac3cff98e_rle_crop_3764916077_0.png'} change filename to text .imagette223304561745386502/ imagette223304561745386502/1745386393_3895949_1352934456_bde91c2d232a29286eb1ab2ac3cff98e_rle_crop_3764916077_0.png.png imagette223304571745386502/ imagette223304581745386502/ imagette223304631745386502/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/6de58ba072a26de5c41fc75a7147a3f8_22751522.png imagette223304561745386502 22330457 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=22330457 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223304571745386502 22330458 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=22330458 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223304581745386502 22330463 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=22330463 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223304631745386502 22330465 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=22330465 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352934800: '1745386393_3895949_1352934455_a9962b5468f5f4ee54aff292af0a6e1f_rle_crop_3764916090_0.png', 1352934801: '1745386393_3895949_1352934452_d0f923a882c6e3bbfd9c916949371a63_rle_crop_3764916102_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/1c8253588c93b5ef88f77cf9b8ccb642_19413494.png change filename to text .imagette223304651745386502/ imagette223304651745386502/1745386393_3895949_1352934452_d0f923a882c6e3bbfd9c916949371a63_rle_crop_3764916102_0.png.png imagette223304651745386502/1745386393_3895949_1352934455_a9962b5468f5f4ee54aff292af0a6e1f_rle_crop_3764916090_0.png.png wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/3283e7239208f5dc330a05a0666e2c9f_59704544.png imagette223304651745386502 22330459 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=22330459 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352934786: '1745386393_3895949_1352934455_a9962b5468f5f4ee54aff292af0a6e1f_rle_crop_3764916092_0.png', 1352934787: '1745386393_3895949_1352934452_d0f923a882c6e3bbfd9c916949371a63_rle_crop_3764916100_0.png', 1352934788: '1745386393_3895949_1352934452_d0f923a882c6e3bbfd9c916949371a63_rle_crop_3764916111_0.png'} change filename to text .wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/d5584d1dc2aefbec69d213a2bbb06303_96122077.png change filename to text .wget -O 2.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/0a8a609f28c3752119f28511e0ccd134_3992058.png change filename to text .imagette223304591745386502/ imagette223304591745386502/1745386393_3895949_1352934452_d0f923a882c6e3bbfd9c916949371a63_rle_crop_3764916111_0.png.png imagette223304591745386502/1745386393_3895949_1352934455_a9962b5468f5f4ee54aff292af0a6e1f_rle_crop_3764916092_0.png.png imagette223304591745386502/1745386393_3895949_1352934452_d0f923a882c6e3bbfd9c916949371a63_rle_crop_3764916100_0.png.png imagette223304601745386502/ wget -O 3.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/1ce03d3220444755e8b1b7d3ba79c762_83239841.png imagette223304591745386502 22330460 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=22330460 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette223304601745386502 22330461 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=22330461 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1352934784: '1745386393_3895949_1352934455_a9962b5468f5f4ee54aff292af0a6e1f_rle_crop_3764916097_0.png'} change filename to text .imagette223304611745386502/ imagette223304611745386502/1745386393_3895949_1352934455_a9962b5468f5f4ee54aff292af0a6e1f_rle_crop_3764916097_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/bcdd9592da85c3a13c39c5ad0dc4cb0f_75906370.png imagette223304611745386502 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=22330414 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/22330466,22330467,22330468,22330469,22330470,22330471,22330472,22330473,22330474,22330475,22330476,22330477?tags=flou,cartonnette,plastique,mal_croppe,autre_refus,Carton_gris,Carton_brun,Teint_Dans_La_Masse,papier,metal,environnement,kraft your option no_mail is active, we will not send the real mail to your client args[1352934603] : ('0.08631159230667465',) no score found for photo 1352934603 We are sending mail with results at report@fotonower.com args[1352934601] : ('0.08631159230667465',) no score found for photo 1352934601 We are sending mail with results at report@fotonower.com args[1352934599] : ('0.08631159230667465',) no score found for photo 1352934599 We are sending mail with results at report@fotonower.com args[1352934596] : ('0.08631159230667465',) no score found for photo 1352934596 We are sending mail with results at report@fotonower.com args[1352934554] : ('0.08631159230667465',) no score found for photo 1352934554 We are sending mail with results at report@fotonower.com args[1352934551] : ('0.08631159230667465',) no score found for photo 1352934551 We are sending mail with results at report@fotonower.com args[1352934547] : ('0.08631159230667465',) no score found for photo 1352934547 We are sending mail with results at report@fotonower.com args[1352934543] : ('0.08631159230667465',) no score found for photo 1352934543 We are sending mail with results at report@fotonower.com args[1352934538] : ('0.08631159230667465',) no score found for photo 1352934538 We are sending mail with results at report@fotonower.com args[1352934532] : ('0.08631159230667465',) no score found for photo 1352934532 We are sending mail with results at report@fotonower.com args[1352934456] : ('0.08631159230667465',) no score found for photo 1352934456 We are sending mail with results at report@fotonower.com args[1352934455] : ('0.08631159230667465',) no score found for photo 1352934455 We are sending mail with results at report@fotonower.com args[1352934452] : ('0.08631159230667465',) no score found for photo 1352934452 We are sending mail with results at report@fotonower.com args[1352934446] : ('0.08631159230667465',) no score found for photo 1352934446 We are sending mail with results at report@fotonower.com refus_total : 0.08631159230667465 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=22330414 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_P22330414_23-04-2025_07_35_02.pdf results_Auto_P22330414_23-04-2025_07_35_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22330414_23-04-2025_07_35_02.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','22330414','results_Auto_P22330414_23-04-2025_07_35_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22330414_23-04-2025_07_35_02.pdf','pdf','','0.16','0.08631159230667465') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22330414]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] map_info['map_portfolio_photo'] : {22330414: [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446]} final : False mtd_id 4302 list_pids : [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] 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, '2751774') ('4302', '22330414', '1352934603', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934601', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934599', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934596', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934554', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934551', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934547', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934543', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934538', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934532', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934456', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934455', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934452', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934446', None, None, None, None, None, '2751774') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 14 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', '22330414', '1352934603', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934601', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934599', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934596', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934554', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934551', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934547', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934543', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934538', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934532', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934456', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934455', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934452', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934446', None, None, None, None, None, '2751774')] time used for this insertion : 0.015533685684204102 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.0970005989074707 time spend to save output : 0.01577925682067871 total time spend for step 4 : 2.1127798557281494 step5:split_time_score Wed Apr 23 07:35:04 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : ['22330414'] 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 : [('22330414',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (22330414) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1352934601: {'path': 'temp/1745386501_149825_1352934601_aaa27a0c13a8a44c0f148f3b2757c0a7.jpg', 'extension': 'jpg'}, 1352934603: {'path': 'temp/1745386501_149825_1352934603_2755df585ed2e6bb49be496afb371689.jpg', 'extension': 'jpg'}, 1352934446: {'path': 'temp/1745386501_149825_1352934446_d6a9547619917800cace56abf04848d6.jpg', 'extension': 'jpg'}, 1352934452: {'path': 'temp/1745386501_149825_1352934452_d0f923a882c6e3bbfd9c916949371a63.jpg', 'extension': 'jpg'}, 1352934455: {'path': 'temp/1745386501_149825_1352934455_a9962b5468f5f4ee54aff292af0a6e1f.jpg', 'extension': 'jpg'}, 1352934554: {'path': 'temp/1745386501_149825_1352934554_f8381f6f8c37796e85f2e0480e2d2fd3.jpg', 'extension': 'jpg'}, 1352934596: {'path': 'temp/1745386501_149825_1352934596_6fa3e867d542a6076ecb9c565c09f161.jpg', 'extension': 'jpg'}, 1352934599: {'path': 'temp/1745386501_149825_1352934599_fe0fb5db575ebe1125914763b51b0698.jpg', 'extension': 'jpg'}, 1352934543: {'path': 'temp/1745386501_149825_1352934543_3c068688ae99c8c07468e6598152a3d5.jpg', 'extension': 'jpg'}, 1352934547: {'path': 'temp/1745386501_149825_1352934547_4a55a189ef6e7e54642e33bace241a03.jpg', 'extension': 'jpg'}, 1352934551: {'path': 'temp/1745386501_149825_1352934551_12e2240cb4d0ce34460ebd82f05ab25b.jpg', 'extension': 'jpg'}, 1352934456: {'path': 'temp/1745386501_149825_1352934456_bde91c2d232a29286eb1ab2ac3cff98e.jpg', 'extension': 'jpg'}, 1352934532: {'path': 'temp/1745386501_149825_1352934532_831f8f787e990bc45be60fa671dba733.jpg', 'extension': 'jpg'}, 1352934538: {'path': 'temp/1745386501_149825_1352934538_98fadf59986a29e87456f88a546569c1.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 = 22330414; (('arc_en_ciel_jrm',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 22330414 group by h (('07', 14),) 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=22330414 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 (22330414) 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 (22330414) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 23042025 22330414 Nombre de photos uploadées : 14 / 23040 (0%) 23042025 22330414 Nombre de photos taguées (types de déchets): 0 / 14 (0%) 23042025 22330414 Nombre de photos taguées (volume) : 0 / 14 (0%) [{'photo_id': 1352934456, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/bde91c2d232a29286eb1ab2ac3cff98e.jpg', 'username': None, 'uploaded_at': 1745386267, 'text': 'image_23042025_07_30_14_10132.jpg'}, {'photo_id': 1352934455, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/a9962b5468f5f4ee54aff292af0a6e1f.jpg', 'username': None, 'uploaded_at': 1745386267, 'text': 'image_23042025_07_30_24_10134.jpg'}, {'photo_id': 1352934452, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/d0f923a882c6e3bbfd9c916949371a63.jpg', 'username': None, 'uploaded_at': 1745386267, 'text': 'image_23042025_07_30_34_10141.jpg'}, {'photo_id': 1352934446, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/4/23/d6a9547619917800cace56abf04848d6.jpg', 'username': None, 'uploaded_at': 1745386267, 'text': 'image_23042025_07_30_44_10138.jpg'}] 0 [] elapsed_time : load_data_split_time_score 1.430511474609375e-06 elapsed_time : order_list_meta_photo_and_scores 3.5762786865234375e-06 ?????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0006022453308105469 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 22330414, '2025-04-23' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1739756,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.034436941146850586 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= 1739756 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1739756, 'dashboard_run_id': 1748036, 'mtr_portfolio_id': 22328173, 'dashboard_result_id': 10039809, '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_P22328173_23-04-2025_07_02_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22328174, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22328175, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22328176, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22328177, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22328178, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22328179, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22328180, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22328181, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22328182, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22328183, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22328184, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22328185, 'pht': 3726}}"}, {'dashboat_entry_day': 1739756, 'dashboard_run_id': 1748036, 'mtr_portfolio_id': 22328867, 'dashboard_result_id': 10039810, '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_P22328867_23-04-2025_07_20_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22328873, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22328874, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22328875, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22328876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22328877, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22328878, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22328879, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22328880, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22328881, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22328882, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22328883, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22328884, 'pht': 3726}}"}, {'dashboat_entry_day': 1739756, 'dashboard_run_id': 1748036, 'mtr_portfolio_id': 22329762, 'dashboard_result_id': 10039811, '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_P22329762_23-04-2025_07_32_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22329793, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22329795, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22329796, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22329797, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22329799, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22329800, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22329801, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22329803, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22329804, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22329805, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22329807, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22329808, 'pht': 3726}}"}, {'dashboat_entry_day': 1739756, 'dashboard_run_id': 1748036, 'mtr_portfolio_id': 22330414, 'dashboard_result_id': 10039812, '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 = 22328173 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': 2751510, 'mtr_portfolio_id': 22328173, 'created_at': datetime.datetime(2025, 4, 23, 7, 2, 58), 'result': '0.06952255225921646', 'result_long': None, 'result_double': None}] Qualite : 0.06952255225921646 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22328173 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22328173_23-04-2025_07_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22328173 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_P22328173_23-04-2025_07_02_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22328174, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22328175, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22328176, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22328177, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22328178, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22328179, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22328180, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22328181, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22328182, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22328183, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22328184, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22328185, 'pht': 3726}}" where mtr_portfolio_id = 22328173 and dashboard_run_id = 1748036 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`=22328173 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10039809, 0.06952255225921646, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22328173_23-04-2025_07_02_58.pdf', 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22328174, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22328175, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22328176, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22328177, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22328178, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22328179, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22328180, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22328181, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22328182, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22328183, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22328184, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22328185, '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 = 22328867 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': 2751669, 'mtr_portfolio_id': 22328867, 'created_at': datetime.datetime(2025, 4, 23, 7, 20, 57), 'result': '0.08314204137547636', 'result_long': None, 'result_double': None}] Qualite : 0.08314204137547636 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22328867 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22328867_23-04-2025_07_20_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22328867 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_P22328867_23-04-2025_07_20_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22328873, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22328874, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22328875, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22328876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22328877, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22328878, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22328879, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22328880, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22328881, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22328882, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22328883, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22328884, 'pht': 3726}}" where mtr_portfolio_id = 22328867 and dashboard_run_id = 1748036 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`=22328867 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10039810, 0.08314204137547636, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22328867_23-04-2025_07_20_58.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 22328873, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22328874, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22328875, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22328876, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22328877, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22328878, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22328879, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22328880, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22328881, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22328882, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22328883, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22328884, '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 = 22329762 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': 2751716, 'mtr_portfolio_id': 22329762, 'created_at': datetime.datetime(2025, 4, 23, 7, 32, 58), 'result': '0.06514431270651219', 'result_long': None, 'result_double': None}] Qualite : 0.06514431270651219 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22329762 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22329762_23-04-2025_07_32_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22329762 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_P22329762_23-04-2025_07_32_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22329793, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22329795, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22329796, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22329797, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22329799, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22329800, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22329801, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22329803, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22329804, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22329805, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22329807, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22329808, 'pht': 3726}}" where mtr_portfolio_id = 22329762 and dashboard_run_id = 1748036 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`=22329762 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10039811, 0.06514431270651219, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22329762_23-04-2025_07_32_59.pdf', 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22329793, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22329795, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22329796, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 22329797, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22329799, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22329800, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22329801, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22329803, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22329804, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22329805, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22329807, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22329808, '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 = 22330414 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': 2751774, 'mtr_portfolio_id': 22330414, 'created_at': datetime.datetime(2025, 4, 23, 7, 35, 1), 'result': '0.08631159230667465', 'result_long': None, 'result_double': None}] Qualite : 0.08631159230667465 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 22330414 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22330414_23-04-2025_07_35_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 22330414 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_P22330414_23-04-2025_07_35_02.pdf'}" where mtr_portfolio_id = 22330414 and dashboard_run_id = 1748036 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`=22330414 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (10039812, 0.08631159230667465, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P22330414_23-04-2025_07_35_02.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 22330454, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 22330455, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 22330456, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 22330457, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 22330458, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 22330459, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 22330460, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 22330461, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 22330462, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 22330463, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 22330464, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 22330465, 'pht': 3726}}") ON DUPLICATE KEY UPDATE qualite=VALUES(qualite), completion_json=VALUES(completion_json) ret update_qualite_results : None SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (22328173,22328867,22329762,22330414) result : ((1352921851,), (1352921854,), (1352921857,), (1352921859,), (1352921861,), (1352921892,), (1352921895,), (1352921897,), (1352921899,), (1352921929,), (1352921930,), (1352921931,), (1352921932,), (1352921933,), (1352921972,), (1352921974,), (1352921976,), (1352921978,), (1352921981,), (1352921983,), (1352922010,), (1352922012,), (1352922013,), (1352922014,), (1352922016,), (1352922063,), (1352922064,), (1352922066,), (1352922068,), (1352922094,), (1352922097,), (1352922099,), (1352922101,), (1352922104,), (1352922107,), (1352922139,), (1352922141,), (1352922142,), (1352922143,), (1352922192,), (1352922197,), (1352922198,), (1352922199,), (1352922200,), (1352922233,), (1352922236,), (1352922240,), (1352922243,), (1352922246,), (1352922248,), (1352922298,), (1352922301,), (1352922302,), (1352922656,), (1352922659,), (1352922661,), (1352922683,), (1352922698,), (1352922755,), (1352922757,), (1352922759,), (1352922761,), (1352922766,), (1352922769,), (1352923825,), (1352923859,), (1352923869,), (1352924869,), (1352924579,), (1352924663,), (1352924719,), (1352924771,), (1352925762,), (1352925839,), (1352925916,), (1352926946,), (1352927023,), (1352927393,), (1352927487,), (1352927572,), (1352927822,), (1352927825,), (1352927828,), (1352927831,), (1352928295,), (1352928351,), (1352928429,), (1352928483,), (1352928869,), (1352928895,), (1352928904,), (1352928907,), (1352928910,), (1352928961,), (1352928964,), (1352928968,), (1352928972,), (1352928977,), (1352928981,), (1352929029,), (1352929031,), (1352929034,), (1352929057,), (1352929066,), (1352929135,), (1352929140,), (1352929161,), (1352929212,), (1352929241,), (1352929273,), (1352929358,), (1352929364,), (1352929371,), (1352929389,), (1352929785,), (1352929811,), (1352929823,), (1352929829,), (1352929834,), (1352929858,), (1352930044,), (1352930057,), (1352930071,), (1352930236,), (1352930243,), (1352930247,), (1352930253,), (1352930266,), (1352930300,), (1352930474,), (1352930479,), (1352930486,), (1352930488,), (1352930693,), (1352930708,), (1352930712,), (1352930715,), (1352930719,), (1352930724,), (1352930886,), (1352930839,), (1352930853,), (1352930870,), (1352930882,), (1352931172,), (1352931193,), (1352931227,), (1352931249,), (1352931364,), (1352931391,), (1352931403,), (1352931406,), (1352931409,), (1352931412,), (1352931444,), (1352931458,), (1352931475,), (1352931482,), (1352931495,), (1352931607,), (1352931654,), (1352931850,), (1352931951,), (1352931969,), (1352932152,), (1352932192,), (1352932229,), (1352932255,), (1352932260,), (1352932300,), (1352932302,), (1352932304,), (1352932307,), (1352932312,), (1352932320,), (1352932377,), (1352932395,), (1352932429,), (1352932583,), (1352932586,), (1352932590,), (1352932593,), (1352932598,), (1352932609,), (1352932774,), (1352932789,), (1352932829,), (1352932867,), (1352932973,), (1352932977,), (1352932982,), (1352933012,), (1352933050,), (1352933076,), (1352933358,), (1352933407,), (1352933459,), (1352933481,), (1352933484,), (1352933792,), (1352933800,), (1352933805,), (1352933839,), (1352933962,), (1352934001,), (1352934029,), (1352934050,), (1352934053,), (1352934056,), (1352934106,), (1352934133,), (1352934185,), (1352934459,), (1352934446,), (1352934452,), (1352934455,), (1352934456,), (1352934532,), (1352934538,), (1352934543,), (1352934547,), (1352934551,), (1352934554,), (1352934596,), (1352934599,), (1352934601,), (1352934603,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'23042025': {'nb_upload': 14, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([22330414]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] map_info['map_portfolio_photo'] : {22330414: [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446]} final : True mtd_id 4302 list_pids : [1352934603, 1352934601, 1352934599, 1352934596, 1352934554, 1352934551, 1352934547, 1352934543, 1352934538, 1352934532, 1352934456, 1352934455, 1352934452, 1352934446] Looping around the photos to save general results len do output : 1 /22330414Didn'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, '2751774') ('4302', '22330414', '1352934603', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934601', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934599', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934596', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934554', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934551', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934547', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934543', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934538', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934532', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934456', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934455', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934452', None, None, None, None, None, '2751774') ('4302', None, None, None, None, None, None, None, '2751774') ('4302', '22330414', '1352934446', None, None, None, None, None, '2751774') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 15 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, '22330414', 'None', None, None, None, None, '2751774'), ('4302', '22330414', '1352934603', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934601', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934599', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934596', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934554', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934551', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934547', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934543', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934538', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934532', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934456', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934455', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934452', None, None, None, None, None, '2751774'), ('4302', '22330414', '1352934446', None, None, None, None, None, '2751774')] time used for this insertion : 0.07108521461486816 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3474769592285156 time spend to save output : 0.07133865356445312 total time spend for step 5 : 0.41881561279296875 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 (2751774) 2.27user 2.38system 0:09.25elapsed 50%CPU (0avgtext+0avgdata 159036maxresident)k 488inputs+9616outputs (3major+73305minor)pagefaults 0swaps