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 : 2191098 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 (3825419) updating current state to 1 UPDATE MTRPhoto.mtr_datou_current SET state=1, hostname='marlene' WHERE id in (3825419) SELECT count(*) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27465946 AND hide_status = 0 list_input_json: [] Current got : datou_id : 4302, datou_cur_ids : ['3825419'] with mtr_portfolio_ids : ['27465946'] and first list_photo_ids : [] new path : /proc/2191098/ Name: python3 Umask: 0002 State: R (running) Tgid: 2191098 Ngid: 0 Pid: 2191098 PPid: 2191097 TracerPid: 0 Uid: 1006 1006 1006 1006 Gid: 1009 1009 1009 1009 FDSize: 64 Groups: 27 1009 1026 NStgid: 2191098 NSpid: 2191098 NSpgid: 2189867 NSsid: 2189867 VmPeak: 1106872 kB VmSize: 1106872 kB VmLck: 0 kB VmPin: 0 kB VmHWM: 99200 kB VmRSS: 99200 kB RssAnon: 59856 kB RssFile: 39344 kB RssShmem: 0 kB VmData: 865624 kB VmStk: 132 kB VmExe: 2644 kB VmLib: 130468 kB VmPTE: 604 kB VmSwap: 0 kB HugetlbPages: 0 kB CoreDumping: 0 THP_enabled: 1 Threads: 1 SigQ: 0/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: 55 nonvoluntary_ctxt_switches: 87 {'Name': 'python3', 'Umask': '0002', 'State': 'R (running)', 'Tgid': '2191098', 'Ngid': '0', 'Pid': '2191098', 'PPid': '2191097', 'TracerPid': '0', 'Uid': '1006,1006,1006,1006', 'Gid': '1009,1009,1009,1009', 'FDSize': '64', 'Groups': '27 1009 1026', 'NStgid': '2191098', 'NSpid': '2191098', 'NSpgid': '2189867', 'NSsid': '2189867', 'VmPeak': '1106872 kB', 'VmSize': '1106872 kB', 'VmLck': '0 kB', 'VmPin': '0 kB', 'VmHWM': '99200 kB', 'VmRSS': '99200 kB', 'RssAnon': '59856 kB', 'RssFile': '39344 kB', 'RssShmem': '0 kB', 'VmData': '865624 kB', 'VmStk': '132 kB', 'VmExe': '2644 kB', 'VmLib': '130468 kB', 'VmPTE': '604 kB', 'VmSwap': '0 kB', 'HugetlbPages': '0 kB', 'CoreDumping': '0', 'THP_enabled': '1', 'Threads': '1', 'SigQ': '0/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': '55', 'nonvoluntary_ctxt_switches': '87'} ('datou_batch_current', '2191098', '1106872', '0', '1106872', '865624', '99200', b'', 'marlene', '3825419') 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_view ph WHERE ph.photo_id IN (SELECT mtr_photo_id from MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id in (27465946) 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 (3825419 ) ) 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 (27465946) AND hide_status = 0 ORDER by mtr_photo_id desc LIMIT 0, 200 list_result: [{'photo_id': 1387528500, 'portfolio_id': 27465946}, {'photo_id': 1387528498, 'portfolio_id': 27465946}, {'photo_id': 1387528497, 'portfolio_id': 27465946}, {'photo_id': 1387528496, 'portfolio_id': 27465946}, {'photo_id': 1387528495, 'portfolio_id': 27465946}, {'photo_id': 1387528494, 'portfolio_id': 27465946}, {'photo_id': 1387528490, 'portfolio_id': 27465946}, {'photo_id': 1387528481, 'portfolio_id': 27465946}, {'photo_id': 1387528477, 'portfolio_id': 27465946}, {'photo_id': 1387528473, 'portfolio_id': 27465946}, {'photo_id': 1387528471, 'portfolio_id': 27465946}, {'photo_id': 1387528470, 'portfolio_id': 27465946}, {'photo_id': 1387528459, 'portfolio_id': 27465946}, {'photo_id': 1387528457, 'portfolio_id': 27465946}, {'photo_id': 1387528455, 'portfolio_id': 27465946}, {'photo_id': 1387528411, 'portfolio_id': 27465946}, {'photo_id': 1387528408, 'portfolio_id': 27465946}, {'photo_id': 1387528406, 'portfolio_id': 27465946}, {'photo_id': 1387528404, 'portfolio_id': 27465946}, {'photo_id': 1387528398, 'portfolio_id': 27465946}, {'photo_id': 1387528395, 'portfolio_id': 27465946}, {'photo_id': 1387528393, 'portfolio_id': 27465946}, {'photo_id': 1387528391, 'portfolio_id': 27465946}, {'photo_id': 1387528385, 'portfolio_id': 27465946}, {'photo_id': 1387528305, 'portfolio_id': 27465946}, {'photo_id': 1387528298, 'portfolio_id': 27465946}, {'photo_id': 1387528280, 'portfolio_id': 27465946}, {'photo_id': 1387528279, 'portfolio_id': 27465946}] map_portfolio_id_photo_id: {27465946: [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470, 1387528459, 1387528457, 1387528455, 1387528411, 1387528408, 1387528406, 1387528404, 1387528398, 1387528395, 1387528393, 1387528391, 1387528385, 1387528305, 1387528298, 1387528280, 1387528279]} ##### 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.05366826057434082 #### fin chargement data Blocking on flush ? No conitnuing About to test input to load Calling datou_exec Inside datou_exec : verbose : True number of steps : 5 step1:ventilate_hashtags_in_portfolio Fri Oct 3 02:36:59 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27465946) 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 : 27465946 get user id for portfolio 27465946 get sub ptf for main ptf 27465946, type 3726 and hashtags ['cartonnette', 'Carton_brun', 'metal', 'autre_refus', 'plastique', 'kraft', 'mal_croppe', 'Carton_gris', 'flou', 'environnement', 'Teint_Dans_La_Masse', 'papier'] 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`=27465946 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_brun','metal','autre_refus','plastique','kraft','mal_croppe','Carton_gris','flou','environnement','Teint_Dans_La_Masse','papier')) 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`=27465946 AND mptpi.`type`=3726 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_brun','metal','autre_refus','plastique','kraft','mal_croppe','Carton_gris','flou','environnement','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 27465946, 'sub_port_id': 27466004, 'hashtag': 'metal', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561712, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'mal_croppe': {'main_port_id': 27465946, 'sub_port_id': 27466005, 'hashtag': 'mal_croppe', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561713, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'Carton_brun': {'main_port_id': 27465946, 'sub_port_id': 27466006, 'hashtag': 'Carton_brun', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561714, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'cartonnette': {'main_port_id': 27465946, 'sub_port_id': 27466007, 'hashtag': 'cartonnette', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561715, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'kraft': {'main_port_id': 27465946, 'sub_port_id': 27466008, 'hashtag': 'kraft', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561716, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'Teint_Dans_La_Masse': {'main_port_id': 27465946, 'sub_port_id': 27466009, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561717, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'Carton_gris': {'main_port_id': 27465946, 'sub_port_id': 27466010, 'hashtag': 'Carton_gris', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561718, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'autre_refus': {'main_port_id': 27465946, 'sub_port_id': 27466011, 'hashtag': 'autre_refus', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561719, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'environnement': {'main_port_id': 27465946, 'sub_port_id': 27466013, 'hashtag': 'environnement', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561720, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'papier': {'main_port_id': 27465946, 'sub_port_id': 27466014, 'hashtag': 'papier', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561721, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'flou': {'main_port_id': 27465946, 'sub_port_id': 27466015, 'hashtag': 'flou', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561722, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}, 'plastique': {'main_port_id': 27465946, 'sub_port_id': 27466016, 'hashtag': 'plastique', 'pht': 3726, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561723, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 3), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 31)}} insert ignore into MTRUser.mtr_portfolio_photos (mtr_portfolio_id, mtr_photo_id, mtr_user_id,created_at) SELECT 27466004 , 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=27465946 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 (27466004) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466005 , 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=27465946 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 (27466005) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466006 , 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=27465946 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 (27466006) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466007 , 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=27465946 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 (27466007) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466008 , 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=27465946 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 (27466008) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466009 , 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=27465946 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 (27466009) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466010 , 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=27465946 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 (27466010) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466011 , 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=27465946 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 (27466011) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466013 , 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=27465946 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 (27466013) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466014 , 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=27465946 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 (27466014) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466015 , 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=27465946 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 (27466015) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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 27466016 , 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=27465946 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 (27466016) result : () SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27465946) result : ((1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) 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 (1387528500) 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`=27465946 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_brun','metal','autre_refus','plastique','kraft','mal_croppe','Carton_gris','flou','environnement','Teint_Dans_La_Masse','papier')) 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`=27465946 AND mptpi.`type`=4417 AND mptpi.`hashtag_id` in (select hashtag_id FROM MTRBack.hashtags where hashtag in ('cartonnette','Carton_brun','metal','autre_refus','plastique','kraft','mal_croppe','Carton_gris','flou','environnement','Teint_Dans_La_Masse','papier')) AND mptpi.`min_score`=0.5 To do returned map {'metal': {'main_port_id': 27465946, 'sub_port_id': 27466018, 'hashtag': 'metal', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561724, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'mal_croppe': {'main_port_id': 27465946, 'sub_port_id': 27466019, 'hashtag': 'mal_croppe', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561725, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'Carton_brun': {'main_port_id': 27465946, 'sub_port_id': 27466020, 'hashtag': 'Carton_brun', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561726, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'cartonnette': {'main_port_id': 27465946, 'sub_port_id': 27466021, 'hashtag': 'cartonnette', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561727, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'kraft': {'main_port_id': 27465946, 'sub_port_id': 27466022, 'hashtag': 'kraft', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561728, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'Teint_Dans_La_Masse': {'main_port_id': 27465946, 'sub_port_id': 27466023, 'hashtag': 'Teint_Dans_La_Masse', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561729, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'Carton_gris': {'main_port_id': 27465946, 'sub_port_id': 27466024, 'hashtag': 'Carton_gris', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561730, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'autre_refus': {'main_port_id': 27465946, 'sub_port_id': 27466025, 'hashtag': 'autre_refus', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561731, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'environnement': {'main_port_id': 27465946, 'sub_port_id': 27466026, 'hashtag': 'environnement', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561732, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'papier': {'main_port_id': 27465946, 'sub_port_id': 27466027, 'hashtag': 'papier', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561733, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'flou': {'main_port_id': 27465946, 'sub_port_id': 27466028, 'hashtag': 'flou', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561734, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 33, 36), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}, 'plastique': {'main_port_id': 27465946, 'sub_port_id': 27466029, 'hashtag': 'plastique', 'pht': 4417, 'min_score': 0.5, 'mtr_user_id': 979, 'id': 18561735, 'last_updated_at': datetime.datetime(2025, 10, 3, 2, 35, 4), 'last_updated_at_desc': datetime.datetime(2025, 10, 3, 2, 35, 4), 'last_updated_at_asc': datetime.datetime(2025, 10, 3, 2, 33, 36)}} insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466018,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466004 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466019,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466005 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466020,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466006 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466021,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466007 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466022,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466008 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466023,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466009 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466024,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466010 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466025,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466011 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466026,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466013 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466027,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466014 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466028,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466015 insert ignore into MTRUser.mtr_portfolio_photos(mtr_portfolio_id,mtr_photo_id,mtr_user_id) select 27466029,mtr_photo_id,mtr_user_id from MTRUser.mtr_portfolio_photos where mtr_portfolio_id = 27466016 lien utilise dans velours : https://marlene.fotonower.com/velours/27466018,27466019,27466020,27466021,27466022,27466023,27466024,27466025,27466026,27466027,27466028,27466029?tags=metal,mal_croppe,Carton_brun,cartonnette,kraft,Teint_Dans_La_Masse,Carton_gris,autre_refus,environnement,papier,flou,plastique After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27465946]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : ventilate_hashtags_in_portfolio we use saveGeneral [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] map_info['map_portfolio_photo'] : {27465946: [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470, 1387528459, 1387528457, 1387528455, 1387528411, 1387528408, 1387528406, 1387528404, 1387528398, 1387528395, 1387528393, 1387528391, 1387528385, 1387528305, 1387528298, 1387528280, 1387528279]} final : False mtd_id 4302 list_pids : [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] Looping around the photos to save general results len do output : 1 /27465946. 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, '3825419') ('4302', '27465946', '1387528500', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528498', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528497', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528496', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528495', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528494', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528490', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528481', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528477', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528473', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528471', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528470', None, None, None, None, None, '3825419') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27465946', "{'metal': 27466004, 'mal_croppe': 27466005, 'Carton_brun': 27466006, 'cartonnette': 27466007, 'kraft': 27466008, 'Teint_Dans_La_Masse': 27466009, 'Carton_gris': 27466010, 'autre_refus': 27466011, 'environnement': 27466013, 'papier': 27466014, 'flou': 27466015, 'plastique': 27466016}", None, None, None, None, '3825419'), ('4302', '27465946', '1387528500', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528498', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528497', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528496', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528495', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528494', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528490', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528481', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528477', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528473', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528471', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528470', None, None, None, None, None, '3825419')] time used for this insertion : 0.03864169120788574 save_final save missing photos in datou_result : time spend for datou_step_exec : 1.6477420330047607 time spend to save output : 0.039025068283081055 total time spend for step 1 : 1.6867671012878418 step2:final Fri Oct 3 02:37:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :0, first value : [] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27465946) 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 27465946 : SELECT photo_id, hashtag_id, ratio from MTRPhoto.photo_carac_ratio where hashtag_type = 3726 and photo_id in (1387528305,1387528298,1387528280,1387528279,1387528398,1387528395,1387528393,1387528391,1387528385,1387528411,1387528408,1387528406,1387528404,1387528495,1387528459,1387528457,1387528494,1387528490,1387528455,1387528481,1387528477,1387528473,1387528471,1387528470,1387528500,1387528498,1387528497,1387528496); After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27465946]) Inside saveOutput : final : False verbose : True original output for save of step final : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} new output for save of step final : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] map_info['map_portfolio_photo'] : {27465946: [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470, 1387528459, 1387528457, 1387528455, 1387528411, 1387528408, 1387528406, 1387528404, 1387528398, 1387528395, 1387528393, 1387528391, 1387528385, 1387528305, 1387528298, 1387528280, 1387528279]} final : False mtd_id 4302 list_pids : [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] Looping around the photos to save general results len do output : 12 /1387528500.Didn't retrieve data . /1387528498.Didn't retrieve data . /1387528497.Didn't retrieve data . /1387528496.Didn't retrieve data . /1387528495.Didn't retrieve data . /1387528494.Didn't retrieve data . /1387528490.Didn't retrieve data . /1387528481.Didn't retrieve data . /1387528477.Didn't retrieve data . /1387528473.Didn't retrieve data . /1387528471.Didn't retrieve data . /1387528470.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, '3825419') ('4302', '27465946', '1387528500', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528498', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528497', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528496', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528495', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528494', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528490', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528481', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528477', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528473', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528471', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528470', None, None, None, None, None, '3825419') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 36 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27465946', '1387528500', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528498', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528497', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528496', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528495', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528494', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528490', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528481', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528477', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528473', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528471', '0.0', None, None, None, None, '3825419'), ('4302', '27465946', '1387528470', '0.0', None, None, None, None, '3825419')] time used for this insertion : 0.03673863410949707 save_final save missing photos in datou_result : time spend for datou_step_exec : 0.20885515213012695 time spend to save output : 0.03742241859436035 total time spend for step 2 : 0.2462775707244873 step3:velours_tree Fri Oct 3 02:37:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed complete output_args for input 0 : {27465946: [{'metal': 27466004, 'mal_croppe': 27466005, 'Carton_brun': 27466006, 'cartonnette': 27466007, 'kraft': 27466008, 'Teint_Dans_La_Masse': 27466009, 'Carton_gris': 27466010, 'autre_refus': 27466011, 'environnement': 27466013, 'papier': 27466014, 'flou': 27466015, 'plastique': 27466016}]} input_args_next_step : {27465946: ()} output_args : {27465946: [{'metal': 27466004, 'mal_croppe': 27466005, 'Carton_brun': 27466006, 'cartonnette': 27466007, 'kraft': 27466008, 'Teint_Dans_La_Masse': 27466009, 'Carton_gris': 27466010, 'autre_refus': 27466011, 'environnement': 27466013, 'papier': 27466014, 'flou': 27466015, 'plastique': 27466016}]} args : 27465946 depend.output_id : 0 VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :1, first value : ({'metal': 27466004, 'mal_croppe': 27466005, 'Carton_brun': 27466006, 'cartonnette': 27466007, 'kraft': 27466008, 'Teint_Dans_La_Masse': 27466009, 'Carton_gris': 27466010, 'autre_refus': 27466011, 'environnement': 27466013, 'papier': 27466014, 'flou': 27466015, 'plastique': 27466016},) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27465946) 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([27465946]) 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.3633098602294922 time spend to save output : 4.2438507080078125e-05 total time spend for step 3 : 0.36335229873657227 step4:send_mail_cod Fri Oct 3 02:37:01 2025 VR 17-11-17 : now, only for linear exec dependencies tree, some output goes to fill the input of the next VR 22-3-18 : now we test the dependencies tree, but keep two separate code for datou_prepare_output_input until the code is correctly tested, clean and works in both case VR 22-3-18 : but we use the first code for the first step id = -1, build in the code of datou_exec VR 22-3-18 : we should manage here the case when we are at the first step instead of building this step before datou_exec Currently we do not manage missing dependencies information, that could maybe be correctly interpreted with default behavior Some of the step done at execution of the step could be done before when the tree of execution is build and the dependencies of different step analysed We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! complete output_args for input 2 : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} input_args_next_step : {1387528500: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528500 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528498 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528497 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528496 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528495 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528494 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528490 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528481 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528477 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528473 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528471 depend.output_id : 0 input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ()} output_args : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',)} args : 1387528470 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 : {27465946: [{'metal': 27466004, 'mal_croppe': 27466005, 'Carton_brun': 27466006, 'cartonnette': 27466007, 'kraft': 27466008, 'Teint_Dans_La_Masse': 27466009, 'Carton_gris': 27466010, 'autre_refus': 27466011, 'environnement': 27466013, 'papier': 27466014, 'flou': 27466015, 'plastique': 27466016}]} input_args_next_step : {1387528500: ('0.0',), 1387528498: ('0.0',), 1387528497: ('0.0',), 1387528496: ('0.0',), 1387528495: ('0.0',), 1387528494: ('0.0',), 1387528490: ('0.0',), 1387528481: ('0.0',), 1387528477: ('0.0',), 1387528473: ('0.0',), 1387528471: ('0.0',), 1387528470: ('0.0',), 27465946: ()} output_args : {27465946: [{'metal': 27466004, 'mal_croppe': 27466005, 'Carton_brun': 27466006, 'cartonnette': 27466007, 'kraft': 27466008, 'Teint_Dans_La_Masse': 27466009, 'Carton_gris': 27466010, 'autre_refus': 27466011, 'environnement': 27466013, 'papier': 27466014, 'flou': 27466015, 'plastique': 27466016}]} args : 27465946 depend.output_id : 0 We should have FATAL ERROR but same_nb_input_output==True : this should be an optionnal input ! VR 22-3-18 : For now we do not clean correctly the datou structure input_args_next_step, len :13, first value : ('0.0',) After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27465946) 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_view ph WHERE photo_id IN (1387528500,1387528498,1387528497,1387528496,1387528495,1387528494,1387528490,1387528481,1387528477,1387528473,1387528471,1387528470) Found this number of photos: 12 ##### Call download_photos : nb_thread : 5 begin to download photo : 1387528470 begin to download photo : 1387528477 begin to download photo : 1387528494 begin to download photo : 1387528497 download finish for photo 1387528470 begin to download photo : 1387528471 download finish for photo 1387528494 begin to download photo : 1387528495 download finish for photo 1387528477 begin to download photo : 1387528481 download finish for photo 1387528497 begin to download photo : 1387528498 download finish for photo 1387528481 begin to download photo : 1387528490 download finish for photo 1387528471 begin to download photo : 1387528473 download finish for photo 1387528498 begin to download photo : 1387528500 download finish for photo 1387528495 begin to download photo : 1387528496 download finish for photo 1387528473 download finish for photo 1387528496 download finish for photo 1387528490 download finish for photo 1387528500 we have missing 0 photos in the step downloads : photo missing : [] try to delete the photos missing in DB ##### After download_photos imagette274660041759451822/ imagette274660051759451822/ imagette274660071759451822/ imagette274660081759451822/ imagette274660111759451822/ imagette274660151759451822/ imagette274660161759451822/ imagette274660061759451822/ imagette274660091759451822/ imagette274660101759451822/ length of list_filenames : 12 ; length of list_pids : 12 ; length of list_args : 12 results_Auto_P27465946_03-10-2025_02_37_02.pdf 27466004 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466004 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660041759451822 27466005 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466005 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660051759451822 27466007 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466007 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660071759451822 27466008 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466008 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660081759451822 27466011 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466011 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660111759451822 27466015 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466015 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660151759451822 27466016 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466016 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660161759451822 27466006 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466006 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660061759451822 27466009 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466009 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660091759451822 27466010 SELECT ph.photo_id,ph.url,ph.username,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27466010 AND mpp.hide_status=0 ORDER BY mpp.order LIMIT 0, 20 map_photo_id_text : {} imagette274660101759451822 SELECT h.hashtag,pcr.value FROM MTRUser.portfolio_carac_ratio pcr, MTRBack.hashtags h where pcr.portfolio_id=27465946 and hashtag_type = 3726 and pcr.hashtag_id = h.hashtag_id; velour_link : https://marlene.fotonower.com/velours/27466018,27466019,27466020,27466021,27466022,27466023,27466024,27466025,27466026,27466027,27466028,27466029?tags=metal,mal_croppe,Carton_brun,cartonnette,kraft,Teint_Dans_La_Masse,Carton_gris,autre_refus,environnement,papier,flou,plastique your option no_mail is active, we will not send the real mail to your client args[1387528500] : ('0.0',) no score found for photo 1387528500 We are sending mail with results at report@fotonower.com args[1387528498] : ('0.0',) no score found for photo 1387528498 We are sending mail with results at report@fotonower.com args[1387528497] : ('0.0',) no score found for photo 1387528497 We are sending mail with results at report@fotonower.com args[1387528496] : ('0.0',) no score found for photo 1387528496 We are sending mail with results at report@fotonower.com args[1387528495] : ('0.0',) no score found for photo 1387528495 We are sending mail with results at report@fotonower.com args[1387528494] : ('0.0',) no score found for photo 1387528494 We are sending mail with results at report@fotonower.com args[1387528490] : ('0.0',) no score found for photo 1387528490 We are sending mail with results at report@fotonower.com args[1387528481] : ('0.0',) no score found for photo 1387528481 We are sending mail with results at report@fotonower.com args[1387528477] : ('0.0',) no score found for photo 1387528477 We are sending mail with results at report@fotonower.com args[1387528473] : ('0.0',) no score found for photo 1387528473 We are sending mail with results at report@fotonower.com args[1387528471] : ('0.0',) no score found for photo 1387528471 We are sending mail with results at report@fotonower.com args[1387528470] : ('0.0',) no score found for photo 1387528470 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_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27465946 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_P27465946_03-10-2025_02_37_02.pdf results_Auto_P27465946_03-10-2025_02_37_02.pdf uploaded to url https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27465946_03-10-2025_02_37_02.pdf start insert file to database insert into MTRUser.mtr_files (mtd_id,mtr_portfolio_id,text,url,format,tags,file_size,value) values ('4302','27465946','results_Auto_P27465946_03-10-2025_02_37_02.pdf','https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27465946_03-10-2025_02_37_02.pdf','pdf','','0.11','0.0') After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27465946]) Inside saveOutput : final : False verbose : True saveOutput not yet implemented for datou_step.type : send_mail_cod we use saveGeneral [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] map_info['map_portfolio_photo'] : {27465946: [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470, 1387528459, 1387528457, 1387528455, 1387528411, 1387528408, 1387528406, 1387528404, 1387528398, 1387528395, 1387528393, 1387528391, 1387528385, 1387528305, 1387528298, 1387528280, 1387528279]} final : False mtd_id 4302 list_pids : [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] 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, '3825419') ('4302', '27465946', '1387528500', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528498', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528497', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528496', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528495', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528494', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528490', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528481', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528477', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528473', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528471', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528470', None, None, None, None, None, '3825419') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 12 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', '27465946', '1387528500', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528498', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528497', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528496', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528495', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528494', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528490', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528481', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528477', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528473', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528471', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528470', None, None, None, None, None, '3825419')] time used for this insertion : 0.0378267765045166 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.2612991333007812 time spend to save output : 0.03804135322570801 total time spend for step 4 : 2.2993404865264893 step5:split_time_score Fri Oct 3 02:37:03 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 : ['27465946'] 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 : [('27465946',)] After prepare type args : select max(UNIX_TIMESTAMP(created_at)) from MTRUser.mtr_portfolio_photos where mtr_portfolio_id in (27465946) Here we display some param of map_info ! map_filenames : {} map_photo_id_path_extension : {1387528470: {'path': 'temp/1759451821_2191098_1387528470_e018f79e8cd860af35a1a7d2d0680436.jpg', 'extension': 'jpg'}, 1387528471: {'path': 'temp/1759451821_2191098_1387528471_4877d5bdb562b49ef08b2b6fa5fdbe9f.jpg', 'extension': 'jpg'}, 1387528473: {'path': 'temp/1759451821_2191098_1387528473_1100e6da4b81e884129df75fdf7429c7.jpg', 'extension': 'jpg'}, 1387528494: {'path': 'temp/1759451821_2191098_1387528494_b11e310a5ef51e1e218fd31faaef2d6a.jpg', 'extension': 'jpg'}, 1387528495: {'path': 'temp/1759451821_2191098_1387528495_46d1d28543d7f8c988c85ea562db8bf3.jpg', 'extension': 'jpg'}, 1387528496: {'path': 'temp/1759451821_2191098_1387528496_8abe51dd4bab96f686e3023796c05388.jpg', 'extension': 'jpg'}, 1387528477: {'path': 'temp/1759451821_2191098_1387528477_93a14d1eb82d94e4f94de114d2382a72.jpg', 'extension': 'jpg'}, 1387528481: {'path': 'temp/1759451821_2191098_1387528481_716be521bc4f9dea38a4347dc039b32d.jpg', 'extension': 'jpg'}, 1387528490: {'path': 'temp/1759451821_2191098_1387528490_723959a0ff7546794bd197867ac83c20.jpg', 'extension': 'jpg'}, 1387528497: {'path': 'temp/1759451821_2191098_1387528497_683ca5048c02d930ced6209e22778c21.jpg', 'extension': 'jpg'}, 1387528498: {'path': 'temp/1759451821_2191098_1387528498_48bd2ca5dc09af332424b4c3c591a084.jpg', 'extension': 'jpg'}, 1387528500: {'path': 'temp/1759451821_2191098_1387528500_fb631836e04f2650670083aa4b8082dc.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 = 27465946; (('arc_en_ciel_jrm_live',), ('arc_en_ciel_jrm',)) TODO : Insert select and so on Begin split_port_in_batch_balle thcls : [{'id': 861, 'mtr_user_id': 31, 'name': 'Rungis_class_dechets_1212', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': 'Rungis_Aluminium,Rungis_Carton,Rungis_Papier,Rungis_Plastique_clair,Rungis_Plastique_dur,Rungis_Plastique_fonce,Rungis_Tapis_vide,Rungis_Tetrapak', 'svm_portfolios_learning': '1160730,571842,571844,571839,571933,571840,571841,572307', 'photo_hashtag_type': 999, 'photo_desc_type': 3963, 'type_classification': 'caffe', 'hashtag_id_list': '2107751280,2107750907,2107750908,2107750909,2107750910,2107750911,2107750912,2107750913'}] thcls : [{'id': 758, 'mtr_user_id': 31, 'name': 'Rungis_amount_dechets_fall_2018_v2', 'pb_hashtag_id': 0, 'live': b'\x00', 'list_hashtags': '05102018_Papier_non_papier_dense,05102018_Papier_non_papier_peu_dense,05102018_Papier_non_papier_presque_vide,05102018_Papier_non_papier_tres_dense,05102018_Papier_non_papier_tres_peu_dense', 'svm_portfolios_learning': '1108385,1108386,1108388,1108384,1108387', 'photo_hashtag_type': 856, 'photo_desc_type': 3853, 'type_classification': 'caffe', 'hashtag_id_list': '2107751013,2107751014,2107751015,2107751016,2107751017'}] select SUBSTRING(ph.text,16,2) as h, count(*) from MTRUser.mtr_portfolio_photos mpp inner join MTRBack.photos_view ph on mpp.mtr_photo_id = ph.photo_id where mpp.mtr_portfolio_id = 27465946 group by h (('02', 28),) SELECT ph.photo_id,ph.url,ph.username,ph.uploaded_at,ph.text FROM MTRBack.photos_view ph, MTRUser.mtr_portfolio_photos mpp WHERE ph.photo_id=mpp.mtr_photo_id AND mpp.mtr_portfolio_id=27465946 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 (27465946) 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 (27465946) AND cps.thcl in (758) order by cps.score desc LIMIT 0, 100000 ERROR counted https://github.com/fotonower/Velours/issues/663#issuecomment-421136223 {} 03102025 27465946 Nombre de photos uploadées : 28 / 23040 (0%) 03102025 27465946 Nombre de photos taguées (types de déchets): 0 / 28 (0%) 03102025 27465946 Nombre de photos taguées (volume) : 0 / 28 (0%) [{'photo_id': 1387528305, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/cf51194188395ccce2f8109929cc95ca.jpg', 'username': None, 'uploaded_at': 1759451472, 'text': 'image_03102025_02_30_04_10138.jpg'}, {'photo_id': 1387528298, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/6af62f878a29977c1bc4dbdf75f86bf8.jpg', 'username': None, 'uploaded_at': 1759451472, 'text': 'image_03102025_02_30_24_10135.jpg'}, {'photo_id': 1387528280, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/b8e1358bac9e1a26e69a07a3201393ac.jpg', 'username': None, 'uploaded_at': 1759451472, 'text': 'image_03102025_02_30_34_10148.jpg'}, {'photo_id': 1387528279, 'url': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/2025/10/3/facd6d1fc8702ab1c01e8505b291c07a.jpg', 'username': None, 'uploaded_at': 1759451472, 'text': 'image_03102025_02_30_44_10148.jpg'}] 0 [] elapsed_time : load_data_split_time_score 2.86102294921875e-06 elapsed_time : order_list_meta_photo_and_scores 1.0013580322265625e-05 ???????????????????????????? elapsed_time : fill_and_build_computed_from_old_data 0.0012569427490234375 INSERT INTO `MTRPhoto`.`dashboard_entry_day` (`dashboard_place_id`, `mtr_portfolio_id`, `date`) VALUES ( 10, 27465946, '2025-10-03' ) ON DUPLICATE KEY UPDATE updated_at=NOW(); Catched exception ! Connect or reconnect ! SELECT id FROM MTRPhoto.dashboard_entry_day where dashboard_place_id = 10 and date = '2025-10-03' ; INSERT INTO `MTRPhoto`.`dashboard_run_ids` (`dashboard_entry_day`, `mtr_user_id`, `misc_info`) VALUES (2385431,979,"{}"); Catched exception ! Connect or reconnect ! elapsed_time : insert_dashboard_record_day_entry 0.6537415981292725 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= 2385431 AND ded.last_run_id=dri.id AND dri.dashboard_entry_day=ded.id AND dri.id=dr.dashboard_run_id [{'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27462418, 'dashboard_result_id': 15956363, '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_P27462418_03-10-2025_00_17_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27462421, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27462422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27462423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27462424, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27462425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27462426, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27462427, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27462428, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27462429, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27462430, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27462431, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27462432, 'pht': 3726}}"}, {'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27462676, 'dashboard_result_id': 15956365, '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_P27462676_03-10-2025_00_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27462762, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27462763, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27462764, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27462765, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27462766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27462767, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27462768, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27462769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27462770, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27462771, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27462772, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27462773, 'pht': 3726}}"}, {'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27463016, 'dashboard_result_id': 15956366, '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_P27463016_03-10-2025_02_01_10.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27463053, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27463054, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27463055, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27463056, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27463057, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27463058, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27463059, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27463060, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27463061, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27463062, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27463063, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27463064, 'pht': 3726}}"}, {'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27464289, 'dashboard_result_id': 15956367, '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_P27464289_03-10-2025_01_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464291, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464292, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27464296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464297, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464299, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464300, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464302, 'pht': 3726}}"}, {'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27464603, 'dashboard_result_id': 15956368, '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_P27464603_03-10-2025_02_03_32.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27464636, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464638, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464640, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464641, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464645, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464646, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464647, 'pht': 3726}}"}, {'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27464951, 'dashboard_result_id': 15956370, '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_P27464951_03-10-2025_02_19_05.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464959, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27464961, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464962, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464963, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464964, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464965, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464966, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464967, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464968, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464969, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464970, 'pht': 3726}}"}, {'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27465533, 'dashboard_result_id': 15956371, '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_P27465533_03-10-2025_02_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27465546, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27465547, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27465548, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27465549, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27465550, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27465551, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27465552, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27465553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27465554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27465555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27465556, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27465557, 'pht': 3726}}"}, {'dashboat_entry_day': 2385431, 'dashboard_run_id': 2393341, 'mtr_portfolio_id': 27465946, 'dashboard_result_id': 15956372, '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_P27465946_03-10-2025_02_35_05.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27466004, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27466005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27466006, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27466007, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27466008, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27466009, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27466010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27466011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27466013, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27466014, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27466015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27466016, 'pht': 3726}}"}] 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 = 27462418 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': 3824492, 'mtr_portfolio_id': 27462418, 'created_at': datetime.datetime(2025, 10, 3, 0, 16, 59), 'result': '0.07284098671355134', 'result_long': None, 'result_double': None}] Qualite : 0.07284098671355134 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27462418 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27462418_03-10-2025_00_17_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27462418 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_P27462418_03-10-2025_00_17_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27462421, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27462422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27462423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27462424, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27462425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27462426, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27462427, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27462428, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27462429, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27462430, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27462431, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27462432, 'pht': 3726}}" where mtr_portfolio_id = 27462418 and dashboard_run_id = 2393341 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`=27462418 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15956363, 0.07284098671355134, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27462418_03-10-2025_00_17_00.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27462421, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27462422, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27462423, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27462424, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27462425, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27462426, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27462427, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27462428, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27462429, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27462430, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27462431, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27462432, '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 = 27462676 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': 3824542, 'mtr_portfolio_id': 27462676, 'created_at': datetime.datetime(2025, 10, 3, 0, 32, 59), 'result': '0.06166800167312151', 'result_long': None, 'result_double': None}] Qualite : 0.06166800167312151 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27462676 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27462676_03-10-2025_00_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27462676 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_P27462676_03-10-2025_00_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27462762, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27462763, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27462764, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27462765, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27462766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27462767, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27462768, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27462769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27462770, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27462771, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27462772, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27462773, 'pht': 3726}}" where mtr_portfolio_id = 27462676 and dashboard_run_id = 2393341 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`=27462676 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15956365, 0.06166800167312151, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27462676_03-10-2025_00_33_00.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27462762, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27462763, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27462764, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27462765, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27462766, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27462767, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27462768, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27462769, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27462770, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27462771, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27462772, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27462773, '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 = 27463016 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': 3824658, 'mtr_portfolio_id': 27463016, 'created_at': datetime.datetime(2025, 10, 3, 2, 1, 10), 'result': '0.0718688175243236', 'result_long': None, 'result_double': None}] Qualite : 0.0718688175243236 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27463016 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27463016_03-10-2025_02_01_10.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27463016 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_P27463016_03-10-2025_02_01_10.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27463053, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27463054, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27463055, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27463056, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27463057, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27463058, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27463059, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27463060, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27463061, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27463062, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27463063, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27463064, 'pht': 3726}}" where mtr_portfolio_id = 27463016 and dashboard_run_id = 2393341 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`=27463016 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15956366, 0.0718688175243236, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27463016_03-10-2025_02_01_10.pdf', 'papier': {'hashtag': 'papier', 'sub_port_id': 27463053, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27463054, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27463055, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27463056, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27463057, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27463058, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27463059, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27463060, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27463061, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27463062, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27463063, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27463064, '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 = 27464289 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': 3824983, 'mtr_portfolio_id': 27464289, 'created_at': datetime.datetime(2025, 10, 3, 1, 48, 59), 'result': '0.06050951279135282', 'result_long': None, 'result_double': None}] Qualite : 0.06050951279135282 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27464289 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27464289_03-10-2025_01_48_59.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27464289 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_P27464289_03-10-2025_01_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464291, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464292, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27464296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464297, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464299, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464300, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464302, 'pht': 3726}}" where mtr_portfolio_id = 27464289 and dashboard_run_id = 2393341 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`=27464289 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15956367, 0.06050951279135282, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27464289_03-10-2025_01_48_59.pdf', 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464291, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464292, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464293, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464294, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464295, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27464296, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464297, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464298, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464299, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464300, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464301, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464302, '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 = 27464603 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': 3825036, 'mtr_portfolio_id': 27464603, 'created_at': datetime.datetime(2025, 10, 3, 2, 3, 32), 'result': '0.07199911398575003', 'result_long': None, 'result_double': None}] Qualite : 0.07199911398575003 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27464603 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27464603_03-10-2025_02_03_32.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27464603 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_P27464603_03-10-2025_02_03_32.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27464636, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464638, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464640, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464641, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464645, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464646, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464647, 'pht': 3726}}" where mtr_portfolio_id = 27464603 and dashboard_run_id = 2393341 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`=27464603 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15956368, 0.07199911398575003, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27464603_03-10-2025_02_03_32.pdf', 'flou': {'hashtag': 'flou', 'sub_port_id': 27464636, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464637, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464638, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464639, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464640, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464641, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464642, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464643, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464644, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464645, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464646, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464647, '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 = 27464951 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': 3825150, 'mtr_portfolio_id': 27464951, 'created_at': datetime.datetime(2025, 10, 3, 2, 19, 4), 'result': '0.06823524748753547', 'result_long': None, 'result_double': None}] Qualite : 0.06823524748753547 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27464951 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27464951_03-10-2025_02_19_05.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27464951 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_P27464951_03-10-2025_02_19_05.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464959, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27464961, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464962, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464963, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464964, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464965, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464966, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464967, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464968, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464969, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464970, 'pht': 3726}}" where mtr_portfolio_id = 27464951 and dashboard_run_id = 2393341 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`=27464951 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15956370, 0.06823524748753547, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27464951_03-10-2025_02_19_05.pdf', 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27464959, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27464960, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27464961, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27464962, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27464963, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27464964, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27464965, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27464966, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27464967, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27464968, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27464969, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27464970, '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 = 27465533 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': 3825245, 'mtr_portfolio_id': 27465533, 'created_at': datetime.datetime(2025, 10, 3, 2, 32, 59), 'result': '0.05061794368164912', 'result_long': None, 'result_double': None}] Qualite : 0.05061794368164912 select url from MTRUser.mtr_files where mtd_id = 4302 and mtr_portfolio_id = 27465533 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27465533_03-10-2025_02_33_00.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27465533 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_P27465533_03-10-2025_02_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27465546, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27465547, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27465548, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27465549, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27465550, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27465551, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27465552, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27465553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27465554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27465555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27465556, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27465557, 'pht': 3726}}" where mtr_portfolio_id = 27465533 and dashboard_run_id = 2393337 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`=27465533 AND mptpi.`type`=3726 To do INSERT IGNORE INTO MTRPhoto.dashboard_results (id, qualite, completion_json) VALUES (15956371, 0.05061794368164912, "{'max_time_prod_two_photos': 0, 'url_report': 'https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27465533_03-10-2025_02_33_00.pdf', 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27465546, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27465547, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27465548, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27465549, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27465550, 'pht': 3726}, 'metal': {'hashtag': 'metal', 'sub_port_id': 27465551, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27465552, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27465553, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27465554, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27465555, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27465556, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27465557, '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 = 27465946 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 = 27465946 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 = 27465946 and created_at >= ( SELECT min(created_at) FROM MTRPhoto.mtr_datou_result WHERE mtr_portfolio_id = 27465946 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 = 27465946 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 = 27465946 order by file_id desc limit 1 find url: https://storage.sbg.cloud.ovh.net/v1/AUTH_3b171620e76e4af496c5fd050759c9f0/media.fotonower.com/results_Auto_P27465946_03-10-2025_02_37_02.pdf select completion_json, dashboard_run_id from MTRPhoto.dashboard_results where mtr_portfolio_id = 27465946 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_P27465946_03-10-2025_02_37_02.pdf', 'metal': {'hashtag': 'metal', 'sub_port_id': 27466004, 'pht': 3726}, 'mal_croppe': {'hashtag': 'mal_croppe', 'sub_port_id': 27466005, 'pht': 3726}, 'Carton_brun': {'hashtag': 'Carton_brun', 'sub_port_id': 27466006, 'pht': 3726}, 'cartonnette': {'hashtag': 'cartonnette', 'sub_port_id': 27466007, 'pht': 3726}, 'kraft': {'hashtag': 'kraft', 'sub_port_id': 27466008, 'pht': 3726}, 'Teint_Dans_La_Masse': {'hashtag': 'Teint_Dans_La_Masse', 'sub_port_id': 27466009, 'pht': 3726}, 'Carton_gris': {'hashtag': 'Carton_gris', 'sub_port_id': 27466010, 'pht': 3726}, 'autre_refus': {'hashtag': 'autre_refus', 'sub_port_id': 27466011, 'pht': 3726}, 'environnement': {'hashtag': 'environnement', 'sub_port_id': 27466013, 'pht': 3726}, 'papier': {'hashtag': 'papier', 'sub_port_id': 27466014, 'pht': 3726}, 'flou': {'hashtag': 'flou', 'sub_port_id': 27466015, 'pht': 3726}, 'plastique': {'hashtag': 'plastique', 'sub_port_id': 27466016, 'pht': 3726}}" where mtr_portfolio_id = 27465946 and dashboard_run_id = 2393337 SELECT mtr_photo_id FROM MTRUser.mtr_portfolio_photos WHERE mtr_portfolio_id IN (27462418,27462676,27463016,27464289,27464603,27464951,27465533,27465946) result : ((1387512208,), (1387512211,), (1387512233,), (1387512235,), (1387512237,), (1387512238,), (1387512241,), (1387512247,), (1387512249,), (1387512253,), (1387512255,), (1387512265,), (1387512266,), (1387512267,), (1387512269,), (1387512272,), (1387513067,), (1387513068,), (1387513070,), (1387513073,), (1387513077,), (1387513091,), (1387513098,), (1387513099,), (1387513419,), (1387513420,), (1387513470,), (1387513472,), (1387513475,), (1387513550,), (1387513556,), (1387513563,), (1387513565,), (1387513568,), (1387513600,), (1387513601,), (1387513602,), (1387513604,), (1387513607,), (1387513609,), (1387513622,), (1387513624,), (1387513625,), (1387514849,), (1387514850,), (1387514851,), (1387514853,), (1387515205,), (1387515206,), (1387515207,), (1387515209,), (1387515215,), (1387515223,), (1387515224,), (1387515225,), (1387515227,), (1387515230,), (1387515263,), (1387515266,), (1387515271,), (1387515282,), (1387515285,), (1387515288,), (1387515301,), (1387515302,), (1387515303,), (1387515342,), (1387515343,), (1387515346,), (1387515349,), (1387515354,), (1387515358,), (1387515501,), (1387515503,), (1387515568,), (1387515539,), (1387515540,), (1387515565,), (1387515649,), (1387515650,), (1387515651,), (1387515653,), (1387515665,), (1387515666,), (1387515667,), (1387515679,), (1387515710,), (1387515711,), (1387515712,), (1387515714,), (1387515718,), (1387515778,), (1387515779,), (1387515780,), (1387515782,), (1387515800,), (1387515801,), (1387515802,), (1387515805,), (1387515820,), (1387515822,), (1387515824,), (1387515827,), (1387515831,), (1387515849,), (1387515851,), (1387515853,), (1387515856,), (1387515859,), (1387515863,), (1387515883,), (1387515886,), (1387515890,), (1387515894,), (1387515898,), (1387515901,), (1387515905,), (1387515906,), (1387515907,), (1387515908,), (1387515910,), (1387515913,), (1387515931,), (1387515933,), (1387515935,), (1387515937,), (1387515968,), (1387515969,), (1387515987,), (1387515995,), (1387516014,), (1387516016,), (1387516018,), (1387516052,), (1387516054,), (1387516055,), (1387516060,), (1387516064,), (1387516108,), (1387516113,), (1387516115,), (1387516116,), (1387516117,), (1387516118,), (1387516079,), (1387516088,), (1387516095,), (1387516098,), (1387516105,), (1387516119,), (1387516121,), (1387516124,), (1387516127,), (1387516143,), (1387516145,), (1387516146,), (1387516148,), (1387516345,), (1387516365,), (1387522155,), (1387522141,), (1387522148,), (1387522153,), (1387522187,), (1387522188,), (1387522189,), (1387522191,), (1387522217,), (1387522222,), (1387522226,), (1387522237,), (1387522246,), (1387522250,), (1387522255,), (1387522256,), (1387522264,), (1387522267,), (1387522271,), (1387522329,), (1387522330,), (1387522331,), (1387522333,), (1387522338,), (1387522342,), (1387522369,), (1387522370,), (1387522372,), (1387522375,), (1387522379,), (1387522388,), (1387522389,), (1387522390,), (1387522392,), (1387522396,), (1387522449,), (1387522451,), (1387522452,), (1387522472,), (1387522475,), (1387522485,), (1387522493,), (1387522497,), (1387522500,), (1387522504,), (1387522507,), (1387522510,), (1387522514,), (1387522580,), (1387522582,), (1387522584,), (1387522587,), (1387522591,), (1387522606,), (1387522608,), (1387522609,), (1387522612,), (1387522630,), (1387522633,), (1387522635,), (1387522640,), (1387522645,), (1387522660,), (1387522696,), (1387522705,), (1387522697,), (1387522698,), (1387522701,), (1387522723,), (1387522724,), (1387522725,), (1387522767,), (1387522768,), (1387522769,), (1387522771,), (1387522774,), (1387522778,), (1387522835,), (1387522836,), (1387522837,), (1387522839,), (1387522844,), (1387522860,), (1387522861,), (1387522862,), (1387522894,), (1387522896,), (1387522906,), (1387522914,), (1387522951,), (1387522963,), (1387523008,), (1387523009,), (1387523010,), (1387523012,), (1387523028,), (1387523030,), (1387523031,), (1387523033,), (1387523046,), (1387523048,), (1387523094,), (1387523095,), (1387523097,), (1387523100,), (1387523108,), (1387523111,), (1387523116,), (1387523118,), (1387523119,), (1387523120,), (1387523122,), (1387523126,), (1387523130,), (1387523134,), (1387523143,), (1387523144,), (1387523147,), (1387523153,), (1387523169,), (1387523207,), (1387523208,), (1387523237,), (1387523239,), (1387523243,), (1387523246,), (1387523255,), (1387523258,), (1387523262,), (1387523284,), (1387523288,), (1387523327,), (1387523308,), (1387523322,), (1387523326,), (1387524157,), (1387524159,), (1387524161,), (1387524179,), (1387524181,), (1387524701,), (1387524703,), (1387524704,), (1387524707,), (1387524710,), (1387524719,), (1387524720,), (1387524722,), (1387524725,), (1387524734,), (1387524737,), (1387525715,), (1387525717,), (1387525718,), (1387525719,), (1387525721,), (1387525723,), (1387525807,), (1387525808,), (1387525809,), (1387525811,), (1387526356,), (1387526357,), (1387526431,), (1387526460,), (1387526854,), (1387526856,), (1387526858,), (1387526861,), (1387526912,), (1387526914,), (1387526915,), (1387526932,), (1387526935,), (1387526938,), (1387526941,), (1387527484,), (1387527520,), (1387527525,), (1387527566,), (1387527567,), (1387527568,), (1387527570,), (1387527577,), (1387527581,), (1387527594,), (1387527595,), (1387527596,), (1387527598,), (1387527602,), (1387527606,), (1387527620,), (1387527621,), (1387527624,), (1387527627,), (1387527638,), (1387527646,), (1387527653,), (1387527695,), (1387527697,), (1387527735,), (1387527698,), (1387527699,), (1387527700,), (1387527709,), (1387527730,), (1387527755,), (1387527757,), (1387527761,), (1387527767,), (1387527783,), (1387527784,), (1387527786,), (1387527790,), (1387527793,), (1387527842,), (1387527844,), (1387527845,), (1387527847,), (1387527872,), (1387527874,), (1387527876,), (1387527917,), (1387527920,), (1387527921,), (1387527931,), (1387527971,), (1387527972,), (1387527988,), (1387527990,), (1387527992,), (1387527995,), (1387528001,), (1387528014,), (1387528015,), (1387528016,), (1387528018,), (1387528022,), (1387528062,), (1387528063,), (1387528065,), (1387528068,), (1387528078,), (1387528081,), (1387528086,), (1387528088,), (1387528089,), (1387528090,), (1387528091,), (1387528094,), (1387528112,), (1387528113,), (1387528115,), (1387528117,), (1387528122,), (1387528191,), (1387528193,), (1387528195,), (1387528211,), (1387528212,), (1387528214,), (1387528217,), (1387528231,), (1387528233,), (1387528235,), (1387528237,), (1387528240,), (1387528320,), (1387528323,), (1387528340,), (1387528342,), (1387528343,), (1387528344,), (1387528279,), (1387528280,), (1387528298,), (1387528305,), (1387528385,), (1387528391,), (1387528393,), (1387528395,), (1387528398,), (1387528404,), (1387528406,), (1387528408,), (1387528411,), (1387528455,), (1387528457,), (1387528459,), (1387528470,), (1387528471,), (1387528473,), (1387528477,), (1387528481,), (1387528490,), (1387528494,), (1387528495,), (1387528496,), (1387528497,), (1387528498,), (1387528500,)) NUMBER BATCH : 0 # DISPLAY ALL COLLECTED DATA : {'03102025': {'nb_upload': 28, 'nb_taggue_class': 0, 'nb_taggue_densite': 0}} After datou_step_exec type output : map_portfolio_photo : len 1 keys : dict_keys([27465946]) Inside saveOutput : final : True verbose : True saveOutput not yet implemented for datou_step.type : split_time_score we use saveGeneral [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] map_info['map_portfolio_photo'] : {27465946: [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470, 1387528459, 1387528457, 1387528455, 1387528411, 1387528408, 1387528406, 1387528404, 1387528398, 1387528395, 1387528393, 1387528391, 1387528385, 1387528305, 1387528298, 1387528280, 1387528279]} final : True mtd_id 4302 list_pids : [1387528500, 1387528498, 1387528497, 1387528496, 1387528495, 1387528494, 1387528490, 1387528481, 1387528477, 1387528473, 1387528471, 1387528470] Looping around the photos to save general results len do output : 1 /27465946Didn'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, '3825419') ('4302', '27465946', '1387528500', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528498', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528497', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528496', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528495', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528494', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528490', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528481', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528477', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528473', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528471', None, None, None, None, None, '3825419') ('4302', None, None, None, None, None, None, None, '3825419') ('4302', '27465946', '1387528470', None, None, None, None, None, '3825419') begin to insert list_values into mtr_datou_result : length of list_values in save_final : 13 insert ignore into MTRPhoto.mtr_datou_result (mtd_id, mtr_portfolio_id,mtr_photo_id,result,result_long,result_double,hashtag_id,proba, mtr_current_id) values (%s,%s,%s,%s,%s,%s,%s,%s,%s) on duplicate key update mtr_portfolio_id = mtr_portfolio_id list_values : [('4302', None, '27465946', 'None', None, None, None, None, '3825419'), ('4302', '27465946', '1387528500', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528498', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528497', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528496', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528495', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528494', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528490', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528481', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528477', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528473', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528471', None, None, None, None, None, '3825419'), ('4302', '27465946', '1387528470', None, None, None, None, None, '3825419')] time used for this insertion : 0.03899812698364258 save_final save missing photos in datou_result : time spend for datou_step_exec : 2.548774242401123 time spend to save output : 0.03928709030151367 total time spend for step 5 : 2.5880613327026367 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 (3825419) 2.06user 2.26system 0:11.44elapsed 37%CPU (0avgtext+0avgdata 160264maxresident)k 2616inputs+7584outputs (27major+64226minor)pagefaults 0swaps