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 : 2661191 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 (2702562) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (2702562) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853805 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['2702562'] with mtr_portfolio_ids : ['21853805'] and first list_photo_ids : [] new path : /proc/2661191/ Name: python3 Umask: 0002 State: R (running) Tgid: 2661191 Ngid: 0 Pid: 2661191 PPid: 2661190 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2661191 NSpid: 2661191 NSpgid: 2657697 NSsid: 2657697 VmPeak: 1106928 kB VmSize: 1106928 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 97980 kB VmRSS: 97980 kB RssAnon: 59772 kB RssFile: 38208 kB RssShmem: 0 kB VmData: 865676 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 616 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/63054 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 49 nonvoluntary_ctxt_switches: 112 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2661191', 'Ngid': '0', 'Pid': '2661191', 'PPid': '2661190', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2661191', 'NSpid': '2661191', 'NSpgid': '2657697', 'NSsid': '2657697', 'VmPeak': '1106928 kB', 'VmSize': '1106928 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '97980 kB', 'VmRSS': '97980 kB', 'RssAnon': '59772 kB', 'RssFile': '38208 kB', 'RssShmem': '0 kB', 'VmData': '865676 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '616 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/63054', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '49', 'nonvoluntary_ctxt_switches': '112'} ('datou_batch_current', '2661191', '1106928', '0', '1106928', '865676', '97980', b'', 'marlene', '2702562') 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 (21853805) 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 (2702562 ) ) 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 (21853805) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1348321246, 'portfolio_id': 21853805}, {'photo_id': 1348321232, 'portfolio_id': 21853805}, {'photo_id': 1348321225, 'portfolio_id': 21853805}, {'photo_id': 1348321215, 'portfolio_id': 21853805}, {'photo_id': 1348321211, 'portfolio_id': 21853805}, {'photo_id': 1348321176, 'portfolio_id': 21853805}, {'photo_id': 1348321169, 'portfolio_id': 21853805}, {'photo_id': 1348321165, 'portfolio_id': 21853805}, {'photo_id': 1348320900, 'portfolio_id': 21853805}, {'photo_id': 1348320152, 'portfolio_id': 21853805}, {'photo_id': 1348320129, 'portfolio_id': 21853805}, {'photo_id': 1348320104, 'portfolio_id': 21853805}, {'photo_id': 1348320100, 'portfolio_id': 21853805}, {'photo_id': 1348319809, 'portfolio_id': 21853805}, {'photo_id': 1348319807, 'portfolio_id': 21853805}] map_portfolio_id_photo_id: {21853805: [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807]} ##### 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.014940261840820312 #### 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 Fri Mar 28 17:06:57 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21853805) 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 : 21853805 get user id for portfolio 21853805 get sub ptf for main ptf 21853805, type 3726 and hashtags ['kraft', 'environnement', 'mal_croppe', 'autre_refus', 'metal', 'papier', 'flou', 'Carton_gris', 'Carton_brun', 'plastique', 'cartonnette', 'Teint_Dans_La_Masse'] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__28032025_17_00_14_10203_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[21853805, 21853830, 3726, 0.5, 493202403, 979], [21853805, 21853831, 3726, 0.5, 493012381, 979], [21853805, 21853832, 3726, 0.5, 2107755527, 979], [21853805, 21853833, 3726, 0.5, 2107752406, 979], [21853805, 21853834, 3726, 0.5, 492628673, 979], [21853805, 21853835, 3726, 0.5, 492668766, 979], [21853805, 21853836, 3726, 0.5, 492777938, 979], [21853805, 21853837, 3726, 0.5, 2107753020, 979], [21853805, 21853838, 3726, 0.5, 2107753024, 979], [21853805, 21853839, 3726, 0.5, 492725882, 979], [21853805, 21853840, 3726, 0.5, 702398920, 979], [21853805, 21853841, 3726, 0.5, 2107752385, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 21853805, 'sub_port_id': 21853830, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368069, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'environnement': {'main_port_id': 21853805, 'sub_port_id': 21853831, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368070, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'mal_croppe': {'main_port_id': 21853805, 'sub_port_id': 21853832, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368071, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'autre_refus': {'main_port_id': 21853805, 'sub_port_id': 21853833, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368072, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'metal': {'main_port_id': 21853805, 'sub_port_id': 21853834, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368073, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'papier': {'main_port_id': 21853805, 'sub_port_id': 21853835, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368074, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'flou': {'main_port_id': 21853805, 'sub_port_id': 21853836, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368075, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'Carton_gris': {'main_port_id': 21853805, 'sub_port_id': 21853837, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368076, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'Carton_brun': {'main_port_id': 21853805, 'sub_port_id': 21853838, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368077, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'plastique': {'main_port_id': 21853805, 'sub_port_id': 21853839, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368078, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'cartonnette': {'main_port_id': 21853805, 'sub_port_id': 21853840, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368079, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}, 'Teint_Dans_La_Masse': {'main_port_id': 21853805, 'sub_port_id': 21853841, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368080, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 57), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 57)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853830 , 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=21853805 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 (21853830) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853831 , 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=21853805 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 (21853831) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853832 , 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=21853805 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 (21853832) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853833 , 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=21853805 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 (21853833) result : ((1348321643,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853834 , 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=21853805 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 (21853834) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853835 , 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=21853805 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 (21853835) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853836 , 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=21853805 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 (21853836) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853837 , 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=21853805 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 (21853837) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853838 , 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=21853805 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 (21853838) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853839 , 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=21853805 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 (21853839) result : ((1348321647,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853840 , 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=21853805 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 (21853840) result : ((1348321646,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 21853841 , 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=21853805 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 (21853841) result : ((1348321641,),) SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (21853805) result : ((1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) 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 (1348320100,1348320900) and cspi.crop_hashtag_id = chi.id; To do ! Use context local managing function ! SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__28032025_17_00_14_10203_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_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__28032025_17_00_14_10203_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio INSERT IGNORE INTO MTRPhoto.mtr_port_to_port_ids (`mtr_portfolio_id_1`, `mtr_portfolio_id_2`, `type`, `min_score`, `hashtag_id`, `mtr_user_id`) VALUES (%s,%s,%s,%s,%s,%s)[[21853805, 21853842, 4417, 0.5, 493202403, 979], [21853805, 21853843, 4417, 0.5, 493012381, 979], [21853805, 21853844, 4417, 0.5, 2107755527, 979], [21853805, 21853845, 4417, 0.5, 2107752406, 979], [21853805, 21853846, 4417, 0.5, 492628673, 979], [21853805, 21853847, 4417, 0.5, 492668766, 979], [21853805, 21853848, 4417, 0.5, 492777938, 979], [21853805, 21853849, 4417, 0.5, 2107753020, 979], [21853805, 21853850, 4417, 0.5, 2107753024, 979], [21853805, 21853851, 4417, 0.5, 492725882, 979], [21853805, 21853852, 4417, 0.5, 702398920, 979], [21853805, 21853853, 4417, 0.5, 2107752385, 979]] SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 SELECT mptpi.id, mptpi.mtr_portfolio_id_1, mptpi.mtr_portfolio_id_2, mptpi.type, mptpi.hashtag_id, mptpi.min_score, mptpi.mtr_user_id, mptpi.created_at, mptpi.updated_at, mptpi.last_updated_at_desc, mptpi.last_updated_at_asc, h.hashtag FROM MTRPhoto.mtr_port_to_port_ids mptpi, MTRBack.hashtags h WHERE h.hashtag_id=mptpi.hashtag_id AND mptpi.`mtr_portfolio_id_1`=21853805 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('kraft','environnement','mal_croppe','autre_refus','metal','papier','flou','Carton_gris','Carton_brun','plastique','cartonnette','Teint_Dans_La_Masse')) AND mptpi.`min_score`=0.5 To do returned map {'kraft': {'main_port_id': 21853805, 'sub_port_id': 21853842, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368081, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'environnement': {'main_port_id': 21853805, 'sub_port_id': 21853843, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368082, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'mal_croppe': {'main_port_id': 21853805, 'sub_port_id': 21853844, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368083, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'autre_refus': {'main_port_id': 21853805, 'sub_port_id': 21853845, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368084, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'metal': {'main_port_id': 21853805, 'sub_port_id': 21853846, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368085, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'papier': {'main_port_id': 21853805, 'sub_port_id': 21853847, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368086, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'flou': {'main_port_id': 21853805, 'sub_port_id': 21853848, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368087, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'Carton_gris': {'main_port_id': 21853805, 'sub_port_id': 21853849, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368088, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'Carton_brun': {'main_port_id': 21853805, 'sub_port_id': 21853850, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368089, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'plastique': {'main_port_id': 21853805, 'sub_port_id': 21853851, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368090, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'cartonnette': {'main_port_id': 21853805, 'sub_port_id': 21853852, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368091, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}, 'Teint_Dans_La_Masse': {'main_port_id': 21853805, 'sub_port_id': 21853853, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 14368092, 'last_updated_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_desc': datetime.datetime(2025, 3, 28, 17, 6, 58), 'last_updated_at_asc': datetime.datetime(2025, 3, 28, 17, 6, 58)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853842,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853830 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853843,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853831 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853844,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853832 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853845,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853833 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853846,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853834 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853847,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853835 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853848,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853836 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853849,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853837 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853850,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853838 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853851,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853839 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853852,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853840 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 21853853,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 21853841 lien utilise dans velours : https://www.fotonower.com/velours/21853842,21853843,21853844,21853845,21853846,21853847,21853848,21853849,21853850,21853851,21853852,21853853?tags=kraft,environnement,mal_croppe,autre_refus,metal,papier,flou,Carton_gris,Carton_brun,plastique,cartonnette,Teint_Dans_La_Masse After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21853805]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] map_info['map_portfolio_photo'] : {21853805: [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807]} final : False mtd_id 4302 list_pids : [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] Looping around the photos to save general results len do output : 1 /21853805. 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, '2702562') ('4302', '21853805', '1348321246', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321232', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321225', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321215', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321211', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321176', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321169', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321165', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320900', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320152', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320129', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320104', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320100', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319809', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319807', None, None, None, None, None, '2702562') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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, '21853805', "{'kraft': 21853830, 'environnement': 21853831, 'mal_croppe': 21853832, 'autre_refus': 21853833, 'metal': 21853834, 'papier': 21853835, 'flou': 21853836, 'Carton_gris': 21853837, 'Carton_brun': 21853838, 'plastique': 21853839, 'cartonnette': 21853840, 'Teint_Dans_La_Masse': 21853841}", None, None, None, None, '2702562'), ('4302', '21853805', '1348321246', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321232', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321225', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321215', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321211', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321176', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321169', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321165', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320900', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320152', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320129', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320104', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320100', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348319809', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348319807', None, None, None, None, None, '2702562')] time used for this insertion : 0.014274120330810547 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.029799461364746 time spend to save output : 0.014600038528442383 total time spend for step 1 : 1.0443994998931885 step2:final Fri Mar 28 17:06:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21853805) 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 21853805 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1348319809,1348319807,1348320152,1348320129,1348320104,1348320100,1348321176,1348321169,1348321165,1348320900,1348321246,1348321232,1348321225,1348321215,1348321211); 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([21853805]) Inside saveOutput : final : False verbose : True original output for save of step final : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} new output for save of step final : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] map_info['map_portfolio_photo'] : {21853805: [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807]} final : False mtd_id 4302 list_pids : [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] Looping around the photos to save general results len do output : 15 /1348321246.Didn't retrieve data . /1348321232.Didn't retrieve data . /1348321225.Didn't retrieve data . /1348321215.Didn't retrieve data . /1348321211.Didn't retrieve data . /1348321176.Didn't retrieve data . /1348321169.Didn't retrieve data . /1348321165.Didn't retrieve data . /1348320900.Didn't retrieve data . /1348320152.Didn't retrieve data . /1348320129.Didn't retrieve data . /1348320104.Didn't retrieve data . /1348320100.Didn't retrieve data . /1348319809.Didn't retrieve data . /1348319807.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, '2702562') ('4302', '21853805', '1348321246', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321232', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321225', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321215', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321211', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321176', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321169', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321165', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320900', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320152', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320129', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320104', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320100', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319809', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319807', None, None, None, None, None, '2702562') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 45 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', '21853805', '1348321246', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348321232', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348321225', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348321215', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348321211', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348321176', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348321169', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348321165', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348320900', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348320152', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348320129', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348320104', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348320100', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348319809', '0.04862343248333643', None, None, None, None, '2702562'), ('4302', '21853805', '1348319807', '0.04862343248333643', None, None, None, None, '2702562')] time used for this insertion : 0.013222932815551758 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.027881383895874023 time spend to save output : 0.014103889465332031 total time spend for step 2 : 0.041985273361206055 step3:velours_tree Fri Mar 28 17:06:58 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {21853805: [{'kraft': 21853830, 'environnement': 21853831, 'mal_croppe': 21853832, 'autre_refus': 21853833, 'metal': 21853834, 'papier': 21853835, 'flou': 21853836, 'Carton_gris': 21853837, 'Carton_brun': 21853838, 'plastique': 21853839, 'cartonnette': 21853840, 'Teint_Dans_La_Masse': 21853841}]} input_args_next_step : {21853805: ()} output_args : {21853805: [{'kraft': 21853830, 'environnement': 21853831, 'mal_croppe': 21853832, 'autre_refus': 21853833, 'metal': 21853834, 'papier': 21853835, 'flou': 21853836, 'Carton_gris': 21853837, 'Carton_brun': 21853838, 'plastique': 21853839, 'cartonnette': 21853840, 'Teint_Dans_La_Masse': 21853841}]} args : 21853805 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'kraft': 21853830, 'environnement': 21853831, 'mal_croppe': 21853832, 'autre_refus': 21853833, 'metal': 21853834, 'papier': 21853835, 'flou': 21853836, 'Carton_gris': 21853837, 'Carton_brun': 21853838, 'plastique': 21853839, 'cartonnette': 21853840, 'Teint_Dans_La_Masse': 21853841},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21853805) 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([21853805]) 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.6455867290496826 time spend to save output : 5.340576171875e-05 total time spend for step 3 : 0.6456401348114014 step4:send_mail_cod Fri Mar 28 17:06: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 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 : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} input_args_next_step : {1348321246: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321246 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321232 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321225 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321215 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321211 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321176 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321169 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348321165 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348320900 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348320152 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348320129 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348320104 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348320100 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348319809 depend.output_id : 0 input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ()} output_args : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',)} args : 1348319807 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 : {21853805: [{'kraft': 21853830, 'environnement': 21853831, 'mal_croppe': 21853832, 'autre_refus': 21853833, 'metal': 21853834, 'papier': 21853835, 'flou': 21853836, 'Carton_gris': 21853837, 'Carton_brun': 21853838, 'plastique': 21853839, 'cartonnette': 21853840, 'Teint_Dans_La_Masse': 21853841}]} input_args_next_step : {1348321246: ('0.04862343248333643',), 1348321232: ('0.04862343248333643',), 1348321225: ('0.04862343248333643',), 1348321215: ('0.04862343248333643',), 1348321211: ('0.04862343248333643',), 1348321176: ('0.04862343248333643',), 1348321169: ('0.04862343248333643',), 1348321165: ('0.04862343248333643',), 1348320900: ('0.04862343248333643',), 1348320152: ('0.04862343248333643',), 1348320129: ('0.04862343248333643',), 1348320104: ('0.04862343248333643',), 1348320100: ('0.04862343248333643',), 1348319809: ('0.04862343248333643',), 1348319807: ('0.04862343248333643',), 21853805: ()} output_args : {21853805: [{'kraft': 21853830, 'environnement': 21853831, 'mal_croppe': 21853832, 'autre_refus': 21853833, 'metal': 21853834, 'papier': 21853835, 'flou': 21853836, 'Carton_gris': 21853837, 'Carton_brun': 21853838, 'plastique': 21853839, 'cartonnette': 21853840, 'Teint_Dans_La_Masse': 21853841}]} args : 21853805 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 :16, first value : ('0.04862343248333643',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21853805) 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 (1348321246,1348321232,1348321225,1348321215,1348321211,1348321176,1348321169,1348321165,1348320900,1348320152,1348320129,1348320104,1348320100,1348319809,1348319807) Found this number of photos: 15 ##### Call download_photos : nb_thread : 5 begin to download photo : 1348319807 begin to download photo : 1348320129 begin to download photo : 1348321169 begin to download photo : 1348321225 download finish for photo 1348320129 begin to download photo : 1348320152 download finish for photo 1348321225 begin to download photo : 1348321232 download finish for photo 1348319807 begin to download photo : 1348319809 download finish for photo 1348321169 begin to download photo : 1348321176 download finish for photo 1348320152 begin to download photo : 1348320900 download finish for photo 1348321232 begin to download photo : 1348321246 download finish for photo 1348321176 begin to download photo : 1348321211 download finish for photo 1348319809 begin to download photo : 1348320100 download finish for photo 1348320900 begin to download photo : 1348321165 download finish for photo 1348321246 download finish for photo 1348321211 begin to download photo : 1348321215 download finish for photo 1348320100 begin to download photo : 1348320104 download finish for photo 1348321165 download finish for photo 1348320104 download finish for photo 1348321215 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette218538301743178019/ imagette218538321743178019/ length of list_filenames : 15 ; length of list_pids : 15 ; length of list_args : 15 results_Auto_P21853805_28-03-2025_17_06_59.pdf 21853830 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=21853830 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette218538301743178019 21853832 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=21853832 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette218538321743178019 21853833 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=21853833 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1348321643: '1743177972_1471391_1348320104_ed93b9b7cc79bfa5155639788fe4570b_rle_crop_3736639671_0.png'} change filename to text .imagette218538331743178019/ imagette218538331743178019/1743177972_1471391_1348320104_ed93b9b7cc79bfa5155639788fe4570b_rle_crop_3736639671_0.png.png imagette218538341743178019/ imagette218538361743178019/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/d56a07eef22d2e3f74783ae9a0ec8a6a_10346465.png imagette218538331743178019 21853834 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=21853834 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette218538341743178019 21853836 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=21853836 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette218538361743178019 21853839 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=21853839 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1348321647: '1743177972_1471391_1348320129_aade88dca30ffbcbfbc19305b6c6b3b2_rle_crop_3736639663_0.png'} change filename to text .imagette218538391743178019/ imagette218538391743178019/1743177972_1471391_1348320129_aade88dca30ffbcbfbc19305b6c6b3b2_rle_crop_3736639663_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/62d42f4b3add1c11f00171ff189a592d_16440728.png imagette218538391743178019 21853840 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=21853840 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1348321646: '1743177972_1471391_1348320100_64eb817bf4e29c7c0376e769268fa0a0_rle_crop_3736639681_0.png'} change filename to text .imagette218538401743178019/ imagette218538401743178019/1743177972_1471391_1348320100_64eb817bf4e29c7c0376e769268fa0a0_rle_crop_3736639681_0.png.png imagette218538371743178019/ imagette218538381743178019/ wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/5b0c0730f9ac9d56d011603e59f6d085_3625929.png imagette218538401743178019 21853837 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=21853837 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette218538371743178019 21853838 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=21853838 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette218538381743178019 21853841 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=21853841 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {1348321641: '1743177972_1471391_1348320129_aade88dca30ffbcbfbc19305b6c6b3b2_rle_crop_3736639660_0.png'} change filename to text .imagette218538411743178019/ imagette218538411743178019/1743177972_1471391_1348320129_aade88dca30ffbcbfbc19305b6c6b3b2_rle_crop_3736639660_0.png.png wget -O 1.png http://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/30ba207945cfe4a70124212dc2578e3a_78675049.png imagette218538411743178019 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=21853805 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/21853842,21853843,21853844,21853845,21853846,21853847,21853848,21853849,21853850,21853851,21853852,21853853?tags=kraft,environnement,mal_croppe,autre_refus,metal,papier,flou,Carton_gris,Carton_brun,plastique,cartonnette,Teint_Dans_La_Masse your option no_mail is active, we will not send the real mail to your client args[1348321246] : ('0.04862343248333643',) no score found for photo 1348321246 We are sending mail with results at report@fotonower.com args[1348321232] : ('0.04862343248333643',) no score found for photo 1348321232 We are sending mail with results at report@fotonower.com args[1348321225] : ('0.04862343248333643',) no score found for photo 1348321225 We are sending mail with results at report@fotonower.com args[1348321215] : ('0.04862343248333643',) no score found for photo 1348321215 We are sending mail with results at report@fotonower.com args[1348321211] : ('0.04862343248333643',) no score found for photo 1348321211 We are sending mail with results at report@fotonower.com args[1348321176] : ('0.04862343248333643',) no score found for photo 1348321176 We are sending mail with results at report@fotonower.com args[1348321169] : ('0.04862343248333643',) no score found for photo 1348321169 We are sending mail with results at report@fotonower.com args[1348321165] : ('0.04862343248333643',) no score found for photo 1348321165 We are sending mail with results at report@fotonower.com args[1348320900] : ('0.04862343248333643',) no score found for photo 1348320900 We are sending mail with results at report@fotonower.com args[1348320152] : ('0.04862343248333643',) no score found for photo 1348320152 We are sending mail with results at report@fotonower.com args[1348320129] : ('0.04862343248333643',) no score found for photo 1348320129 We are sending mail with results at report@fotonower.com args[1348320104] : ('0.04862343248333643',) no score found for photo 1348320104 We are sending mail with results at report@fotonower.com args[1348320100] : ('0.04862343248333643',) no score found for photo 1348320100 We are sending mail with results at report@fotonower.com args[1348319809] : ('0.04862343248333643',) no score found for photo 1348319809 We are sending mail with results at report@fotonower.com args[1348319807] : ('0.04862343248333643',) no score found for photo 1348319807 We are sending mail with results at report@fotonower.com refus_total : 0.04862343248333643 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=21853805 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_P21853805_28-03-2025_17_06_59.pdf results_Auto_P21853805_28-03-2025_17_06_59.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21853805_28-03-2025_17_06_59.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','21853805','results_Auto_P21853805_28-03-2025_17_06_59.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21853805_28-03-2025_17_06_59.pdf','pdf','','0.15','0.04862343248333643') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21853805]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] map_info['map_portfolio_photo'] : {21853805: [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807]} final : False mtd_id 4302 list_pids : [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] 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, '2702562') ('4302', '21853805', '1348321246', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321232', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321225', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321215', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321211', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321176', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321169', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321165', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320900', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320152', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320129', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320104', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320100', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319809', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319807', None, None, None, None, None, '2702562') 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', '21853805', '1348321246', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321232', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321225', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321215', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321211', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321176', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321169', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321165', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320900', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320152', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320129', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320104', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320100', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348319809', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348319807', None, None, None, None, None, '2702562')] time used for this insertion : 0.015111684799194336 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.1322286128997803 time spend to save output : 0.015573978424072266 total time spend for step 4 : 2.1478025913238525 step5:split_time_score Fri Mar 28 17:07: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 : ['21853805'] 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 : [('21853805',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (21853805) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1348321225: {'path': 'temp/1743178019_2661191_1348321225_d3f666148949b707e4e7f8d2bce1baf1.jpg', 'extension': 'jpg'}, 1348321232: {'path': 'temp/1743178019_2661191_1348321232_3403642e07a7e84d993a89e0c2df13d7.jpg', 'extension': 'jpg'}, 1348321246: {'path': 'temp/1743178019_2661191_1348321246_8e59697780327e87c7782a706cc02258.jpg', 'extension': 'jpg'}, 1348320129: {'path': 'temp/1743178019_2661191_1348320129_aade88dca30ffbcbfbc19305b6c6b3b2.jpg', 'extension': 'jpg'}, 1348320152: {'path': 'temp/1743178019_2661191_1348320152_5c4972230c070b6d2b13124357a91a64.jpg', 'extension': 'jpg'}, 1348320900: {'path': 'temp/1743178019_2661191_1348320900_4d3e6fbf9f9a7713704fd5031bc4eedd.jpg', 'extension': 'jpg'}, 1348321165: {'path': 'temp/1743178019_2661191_1348321165_f768b40a7fb639bf8a8928db1aa04430.jpg', 'extension': 'jpg'}, 1348319807: {'path': 'temp/1743178019_2661191_1348319807_9107ef9f73690c44fb516015f10fb179.jpg', 'extension': 'jpg'}, 1348319809: {'path': 'temp/1743178019_2661191_1348319809_756c3866871b26a66b376d3d4aa6a8d9.jpg', 'extension': 'jpg'}, 1348320100: {'path': 'temp/1743178019_2661191_1348320100_64eb817bf4e29c7c0376e769268fa0a0.jpg', 'extension': 'jpg'}, 1348320104: {'path': 'temp/1743178019_2661191_1348320104_ed93b9b7cc79bfa5155639788fe4570b.jpg', 'extension': 'jpg'}, 1348321169: {'path': 'temp/1743178019_2661191_1348321169_046f7ed4a2764148eccadf0adf106790.jpg', 'extension': 'jpg'}, 1348321176: {'path': 'temp/1743178019_2661191_1348321176_a0956d8a9c40901793488f2ce07314e3.jpg', 'extension': 'jpg'}, 1348321211: {'path': 'temp/1743178019_2661191_1348321211_91f9949d1cd69e6dfaaadb48ed8f3ce3.jpg', 'extension': 'jpg'}, 1348321215: {'path': 'temp/1743178019_2661191_1348321215_6bb335582965b51f2558a656e2f254e8.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 = 21853805; (('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 = 21853805 group by h (('17', 15),) 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=21853805 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 (21853805) 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 (21853805) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 28032025 21853805 Nombre de photos uploadées : 15 / 23040 (0%) 28032025 21853805 Nombre de photos taguées (types de déchets): 0 / 15 (0%) 28032025 21853805 Nombre de photos taguées (volume) : 0 / 15 (0%) [{'photo_id': 1348319809, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/756c3866871b26a66b376d3d4aa6a8d9.jpg', 'username': None, 'uploaded_at': 1743177739, 'text': 'image_28032025_17_00_14_10202.jpg'}, {'photo_id': 1348319807, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/9107ef9f73690c44fb516015f10fb179.jpg', 'username': None, 'uploaded_at': 1743177739, 'text': 'image_28032025_17_00_34_10138.jpg'}, {'photo_id': 1348320152, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/5c4972230c070b6d2b13124357a91a64.jpg', 'username': None, 'uploaded_at': 1743177799, 'text': 'image_28032025_17_00_54_10136.jpg'}, {'photo_id': 1348320129, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/3/28/aade88dca30ffbcbfbc19305b6c6b3b2.jpg', 'username': None, 'uploaded_at': 1743177799, 'text': 'image_28032025_17_01_13_9127.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.6226043701171875e-06 elapsed_time : order_list_meta_photo_and_scores 1.0967254638671875e-05 ??????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0008554458618164062 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 21853805, '2025-03-28' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1696037,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.02308368682861328 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= 1696037 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1696037, 'dashboard_run_id': 1705975, 'mtr_portfolio_id': 21851507, 'dashboard_result_id': 9724434, '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_P21851507_28-03-2025_16_34_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21851512, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21851513, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21851514, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21851515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21851516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21851517, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21851518, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21851519, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21851520, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21851521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21851522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21851523, 'pht': 3726}}"}, {'dashboat_entry_day': 1696037, 'dashboard_run_id': 1705975, 'mtr_portfolio_id': 21852656, 'dashboard_result_id': 9724435, '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_P21852656_28-03-2025_16_52_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21852669, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21852670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21852671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21852672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21852673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21852674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21852675, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21852676, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21852677, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21852678, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21852679, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21852680, 'pht': 3726}}"}, {'dashboat_entry_day': 1696037, 'dashboard_run_id': 1705975, 'mtr_portfolio_id': 21853251, 'dashboard_result_id': 9724436, '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_P21853251_28-03-2025_17_05_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21853252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21853253, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21853254, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21853255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21853256, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21853257, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21853258, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21853259, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21853260, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21853261, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21853262, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21853263, 'pht': 3726}}"}, {'dashboat_entry_day': 1696037, 'dashboard_run_id': 1705975, 'mtr_portfolio_id': 21853805, 'dashboard_result_id': 9724437, '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 = 21851507 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': 2702391, 'mtr_portfolio_id': 21851507, 'created_at': datetime.datetime(2025, 3, 28, 16, 34, 2), 'result': '0.05890554238436326', 'result_long': None, 'result_double': None}] Qualite : 0.05890554238436326 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21851507 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21851507_28-03-2025_16_34_03.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21851507 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_P21851507_28-03-2025_16_34_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21851512, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21851513, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21851514, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21851515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21851516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21851517, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21851518, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21851519, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21851520, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21851521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21851522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21851523, 'pht': 3726}}" where mtr_portfolio_id = 21851507 and dashboard_run_id = 1705975 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`=21851507 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9724434, 0.05890554238436326, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21851507_28-03-2025_16_34_03.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21851512, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21851513, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21851514, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21851515, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21851516, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21851517, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21851518, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21851519, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21851520, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21851521, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21851522, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21851523, '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 = 21852656 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': 2702476, 'mtr_portfolio_id': 21852656, 'created_at': datetime.datetime(2025, 3, 28, 16, 51, 59), 'result': '0.044224478919271', 'result_long': None, 'result_double': None}] Qualite : 0.044224478919271 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21852656 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21852656_28-03-2025_16_52_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21852656 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_P21852656_28-03-2025_16_52_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21852669, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21852670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21852671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21852672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21852673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21852674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21852675, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21852676, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21852677, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21852678, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21852679, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21852680, 'pht': 3726}}" where mtr_portfolio_id = 21852656 and dashboard_run_id = 1705975 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`=21852656 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9724435, 0.044224478919271, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21852656_28-03-2025_16_52_00.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21852669, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21852670, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21852671, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21852672, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21852673, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21852674, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21852675, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21852676, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21852677, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21852678, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21852679, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21852680, '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 = 21853251 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': 2702506, 'mtr_portfolio_id': 21853251, 'created_at': datetime.datetime(2025, 3, 28, 17, 5), 'result': '0.045360200753955235', 'result_long': None, 'result_double': None}] Qualite : 0.045360200753955235 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21853251 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21853251_28-03-2025_17_05_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21853251 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_P21853251_28-03-2025_17_05_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21853252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21853253, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21853254, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21853255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21853256, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21853257, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21853258, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21853259, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21853260, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21853261, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21853262, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21853263, 'pht': 3726}}" where mtr_portfolio_id = 21853251 and dashboard_run_id = 1705975 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`=21853251 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9724436, 0.045360200753955235, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21853251_28-03-2025_17_05_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 21853252, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21853253, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21853254, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21853255, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21853256, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21853257, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21853258, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21853259, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21853260, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21853261, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21853262, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21853263, '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 = 21853805 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': 2702562, 'mtr_portfolio_id': 21853805, 'created_at': datetime.datetime(2025, 3, 28, 17, 6, 58), 'result': '0.04862343248333643', 'result_long': None, 'result_double': None}] Qualite : 0.04862343248333643 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 21853805 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21853805_28-03-2025_17_06_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 21853805 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_P21853805_28-03-2025_17_06_59.pdf'}" where mtr_portfolio_id = 21853805 and dashboard_run_id = 1705975 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`=21853805 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (9724437, 0.04862343248333643, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P21853805_28-03-2025_17_06_59.pdf', 'kraft': {'hashtag': 'kraft', 'sub_port_id': 21853830, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 21853831, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 21853832, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 21853833, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 21853834, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 21853835, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 21853836, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 21853837, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 21853838, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 21853839, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 21853840, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 21853841, '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 (21851507,21852656,21853251,21853805) result : ((1348313255,), (1348313284,), (1348313293,), (1348313297,), (1348313438,), (1348313448,), (1348313500,), (1348313522,), (1348313569,), (1348313572,), (1348313575,), (1348313586,), (1348313597,), (1348313603,), (1348313800,), (1348313912,), (1348313961,), (1348314345,), (1348314372,), (1348314377,), (1348314384,), (1348314392,), (1348314441,), (1348314467,), (1348314494,), (1348314523,), (1348314558,), (1348314579,), (1348314628,), (1348314661,), (1348314762,), (1348315011,), (1348315014,), (1348315017,), (1348315021,), (1348315026,), (1348315079,), (1348315081,), (1348315084,), (1348315092,), (1348315096,), (1348315102,), (1348315132,), (1348315134,), (1348315136,), (1348315210,), (1348315258,), (1348315263,), (1348315268,), (1348315272,), (1348315412,), (1348315416,), (1348315421,), (1348315426,), (1348315813,), (1348315833,), (1348315885,), (1348315900,), (1348315908,), (1348315936,), (1348316067,), (1348316074,), (1348316081,), (1348316088,), (1348316095,), (1348316103,), (1348316280,), (1348316284,), (1348316289,), (1348316490,), (1348316333,), (1348316342,), (1348316484,), (1348316942,), (1348316984,), (1348317010,), (1348317141,), (1348317144,), (1348317148,), (1348317152,), (1348317161,), (1348317170,), (1348317201,), (1348317204,), (1348317212,), (1348317255,), (1348317259,), (1348317262,), (1348317265,), (1348317269,), (1348317273,), (1348317305,), (1348317309,), (1348317312,), (1348317315,), (1348317381,), (1348317384,), (1348317386,), (1348317390,), (1348317441,), (1348317456,), (1348317460,), (1348317511,), (1348317515,), (1348317519,), (1348317526,), (1348317528,), (1348317531,), (1348317576,), (1348317580,), (1348317585,), (1348317591,), (1348317598,), (1348317814,), (1348317820,), (1348317827,), (1348317833,), (1348318014,), (1348318024,), (1348318032,), (1348318050,), (1348318063,), (1348318069,), (1348318130,), (1348318109,), (1348318114,), (1348318118,), (1348318122,), (1348318223,), (1348318234,), (1348318239,), (1348318246,), (1348318358,), (1348318363,), (1348318365,), (1348318371,), (1348318415,), (1348318423,), (1348318435,), (1348318446,), (1348318451,), (1348318462,), (1348318511,), (1348318518,), (1348318525,), (1348318555,), (1348318559,), (1348318562,), (1348318566,), (1348318571,), (1348318576,), (1348318598,), (1348318601,), (1348318604,), (1348318610,), (1348318660,), (1348318665,), (1348318668,), (1348318672,), (1348318679,), (1348318685,), (1348318728,), (1348318843,), (1348318846,), (1348318886,), (1348318887,), (1348318892,), (1348318925,), (1348318959,), (1348318985,), (1348319616,), (1348319649,), (1348319684,), (1348319756,), (1348319767,), (1348319770,), (1348319814,), (1348319807,), (1348319809,), (1348320100,), (1348320104,), (1348320129,), (1348320152,), (1348320900,), (1348321165,), (1348321169,), (1348321176,), (1348321211,), (1348321215,), (1348321225,), (1348321232,), (1348321246,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'28032025': {'nb_upload': 15, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([21853805]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] map_info['map_portfolio_photo'] : {21853805: [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807]} final : True mtd_id 4302 list_pids : [1348321246, 1348321232, 1348321225, 1348321215, 1348321211, 1348321176, 1348321169, 1348321165, 1348320900, 1348320152, 1348320129, 1348320104, 1348320100, 1348319809, 1348319807] Looping around the photos to save general results len do output : 1 /21853805Didn'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, '2702562') ('4302', '21853805', '1348321246', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321232', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321225', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321215', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321211', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321176', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321169', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348321165', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320900', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320152', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320129', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320104', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348320100', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319809', None, None, None, None, None, '2702562') ('4302', None, None, None, None, None, None, None, '2702562') ('4302', '21853805', '1348319807', None, None, None, None, None, '2702562') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 16 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, '21853805', 'None', None, None, None, None, '2702562'), ('4302', '21853805', '1348321246', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321232', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321225', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321215', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321211', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321176', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321169', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348321165', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320900', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320152', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320129', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320104', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348320100', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348319809', None, None, None, None, None, '2702562'), ('4302', '21853805', '1348319807', None, None, None, None, None, '2702562')] time used for this insertion : 0.01500082015991211 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.34744977951049805 time spend to save output : 0.015375375747680664 total time spend for step 5 : 0.3628251552581787 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 (2702562) 2.62user 2.30system 0:07.36elapsed 66%CPU (0avgtext+0avgdata 160112maxresident)k 94920inputs+9456outputs (405major+78240minor)pagefaults 0swaps