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 : 1641758 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 (3228701) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3228701) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516386 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3228701'] with mtr_portfolio_ids : ['24516386'] and first list_photo_ids : [] new path : /proc/1641758/ Name: python3 Umask: 0002 State: R (running) Tgid: 1641758 Ngid: 0 Pid: 1641758 PPid: 1641757 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 1641758 NSpid: 1641758 NSpgid: 1641251 NSsid: 1641251 VmPeak: 1106868 kB VmSize: 1106868 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 98456 kB VmRSS: 98456 kB RssAnon: 59816 kB RssFile: 38640 kB RssShmem: 0 kB VmData: 865620 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 544 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 9/63019 SigPnd: 0000000000000000 ShdPnd: 0000000000000000 SigBlk: 0000000000000000 SigIgn: 0000000001001000 SigCgt: 0000000180000002 CapInh: 0000000000000000 CapPrm: 0000000000000000 CapEff: 0000000000000000 CapBnd: 000001ffffffffff CapAmb: 0000000000000000 NoNewPrivs: 0 Seccomp: 0 Seccomp_filters: 0 Speculation_Store_Bypass: thread vulnerable SpeculationIndirectBranch: conditional enabled Cpus_allowed: ffffffff,ffffffff,ffffffff,ffffffff Cpus_allowed_list: 0-127 Mems_allowed: 00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001 Mems_allowed_list: 0 voluntary_ctxt_switches: 41 nonvoluntary_ctxt_switches: 108 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '1641758', 'Ngid': '0', 'Pid': '1641758', 'PPid': '1641757', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '1641758', 'NSpid': '1641758', 'NSpgid': '1641251', 'NSsid': '1641251', 'VmPeak': '1106868 kB', 'VmSize': '1106868 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '98456 kB', 'VmRSS': '98456 kB', 'RssAnon': '59816 kB', 'RssFile': '38640 kB', 'RssShmem': '0 kB', 'VmData': '865620 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '544 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '9/63019', 'SigPnd': '0000000000000000', 'ShdPnd': '0000000000000000', 'SigBlk': '0000000000000000', 'SigIgn': '0000000001001000', 'SigCgt': '0000000180000002', 'CapInh': '0000000000000000', 'CapPrm': '0000000000000000', 'CapEff': '0000000000000000', 'CapBnd': '000001ffffffffff', 'CapAmb': '0000000000000000', 'NoNewPrivs': '0', 'Seccomp': '0', 'Seccomp_filters': '0', 'Speculation_Store_Bypass': 'thread vulnerable', 'SpeculationIndirectBranch': 'conditional enabled', 'Cpus_allowed': 'ffffffff,ffffffff,ffffffff,ffffffff', 'Cpus_allowed_list': '0-127', 'Mems_allowed': '00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000000,00000001', 'Mems_allowed_list': '0', 'voluntary_ctxt_switches': '41', 'nonvoluntary_ctxt_switches': '108'} ('datou_batch_current', '1641758', '1106868', '0', '1106868', '865620', '98456', b'', 'marlene', '3228701') 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 (24516386) 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 (3228701 ) ) 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 (24516386) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1370018441, 'portfolio_id': 24516386}, {'photo_id': 1370018415, 'portfolio_id': 24516386}, {'photo_id': 1370018283, 'portfolio_id': 24516386}, {'photo_id': 1370018254, 'portfolio_id': 24516386}, {'photo_id': 1370018100, 'portfolio_id': 24516386}, {'photo_id': 1370018070, 'portfolio_id': 24516386}, {'photo_id': 1370017930, 'portfolio_id': 24516386}, {'photo_id': 1370017911, 'portfolio_id': 24516386}, {'photo_id': 1370017772, 'portfolio_id': 24516386}, {'photo_id': 1370017757, 'portfolio_id': 24516386}] map_portfolio_id_photo_id: {24516386: [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757]} ##### 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.015144824981689453 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Wed Jul 2 19:03:27 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 (24516386) 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 : 24516386 get user id for portfolio 24516386 get sub ptf for main ptf 24516386, type 3726 and hashtags ['papier', 'mal_croppe', 'Carton_brun', 'environnement', 'Carton_gris', 'metal', 'cartonnette', 'kraft', 'plastique', 'flou', 'Teint_Dans_La_Masse', 'autre_refus'] 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`=24516386 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) 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`=24516386 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_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__02072025_19_00_14_010200_3726_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_3726_autre_refus_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)[[24516386, 24516541, 3726, 0.5, 492668766, 979], [24516386, 24516542, 3726, 0.5, 2107755527, 979], [24516386, 24516543, 3726, 0.5, 2107753024, 979], [24516386, 24516544, 3726, 0.5, 493012381, 979], [24516386, 24516545, 3726, 0.5, 2107753020, 979], [24516386, 24516546, 3726, 0.5, 492628673, 979], [24516386, 24516547, 3726, 0.5, 702398920, 979], [24516386, 24516548, 3726, 0.5, 493202403, 979], [24516386, 24516549, 3726, 0.5, 492725882, 979], [24516386, 24516550, 3726, 0.5, 492777938, 979], [24516386, 24516551, 3726, 0.5, 2107752385, 979], [24516386, 24516552, 3726, 0.5, 2107752406, 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`=24516386 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) 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`=24516386 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 24516386, 'sub_port_id': 24516541, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452599, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'mal_croppe': {'main_port_id': 24516386, 'sub_port_id': 24516542, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452600, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'Carton_brun': {'main_port_id': 24516386, 'sub_port_id': 24516543, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452601, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'environnement': {'main_port_id': 24516386, 'sub_port_id': 24516544, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452602, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'Carton_gris': {'main_port_id': 24516386, 'sub_port_id': 24516545, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452603, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'metal': {'main_port_id': 24516386, 'sub_port_id': 24516546, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452604, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'cartonnette': {'main_port_id': 24516386, 'sub_port_id': 24516547, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452605, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'kraft': {'main_port_id': 24516386, 'sub_port_id': 24516548, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452606, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'plastique': {'main_port_id': 24516386, 'sub_port_id': 24516549, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452607, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'flou': {'main_port_id': 24516386, 'sub_port_id': 24516550, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452608, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'Teint_Dans_La_Masse': {'main_port_id': 24516386, 'sub_port_id': 24516551, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452609, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}, 'autre_refus': {'main_port_id': 24516386, 'sub_port_id': 24516552, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452610, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 27), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 27)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 24516541 , 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=24516386 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 (24516541) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516542 , 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=24516386 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 (24516542) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516543 , 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=24516386 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 (24516543) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516544 , 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=24516386 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 (24516544) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516545 , 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=24516386 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 (24516545) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516546 , 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=24516386 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 (24516546) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516547 , 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=24516386 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 (24516547) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516548 , 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=24516386 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 (24516548) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516549 , 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=24516386 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 (24516549) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516550 , 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=24516386 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 (24516550) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516551 , 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=24516386 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 (24516551) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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 24516552 , 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=24516386 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 (24516552) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24516386) result : ((1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) 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 (1370018100) 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`=24516386 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) 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`=24516386 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) AND mptpi.`min_score`=0.5 To do To do query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_papier_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_mal_croppe_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_Carton_brun_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_environnement_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_Carton_gris_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_metal_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_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__02072025_19_00_14_010200_4417_kraft_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_plastique_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_flou_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_Teint_Dans_La_Masse_0.5_chtin_0" AND mtr_user_id=979 Creating new portfolio query : SELECT id FROM MTRUser.mtr_portfolios WHERE name="JRM_diff_batch__02072025_19_00_14_010200_4417_autre_refus_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)[[24516386, 24516554, 4417, 0.5, 492668766, 979], [24516386, 24516555, 4417, 0.5, 2107755527, 979], [24516386, 24516556, 4417, 0.5, 2107753024, 979], [24516386, 24516557, 4417, 0.5, 493012381, 979], [24516386, 24516558, 4417, 0.5, 2107753020, 979], [24516386, 24516559, 4417, 0.5, 492628673, 979], [24516386, 24516560, 4417, 0.5, 702398920, 979], [24516386, 24516561, 4417, 0.5, 493202403, 979], [24516386, 24516562, 4417, 0.5, 492725882, 979], [24516386, 24516563, 4417, 0.5, 492777938, 979], [24516386, 24516564, 4417, 0.5, 2107752385, 979], [24516386, 24516565, 4417, 0.5, 2107752406, 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`=24516386 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) 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`=24516386 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('papier','mal_croppe','Carton_brun','environnement','Carton_gris','metal','cartonnette','kraft','plastique','flou','Teint_Dans_La_Masse','autre_refus')) AND mptpi.`min_score`=0.5 To do returned map {'papier': {'main_port_id': 24516386, 'sub_port_id': 24516554, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452611, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'mal_croppe': {'main_port_id': 24516386, 'sub_port_id': 24516555, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452612, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'Carton_brun': {'main_port_id': 24516386, 'sub_port_id': 24516556, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452613, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'environnement': {'main_port_id': 24516386, 'sub_port_id': 24516557, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452614, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'Carton_gris': {'main_port_id': 24516386, 'sub_port_id': 24516558, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452615, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'metal': {'main_port_id': 24516386, 'sub_port_id': 24516559, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452616, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'cartonnette': {'main_port_id': 24516386, 'sub_port_id': 24516560, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452617, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'kraft': {'main_port_id': 24516386, 'sub_port_id': 24516561, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452618, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'plastique': {'main_port_id': 24516386, 'sub_port_id': 24516562, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452619, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'flou': {'main_port_id': 24516386, 'sub_port_id': 24516563, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452620, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'Teint_Dans_La_Masse': {'main_port_id': 24516386, 'sub_port_id': 24516564, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452621, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}, 'autre_refus': {'main_port_id': 24516386, 'sub_port_id': 24516565, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 16452622, 'last_updated_at': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_desc': datetime.datetime(2025, 7, 2, 19, 3, 28), 'last_updated_at_asc': datetime.datetime(2025, 7, 2, 19, 3, 28)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516554,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516541 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516555,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516542 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516556,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516543 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516557,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516544 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516558,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516545 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516559,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516546 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516560,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516547 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516561,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516548 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516562,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516549 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516563,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516550 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516564,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516551 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 24516565,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 24516552 lien utilise dans velours : https://www.fotonower.com/velours/24516554,24516555,24516556,24516557,24516558,24516559,24516560,24516561,24516562,24516563,24516564,24516565?tags=papier,mal_croppe,Carton_brun,environnement,Carton_gris,metal,cartonnette,kraft,plastique,flou,Teint_Dans_La_Masse,autre_refus After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24516386]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] map_info['map_portfolio_photo'] : {24516386: [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757]} final : False mtd_id 4302 list_pids : [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] Looping around the photos to save general results len do output : 1 /24516386. 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, '3228701') ('4302', '24516386', '1370018441', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018415', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018283', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018254', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018100', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018070', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017930', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017911', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017772', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017757', None, None, None, None, None, '3228701') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24516386', "{'papier': 24516541, 'mal_croppe': 24516542, 'Carton_brun': 24516543, 'environnement': 24516544, 'Carton_gris': 24516545, 'metal': 24516546, 'cartonnette': 24516547, 'kraft': 24516548, 'plastique': 24516549, 'flou': 24516550, 'Teint_Dans_La_Masse': 24516551, 'autre_refus': 24516552}", None, None, None, None, '3228701'), ('4302', '24516386', '1370018441', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018415', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018283', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018254', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018100', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018070', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017930', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017911', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017772', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017757', None, None, None, None, None, '3228701')] time used for this insertion : 0.022489070892333984 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.0826234817504883 time spend to save output : 0.022799968719482422 total time spend for step 1 : 1.1054234504699707 step2:final Wed Jul 2 19:03:28 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 (24516386) 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 24516386 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1370018415,1370018441,1370018254,1370018283,1370018070,1370018100,1370017911,1370017930,1370017757,1370017772); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24516386]) Inside saveOutput : final : False verbose : True original output for save of step final : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} new output for save of step final : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] map_info['map_portfolio_photo'] : {24516386: [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757]} final : False mtd_id 4302 list_pids : [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] Looping around the photos to save general results len do output : 10 /1370018441.Didn't retrieve data . /1370018415.Didn't retrieve data . /1370018283.Didn't retrieve data . /1370018254.Didn't retrieve data . /1370018100.Didn't retrieve data . /1370018070.Didn't retrieve data . /1370017930.Didn't retrieve data . /1370017911.Didn't retrieve data . /1370017772.Didn't retrieve data . /1370017757.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, '3228701') ('4302', '24516386', '1370018441', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018415', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018283', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018254', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018100', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018070', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017930', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017911', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017772', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017757', None, None, None, None, None, '3228701') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 30 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', '24516386', '1370018441', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370018415', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370018283', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370018254', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370018100', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370018070', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370017930', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370017911', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370017772', '0.0', None, None, None, None, '3228701'), ('4302', '24516386', '1370017757', '0.0', None, None, None, None, '3228701')] time used for this insertion : 0.01291203498840332 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.013654470443725586 time spend to save output : 0.013394594192504883 total time spend for step 2 : 0.02704906463623047 step3:velours_tree Wed Jul 2 19:03:28 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 : {24516386: [{'papier': 24516541, 'mal_croppe': 24516542, 'Carton_brun': 24516543, 'environnement': 24516544, 'Carton_gris': 24516545, 'metal': 24516546, 'cartonnette': 24516547, 'kraft': 24516548, 'plastique': 24516549, 'flou': 24516550, 'Teint_Dans_La_Masse': 24516551, 'autre_refus': 24516552}]} input_args_next_step : {24516386: ()} output_args : {24516386: [{'papier': 24516541, 'mal_croppe': 24516542, 'Carton_brun': 24516543, 'environnement': 24516544, 'Carton_gris': 24516545, 'metal': 24516546, 'cartonnette': 24516547, 'kraft': 24516548, 'plastique': 24516549, 'flou': 24516550, 'Teint_Dans_La_Masse': 24516551, 'autre_refus': 24516552}]} args : 24516386 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 : ({'papier': 24516541, 'mal_croppe': 24516542, 'Carton_brun': 24516543, 'environnement': 24516544, 'Carton_gris': 24516545, 'metal': 24516546, 'cartonnette': 24516547, 'kraft': 24516548, 'plastique': 24516549, 'flou': 24516550, 'Teint_Dans_La_Masse': 24516551, 'autre_refus': 24516552},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24516386) 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([24516386]) 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.3195207118988037 time spend to save output : 7.700920104980469e-05 total time spend for step 3 : 0.3195977210998535 step4:send_mail_cod Wed Jul 2 19:03:28 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 : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} input_args_next_step : {1370018441: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370018441 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370018415 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370018283 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370018254 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370018100 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370018070 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370017930 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370017911 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370017772 depend.output_id : 0 input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ()} output_args : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',)} args : 1370017757 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 : {24516386: [{'papier': 24516541, 'mal_croppe': 24516542, 'Carton_brun': 24516543, 'environnement': 24516544, 'Carton_gris': 24516545, 'metal': 24516546, 'cartonnette': 24516547, 'kraft': 24516548, 'plastique': 24516549, 'flou': 24516550, 'Teint_Dans_La_Masse': 24516551, 'autre_refus': 24516552}]} input_args_next_step : {1370018441: ('0.0',), 1370018415: ('0.0',), 1370018283: ('0.0',), 1370018254: ('0.0',), 1370018100: ('0.0',), 1370018070: ('0.0',), 1370017930: ('0.0',), 1370017911: ('0.0',), 1370017772: ('0.0',), 1370017757: ('0.0',), 24516386: ()} output_args : {24516386: [{'papier': 24516541, 'mal_croppe': 24516542, 'Carton_brun': 24516543, 'environnement': 24516544, 'Carton_gris': 24516545, 'metal': 24516546, 'cartonnette': 24516547, 'kraft': 24516548, 'plastique': 24516549, 'flou': 24516550, 'Teint_Dans_La_Masse': 24516551, 'autre_refus': 24516552}]} args : 24516386 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 :11, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24516386) 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 (1370018441,1370018415,1370018283,1370018254,1370018100,1370018070,1370017930,1370017911,1370017772,1370017757) Found this number of photos: 10 ##### Call download_photos : nb_thread : 5 begin to download photo : 1370017757 begin to download photo : 1370017930 begin to download photo : 1370018441 begin to download photo : 1370018254 download finish for photo 1370017930 begin to download photo : 1370018070 download finish for photo 1370017757 begin to download photo : 1370017772 download finish for photo 1370018254 begin to download photo : 1370018283 download finish for photo 1370018441 download finish for photo 1370017772 begin to download photo : 1370017911 download finish for photo 1370018070 begin to download photo : 1370018100 download finish for photo 1370018283 begin to download photo : 1370018415 download finish for photo 1370017911 download finish for photo 1370018100 download finish for photo 1370018415 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette245165421751475809/ imagette245165461751475809/ imagette245165471751475809/ imagette245165481751475809/ imagette245165491751475809/ imagette245165501751475809/ imagette245165521751475809/ imagette245165431751475809/ imagette245165451751475809/ imagette245165511751475809/ length of list_filenames : 10 ; length of list_pids : 10 ; length of list_args : 10 results_Auto_P24516386_02-07-2025_19_03_29.pdf 24516542 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=24516542 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165421751475809 24516546 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=24516546 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165461751475809 24516547 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=24516547 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165471751475809 24516548 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=24516548 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165481751475809 24516549 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=24516549 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165491751475809 24516550 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=24516550 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165501751475809 24516552 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=24516552 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165521751475809 24516543 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=24516543 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165431751475809 24516545 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=24516545 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165451751475809 24516551 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=24516551 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette245165511751475809 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=24516386 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://www.fotonower.com/velours/24516554,24516555,24516556,24516557,24516558,24516559,24516560,24516561,24516562,24516563,24516564,24516565?tags=papier,mal_croppe,Carton_brun,environnement,Carton_gris,metal,cartonnette,kraft,plastique,flou,Teint_Dans_La_Masse,autre_refus your option no_mail is active, we will not send the real mail to your client args[1370018441] : ('0.0',) no score found for photo 1370018441 We are sending mail with results at report@fotonower.com args[1370018415] : ('0.0',) no score found for photo 1370018415 We are sending mail with results at report@fotonower.com args[1370018283] : ('0.0',) no score found for photo 1370018283 We are sending mail with results at report@fotonower.com args[1370018254] : ('0.0',) no score found for photo 1370018254 We are sending mail with results at report@fotonower.com args[1370018100] : ('0.0',) no score found for photo 1370018100 We are sending mail with results at report@fotonower.com args[1370018070] : ('0.0',) no score found for photo 1370018070 We are sending mail with results at report@fotonower.com args[1370017930] : ('0.0',) no score found for photo 1370017930 We are sending mail with results at report@fotonower.com args[1370017911] : ('0.0',) no score found for photo 1370017911 We are sending mail with results at report@fotonower.com args[1370017772] : ('0.0',) no score found for photo 1370017772 We are sending mail with results at report@fotonower.com args[1370017757] : ('0.0',) no score found for photo 1370017757 We are sending mail with results at report@fotonower.com refus_total : 0.0 2022-04-13 10:29:59 0 SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=24516386 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_P24516386_02-07-2025_19_03_29.pdf results_Auto_P24516386_02-07-2025_19_03_29.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24516386_02-07-2025_19_03_29.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','24516386','results_Auto_P24516386_02-07-2025_19_03_29.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24516386_02-07-2025_19_03_29.pdf','pdf','','0.1','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24516386]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] map_info['map_portfolio_photo'] : {24516386: [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757]} final : False mtd_id 4302 list_pids : [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] 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, '3228701') ('4302', '24516386', '1370018441', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018415', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018283', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018254', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018100', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018070', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017930', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017911', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017772', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017757', None, None, None, None, None, '3228701') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 10 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', '24516386', '1370018441', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018415', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018283', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018254', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018100', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018070', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017930', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017911', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017772', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017757', None, None, None, None, None, '3228701')] time used for this insertion : 0.017647743225097656 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.5106313228607178 time spend to save output : 0.017920255661010742 total time spend for step 4 : 1.5285515785217285 step5:split_time_score Wed Jul 2 19:03:30 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 : ['24516386'] 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 : [('24516386',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (24516386) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1370018441: {'path': 'temp/1751475808_1641758_1370018441_1fe2dcb1f39da532d309553b735618e5.jpg', 'extension': 'jpg'}, 1370017757: {'path': 'temp/1751475808_1641758_1370017757_238f0366605d55d046dfd4e3946c0cf3.jpg', 'extension': 'jpg'}, 1370017772: {'path': 'temp/1751475808_1641758_1370017772_cbc2c265669225c13db2d25037756c6f.jpg', 'extension': 'jpg'}, 1370017911: {'path': 'temp/1751475808_1641758_1370017911_4e91b66c2b9cc4fafe80aa7a1a173621.jpg', 'extension': 'jpg'}, 1370017930: {'path': 'temp/1751475808_1641758_1370017930_6712538038751e24344f4fb303a7b99d.jpg', 'extension': 'jpg'}, 1370018070: {'path': 'temp/1751475808_1641758_1370018070_b3fae84a7b5053d337f681ea296f5fe7.jpg', 'extension': 'jpg'}, 1370018100: {'path': 'temp/1751475808_1641758_1370018100_c58ec3ad51e5b17981e02e06bb487430.jpg', 'extension': 'jpg'}, 1370018254: {'path': 'temp/1751475808_1641758_1370018254_8c2c2a936502e719fe74cbfa96642c64.jpg', 'extension': 'jpg'}, 1370018283: {'path': 'temp/1751475808_1641758_1370018283_30efbeda810a46fadcfa302999910efe.jpg', 'extension': 'jpg'}, 1370018415: {'path': 'temp/1751475808_1641758_1370018415_6a82b336fafbf3fdde5a0652f3615959.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 = 24516386; (('arc_en_ciel_jrm_live',),) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 24516386 group by h (('19', 10),) 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=24516386 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 (24516386) 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 (24516386) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 02072025 24516386 Nombre de photos uploadées : 10 / 23040 (0%) 02072025 24516386 Nombre de photos taguées (types de déchets): 0 / 10 (0%) 02072025 24516386 Nombre de photos taguées (volume) : 0 / 10 (0%) [{'photo_id': 1370018415, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/6a82b336fafbf3fdde5a0652f3615959.jpg', 'username': None, 'uploaded_at': 1751475692, 'text': 'image_02072025_19_00_14_10200.jpg'}, {'photo_id': 1370018441, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/1fe2dcb1f39da532d309553b735618e5.jpg', 'username': None, 'uploaded_at': 1751475692, 'text': 'image_02072025_19_00_14_10200.jpg'}, {'photo_id': 1370018254, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/8c2c2a936502e719fe74cbfa96642c64.jpg', 'username': None, 'uploaded_at': 1751475692, 'text': 'image_02072025_19_00_24_10140.jpg'}, {'photo_id': 1370018283, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/7/2/30efbeda810a46fadcfa302999910efe.jpg', 'username': None, 'uploaded_at': 1751475692, 'text': 'image_02072025_19_00_24_10140.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.1457672119140625e-06 elapsed_time : order_list_meta_photo_and_scores 5.7220458984375e-06 ?????????? elapsed_time : fill_and_build_computed_from_old_data 0.0005822181701660156 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 218, 24516386, '2025-07-02' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (1944441,979,"{}"); elapsed_time : insert_dashboard_record_day_entry 0.029417037963867188 We will return after consolidate but for now we need the day, how to get it, for now depending on the previous heavy steps SELECT dri.dashboard_entry_day, dr.dashboard_run_id, dr.mtr_portfolio_id, dr.id, dr.hashtag, dr.completion_json FROM MTRPhoto.dashboard_results dr, MTRPhoto.dashboard_run_ids dri, MTRPhoto.dashboard_entry_day ded WHERE ded.id= 1944441 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 1944441, 'dashboard_run_id': 1953691, 'mtr_portfolio_id': 24512566, 'dashboard_result_id': 12064463, '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_P24512566_02-07-2025_18_33_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24512598, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24512599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24512601, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24512602, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24512603, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24512605, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24512606, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24512607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24512608, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24512609, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24512610, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24512611, 'pht': 3726}}"}, {'dashboat_entry_day': 1944441, 'dashboard_run_id': 1953691, 'mtr_portfolio_id': 24513571, 'dashboard_result_id': 12064464, '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_P24513571_02-07-2025_18_47_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24513693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24513694, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24513695, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24513696, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24513697, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24513698, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24513699, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24513700, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24513701, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24513702, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24513704, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24513705, 'pht': 3726}}"}, {'dashboat_entry_day': 1944441, 'dashboard_run_id': 1953691, 'mtr_portfolio_id': 24515103, 'dashboard_result_id': 12064465, '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_P24515103_02-07-2025_19_02_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24515138, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24515140, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24515141, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24515142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24515144, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24515145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24515146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24515148, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24515149, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24515150, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24515153, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24515154, 'pht': 3726}}"}, {'dashboat_entry_day': 1944441, 'dashboard_run_id': 1953691, 'mtr_portfolio_id': 24516386, 'dashboard_result_id': 12064466, '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 = 24512566 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': 3227536, 'mtr_portfolio_id': 24512566, 'created_at': datetime.datetime(2025, 7, 2, 18, 33, 1), 'result': '0.03871122528666431', 'result_long': None, 'result_double': None}] Qualite : 0.03871122528666431 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24512566 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24512566_02-07-2025_18_33_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24512566 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_P24512566_02-07-2025_18_33_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24512598, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24512599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24512601, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24512602, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24512603, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24512605, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24512606, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24512607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24512608, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24512609, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24512610, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24512611, 'pht': 3726}}" where mtr_portfolio_id = 24512566 and dashboard_run_id = 1953691 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`=24512566 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12064463, 0.03871122528666431, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24512566_02-07-2025_18_33_01.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 24512598, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24512599, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24512601, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24512602, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24512603, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24512605, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24512606, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24512607, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24512608, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24512609, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24512610, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24512611, '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 = 24513571 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': 3227790, 'mtr_portfolio_id': 24513571, 'created_at': datetime.datetime(2025, 7, 2, 18, 47), 'result': '0.039334697438015875', 'result_long': None, 'result_double': None}] Qualite : 0.039334697438015875 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24513571 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24513571_02-07-2025_18_47_01.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24513571 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_P24513571_02-07-2025_18_47_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24513693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24513694, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24513695, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24513696, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24513697, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24513698, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24513699, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24513700, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24513701, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24513702, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24513704, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24513705, 'pht': 3726}}" where mtr_portfolio_id = 24513571 and dashboard_run_id = 1953691 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`=24513571 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12064464, 0.039334697438015875, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24513571_02-07-2025_18_47_01.pdf', 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24513693, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24513694, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24513695, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24513696, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24513697, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24513698, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24513699, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24513700, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24513701, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 24513702, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24513704, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24513705, '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 = 24515103 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': 3228299, 'mtr_portfolio_id': 24515103, 'created_at': datetime.datetime(2025, 7, 2, 19, 2, 57), 'result': '0.03147396150211139', 'result_long': None, 'result_double': None}] Qualite : 0.03147396150211139 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24515103 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24515103_02-07-2025_19_02_58.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24515103 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_P24515103_02-07-2025_19_02_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24515138, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24515140, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24515141, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24515142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24515144, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24515145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24515146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24515148, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24515149, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24515150, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24515153, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24515154, 'pht': 3726}}" where mtr_portfolio_id = 24515103 and dashboard_run_id = 1953691 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`=24515103 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (12064465, 0.03147396150211139, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24515103_02-07-2025_19_02_58.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 24515138, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 24515140, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 24515141, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 24515142, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 24515144, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 24515145, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 24515146, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 24515148, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 24515149, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 24515150, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 24515153, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 24515154, '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 = 24516386 AND result is not null and result<>"None" and result<>0.0 AND mtd_id=4302 ORDER BY id desc LIMIT 1 SELECT mtd_id, mtr_current_id, mtr_portfolio_id, created_at, result, result_long, result_double FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24516386 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ORDER BY created_at desc LIMIT 1 select value from MTRUser.portfolio_carac_ratio where portfolio_id = 24516386 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24516386 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 )and created_at < ( SELECT addtime(max(created_at),100) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 24516386 AND result is not null and result<>"None" and result=0.0 AND mtd_id=4302 ) order by value desc list_result_datou : [] select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 24516386 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P24516386_02-07-2025_19_03_29.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 24516386 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_P24516386_02-07-2025_19_03_29.pdf'}" where mtr_portfolio_id = 24516386 and dashboard_run_id = 1953691 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (24512566,24513571,24515103,24516386) result : ((1369995451,), (1369995453,), (1369995456,), (1369995459,), (1369995461,), (1369995462,), (1369995466,), (1369995470,), (1369995478,), (1369995481,), (1369995485,), (1369995487,), (1369995821,), (1369995861,), (1369995893,), (1369995925,), (1369995938,), (1369995940,), (1369995957,), (1369995962,), (1369995966,), (1369995969,), (1369995972,), (1369995976,), (1369995984,), (1369995990,), (1369995993,), (1369995999,), (1369996008,), (1369996009,), (1369996112,), (1369996116,), (1369996118,), (1369996121,), (1369996122,), (1369996128,), (1369996139,), (1369996171,), (1369996175,), (1369996195,), (1369996196,), (1369996207,), (1369996254,), (1369996264,), (1369996268,), (1369996274,), (1369996307,), (1369996334,), (1369996354,), (1369996360,), (1369996364,), (1369996372,), (1369996375,), (1369996378,), (1369996491,), (1369996533,), (1369996554,), (1369996590,), (1369996624,), (1369996626,), (1369996736,), (1369996770,), (1369996777,), (1369996810,), (1369996884,), (1369996892,), (1369996972,), (1369996976,), (1369996979,), (1369996995,), (1369997029,), (1369997063,), (1369997208,), (1369997213,), (1369997257,), (1369997261,), (1369997272,), (1369997307,), (1369997447,), (1369997490,), (1369997532,), (1369997599,), (1369997641,), (1369997681,), (1369997814,), (1369997902,), (1369997972,), (1369998045,), (1369998083,), (1369998117,), (1369998759,), (1369998810,), (1369998848,), (1369998934,), (1369998994,), (1369999035,), (1369999222,), (1369999264,), (1369999303,), (1369999343,), (1369999382,), (1369999426,), (1369999527,), (1369999532,), (1369999576,), (1369999632,), (1369999697,), (1369999760,), (1370000305,), (1370000339,), (1370000350,), (1370000381,), (1370000419,), (1370000466,), (1370000748,), (1370000783,), (1370000817,), (1370000853,), (1370000896,), (1370000955,), (1370001065,), (1370001075,), (1370001079,), (1370001093,), (1370001140,), (1370001153,), (1370001656,), (1370001659,), (1370001679,), (1370001705,), (1370001739,), (1370001783,), (1370001936,), (1370001998,), (1370002035,), (1370002080,), (1370002113,), (1370002179,), (1370002482,), (1370002593,), (1370002669,), (1370002737,), (1370002810,), (1370002901,), (1370003317,), (1370003394,), (1370003520,), (1370003651,), (1370003810,), (1370003925,), (1370004558,), (1370004559,), (1370004561,), (1370004563,), (1370004565,), (1370004567,), (1370004606,), (1370004609,), (1370004646,), (1370004649,), (1370004660,), (1370004662,), (1370004806,), (1370004869,), (1370004911,), (1370004945,), (1370004995,), (1370005059,), (1370005269,), (1370005311,), (1370005401,), (1370005477,), (1370005572,), (1370005694,), (1370007168,), (1370007283,), (1370007315,), (1370007346,), (1370007359,), (1370007363,), (1370007440,), (1370007441,), (1370007448,), (1370007449,), (1370007452,), (1370007454,), (1370007460,), (1370007461,), (1370007464,), (1370007466,), (1370007515,), (1370007532,), (1370007631,), (1370007642,), (1370007652,), (1370007706,), (1370007768,), (1370007844,), (1370008275,), (1370008406,), (1370008518,), (1370008655,), (1370008808,), (1370008915,), (1370009400,), (1370009402,), (1370009404,), (1370009405,), (1370009428,), (1370009432,), (1370009455,), (1370009459,), (1370009475,), (1370009476,), (1370009496,), (1370009503,), (1370009681,), (1370009729,), (1370009779,), (1370009820,), (1370009862,), (1370009898,), (1370010022,), (1370010069,), (1370010112,), (1370010158,), (1370010199,), (1370010234,), (1370010747,), (1370010789,), (1370010877,), (1370010939,), (1370010973,), (1370011008,), (1370011049,), (1370011054,), (1370011078,), (1370011081,), (1370011083,), (1370011107,), (1370011232,), (1370011269,), (1370011304,), (1370011342,), (1370011390,), (1370011456,), (1370012306,), (1370012389,), (1370012430,), (1370012500,), (1370012561,), (1370012643,), (1370012817,), (1370012864,), (1370012951,), (1370012979,), (1370013022,), (1370013062,), (1370013289,), (1370013372,), (1370013464,), (1370013560,), (1370013644,), (1370013713,), (1370014142,), (1370014207,), (1370014272,), (1370014311,), (1370014376,), (1370014449,), (1370014540,), (1370014548,), (1370014551,), (1370014567,), (1370014596,), (1370014600,), (1370014664,), (1370014696,), (1370014748,), (1370014820,), (1370014879,), (1370014949,), (1370016553,), (1370016642,), (1370016679,), (1370016687,), (1370016717,), (1370016739,), (1370017757,), (1370017772,), (1370017911,), (1370017930,), (1370018070,), (1370018100,), (1370018254,), (1370018283,), (1370018415,), (1370018441,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'02072025': {'nb_upload': 10, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([24516386]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] map_info['map_portfolio_photo'] : {24516386: [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757]} final : True mtd_id 4302 list_pids : [1370018441, 1370018415, 1370018283, 1370018254, 1370018100, 1370018070, 1370017930, 1370017911, 1370017772, 1370017757] Looping around the photos to save general results len do output : 1 /24516386Didn'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, '3228701') ('4302', '24516386', '1370018441', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018415', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018283', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018254', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018100', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370018070', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017930', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017911', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017772', None, None, None, None, None, '3228701') ('4302', None, None, None, None, None, None, None, '3228701') ('4302', '24516386', '1370017757', None, None, None, None, None, '3228701') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 11 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '24516386', 'None', None, None, None, None, '3228701'), ('4302', '24516386', '1370018441', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018415', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018283', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018254', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018100', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370018070', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017930', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017911', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017772', None, None, None, None, None, '3228701'), ('4302', '24516386', '1370017757', None, None, None, None, None, '3228701')] time used for this insertion : 0.0191648006439209 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.3368418216705322 time spend to save output : 0.019457101821899414 total time spend for step 5 : 0.35629892349243164 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 (3228701) 2.12user 2.18system 0:06.54elapsed 65%CPU (0avgtext+0avgdata 158532maxresident)k 128inputs+5248outputs (0major+63963minor)pagefaults 0swaps